diff --git a/docs/articles/climatic-indices.html b/docs/articles/climatic-indices.html index b70f7f1..21df9be 100644 --- a/docs/articles/climatic-indices.html +++ b/docs/articles/climatic-indices.html @@ -82,7 +82,7 @@ -
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-01 | 08 | enero | -7.30 | -4.52 | -14.39 | +5.18 | +3.06 | +13.92 |
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-02 | 08 | enero | -23.49 | -9.85 | -15.91 | +27.20 | +7.79 | +15.99 |
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-03 | 08 | enero | -3.09 | -8.54 | -14.60 | +5.60 | +6.97 | +14.82 |
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-04 | 08 | enero | 0.00 | -6.55 | -14.21 | +5.68 | +14.50 | |
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-05 | 08 | enero | 0.00 | -6.21 | -14.64 | +5.23 | +14.73 | |
1 | --5.836705 | -37.42518 | +-5.356912 | +37.69926 | 2008-01-06 | 08 | enero | 0.00 | -12.06 | -15.52 | +10.62 | +15.99 |
Finally, you can visualize the daily climate results. For example, let’s plot the precipitation for one of the sites:
-+clim_site1 <- clim_join %>% filter(ID_coords == 1) @@ -279,12 +278,12 @@
Or calculate the daily mean temperature and plot it against
-tmin
andtmax
:+-library(tidyr) clim_df <- clim_join %>% mutate(tmean = (tmin + tmax) / 2) %>% - pivot_longer( + pivot_longer( cols = c("tmin", "tmax", "tmean"), names_to = "temp_vars", values_to = "temp_values") @@ -295,11 +294,11 @@
ylab("Temperature (ºC)") + xlab("") + theme_bw()
+@@ -311,12 +310,12 @@ggplot(clim_df, aes(x = date, y = temp_values, color = temp_vars)) + geom_point(alpha = .1) + - scale_color_discrete(name = "Variables", + scale_color_discrete(name = "Variables", guide = guide_legend(override.aes = list(alpha = 1))) + ylab("Temperature (ºC)") + xlab("Date") + theme_bw()
Example 2: Introducing coordinates as a matrix
easyclimate
handles different input data, try now with matrices!Here we are retrieving daily precipitation data for a single year (2008).
-+-coords_mat <- as.matrix(coords) Sys.time() -## [1] "2021-07-09 23:39:42 EDT" +## [1] "2021-10-14 11:57:29 CEST" mat_prcp <- get_daily_climate( coords = coords_mat, @@ -325,16 +324,16 @@
) Sys.time() -## [1] "2021-07-09 23:40:01 EDT" +## [1] "2021-10-14 11:57:36 CEST" head(mat_prcp) ## ID_coords x y date Prcp -## 1 1 -5.836705 37.42518 2008-01-01 730 -## 2 1 -5.836705 37.42518 2008-01-02 2349 -## 3 1 -5.836705 37.42518 2008-01-03 309 -## 4 1 -5.836705 37.42518 2008-01-04 0 -## 5 1 -5.836705 37.42518 2008-01-05 0 -## 6 1 -5.836705 37.42518 2008-01-06 0 +## 1 1 -5.356912 37.69926 2008-01-01 518 +## 2 1 -5.356912 37.69926 2008-01-02 2720 +## 3 1 -5.356912 37.69926 2008-01-03 560 +## 4 1 -5.356912 37.69926 2008-01-04 0 +## 5 1 -5.356912 37.69926 2008-01-05 0 +## 6 1 -5.356912 37.69926 2008-01-06 0 clim_mat <- mat_prcp %>% mutate( @@ -353,7 +352,7 @@
ylab("Daily precipitation (mm)") + xlab("Date") + theme_bw()
+month_name <- format(ISOdate(2021, 1:12, 1), "%B") @@ -372,7 +371,7 @@
Example 3: Introducing coordinates as simple feature objects
Here we introduce coordinates as a
-sf
object, and retrieve minimum temperature for a single day (1 January 2001).+library(sf) coords_sf <- st_as_sf( diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-1-1.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-1-1.png index 980adf9..663840c 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-1-1.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-1-1.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-4-1.png index ae1d58f..e915655 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-1.png index e61ff0a..7ec9126 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-2.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-2.png index 9509c9e..8071cdf 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-2.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-5-2.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-1.png index 10fa641..dc6b7e8 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-2.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-2.png index 3638d32..4dbfa38 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-2.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-6-2.png differ diff --git a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-7-1.png index 9c85ac8..f2ecf89 100644 Binary files a/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/points-df-mat-sf_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/polygons-raster.html b/docs/articles/polygons-raster.html index 734c6e3..6cb0790 100644 --- a/docs/articles/polygons-raster.html +++ b/docs/articles/polygons-raster.html @@ -82,7 +82,7 @@ -
+Analysing the climate of an area for a given period
@@ -106,7 +106,7 @@Analysing the climate of an area for a given period
coords_t <- vect("POLYGON ((-4.5 41, -4.5 40.5, -5 40.5, -5 41))") Sys.time() # to know how much it takes to download -## [1] "2021-07-12 15:48:33 EDT" +## [1] "2021-10-14 11:57:54 CEST" df_tmax <- get_daily_climate( coords_t, @@ -116,7 +116,7 @@Analysing the climate of an area for a given period
) Sys.time() -## [1] "2021-07-12 15:48:57 EDT" +## [1] "2021-10-14 11:58:07 CEST" head(df_tmax) ## ID_coords x y date Tmax @@ -161,7 +161,7 @@Analysing the climate of an area for a given period
Sys.time() -## [1] "2021-07-12 15:49:18 EDT" +## [1] "2021-10-14 11:58:09 CEST" ras_tmax <- get_daily_climate( coords_t, @@ -171,14 +171,14 @@
Analysing the climate of an area for a given period
) Sys.time() -## [1] "2021-07-12 15:49:42 EDT" +## [1] "2021-10-14 11:58:23 CEST" ras_tmax ## class : SpatRaster ## dimensions : 60, 60, 2 (nrow, ncol, nlyr) ## resolution : 0.008333333, 0.008333333 (x, y) ## extent : -5, -4.5, 40.5, 41 (xmin, xmax, ymin, ymax) -## coord. ref. : +proj=longlat +datum=WGS84 +no_defs +## coord. ref. : lon/lat WGS 84 (EPSG:4326) ## source : memory ## names : 2012-01-01, 2012-08-01 ## min values : 981, 2605 diff --git a/docs/articles/polygons-raster_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/polygons-raster_files/figure-html/unnamed-chunk-4-1.png index e6d18b4..114f81c 100644 Binary files a/docs/articles/polygons-raster_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/polygons-raster_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/index.html b/docs/index.html index 6954bef..4ae51b0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -88,9 +88,9 @@-+diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 7a1d13a..70312bb 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,9 +1,9 @@ -pandoc: 2.11.2 +pandoc: 2.11.4 pkgdown: 1.6.1 pkgdown_sha: ~ articles: climatic-indices: climatic-indices.html points-df-mat-sf: points-df-mat-sf.html polygons-raster: polygons-raster.html -last_built: 2021-07-19T15:10Z +last_built: 2021-10-14T09:52Z diff --git a/docs/reference/figures/README-unnamed-chunk-3-1.png b/docs/reference/figures/README-unnamed-chunk-3-1.png index de713b7..76151f7 100644 Binary files a/docs/reference/figures/README-unnamed-chunk-3-1.png and b/docs/reference/figures/README-unnamed-chunk-3-1.png differ@@ -179,9 +179,9 @@
CITATION
If you use easyclimate, please cite both the data source and the package as:
+Moreno A, Hasenauer H (2016). “Spatial downscaling of European climate data.” International Journal of Climatology, 1444–1458. <URL: https://doi.org/10.1002/joc.4436>.
Rammer W, Pucher C, Neumann M (2018). Description, Evaluation and Validation of Downscaled Daily Climate Data Version 2. <URL: ftp://palantir.boku.ac.at/Public/ClimateData/>.
-Moreno A, Hasenauer H (2016). “Spatial downscaling of European climate data.” International Journal of Climatology, 1444–1458.
-Cruz-Alonso V, Rodríguez-Sánchez F, Pucher C, Ratcliffe S, Astigarraga J, Neumann M, Ruiz-Benito P (2021). easyclimate: Easy access to high-resolution daily climate data for Europe. <URL: https://github.com/VeruGHub/easyclimate>.
+Cruz-Alonso V, Rodríguez-Sánchez F, Pucher C, Ruiz-Benito P, Astigarraga J, Neumann M, Ratcliffe S (2021). easyclimate: Easy access to high-resolution daily climate data for Europe. <URL: https://github.com/VeruGHub/easyclimate>.