-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
71 lines (54 loc) · 1.32 KB
/
README.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
title: "crcc: Costa Rica climate change"
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# crcc <img src="man/figures/logo.png" align="right" height="139" />
<!-- badges: start -->
<!-- badges: end -->
The goal of crcc is to provides geospatial data of Costa Rica to do climate change analysis.
## Installation
You can install the development version of crcc from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("ManuelSpinola/crcc")
```
## Example
This is a basic example which shows you how to use the package:
```{r}
#| message: false
#| warning: false
library(crcc)
library(crgeo)
library(tidyverse)
library(sf)
library(stars)
```
```{r}
#| message: false
#| warning: false
max_temp <- cr_future_worldclim(var = "tmax",
res = 2.5,
gcm = "ACCESS-CM2",
ssp = "ssp126",
interval = "2041-2060",
path = tempdir(),
return_stack = TRUE)
```
```{r}
#| message: false
#| warning: false
ggplot() +
geom_stars(data = max_temp) +
scale_fill_viridis_c(name = "Temperatura (°C)", na.value = "transparent", option = "C", direction = -1) +
theme_minimal() +
coord_equal()
```