-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbackup.Rmd
42 lines (28 loc) · 1.09 KB
/
backup.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
### Demo 2: Visualising mean world precipitation dynamics
Visualising mean world precipitation automatically downloaded from http://www.worldclim.org/methods
```{r, animation, fig.width=10, fig.height=5, fig.show='animate', message=FALSE}
library(raster)
library(rasterVis)
library(colorspace)
prec <- raster::getData('worldclim', var='prec', res=10)
names(prec) <- month.abb
cols <- heat_hcl(12, h = c(0, -100), l = c(75, 40), c = c(40, 80), power = 1)
cols <- rev(sequential_hcl(12))
for (i in 1:12) {
plot(prec, i, zlim=c(0,500), col=cols)
}
```
The app below allows you to select the variables you want to map relating to national park of europe.
<center>
<iframe src="https://loicd.shinyapps.io/shinyGoogleVis" width="600" height="750" frameborder="0">Loading</iframe>
</center>
In case the above example does not work, run it locally using the code below.
```{r, eval = FALSE}
if(!require(XML))
install.packages('XML')
if(!require(googleVis))
install.packages('googleVis')
if(!require(shiny))
install.packages('shiny')
runGitHub('dutri001/shinyGoogleVis', launch.browser = TRUE)
```