Skip to content

Commit

Permalink
pkgdown updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed Jul 11, 2023
1 parent 0fd52b2 commit eb6a74e
Show file tree
Hide file tree
Showing 75 changed files with 184 additions and 118 deletions.
38 changes: 30 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ knitr::opts_chunk$set(
warning = FALSE,
message = FALSE
)
library(climateR)
```

# climateR
# Welcome!

<!-- badges: start -->
[![DOI](https://zenodo.org/badge/158620263.svg)](https://zenodo.org/badge/latestdoi/158620263)
Expand All @@ -26,22 +28,27 @@ knitr::opts_chunk$set(
[![codecov](https://codecov.io/gh/mikejohnson51/climateR/branch/master/graph/badge.svg?token=7zs6C91SDw)](https://codecov.io/gh/mikejohnson51/climateR)
<!-- badges: end -->


`climateR` simplifies the steps needed to get climate data into R. At its core it provides three main things:

1. A catalog of over 100,000k datasets from over 2,000 data providers/archives. See (climateR::params)
1. A catalog of over 100,000k datasets from over 2,000 data providers/archives. See (`climateR::params`)

```{r}
nrow(params)
length(unique(params$id))
length(unique(params$asset))
```

This catalog is an ever evolving, set of documented and federated datasets that can be accessed by the data access utilites.
This catalog is an [evolving, federated collection of datasets](https://github.com/mikejohnson51/climateR-catalogs) that can be accessed by the data access utilities.

2. A general [toolkit for accessing remote and local gridded data](https://mikejohnson51.github.io/climateR/reference/index.html#data-access) files bounded by space, time, and variable constraints (`dap`, `dap_crop`, `read_dap_file`)


3. A set of [shortcuts](https://mikejohnson51.github.io/climateR/reference/index.html#shortcuts) that implement these methods for a core set of selected catalog elements

2. A general [toolkit for accessing remote and local gridded data](docs/reference/index.html#data-access) files bounded by space, time, and variable constraints (`dap`, `dap_crop`, `read_dap_file`)

> :warning: **Python Users**: Access the to data catalogs is available through the USGS [`gdptools`](https://gdptools.readthedocs.io/en/latest/) package. Directly analogous climateR functionality can be found in [`climtePy`](https://github.com/LynkerIntel/climatePy)
3. A set of [shortcuts](docs/reference/index.html#shortcuts) that implement these methods for a core set of selected catalog elements

# Installation

Expand All @@ -52,25 +59,40 @@ remotes::install_github("mikejohnson51/climateR")

# Basic Usage

## Rainfall from GridMet for Colorado
### October 29,1991 - November 6, 1991
Finding rainfall in Colorado between October 29,1991 - November 6, 1991. The source dataset for this example uses the getGridMET shortcut.

```{r}
library(AOI)
library(terra)
library(climateR)
AOI = aoi_get(state = "CO", county = "all")
```

```{r, echo = FALSE}
plot(AOI$geometry)
```

```{r}
d = getGridMET(AOI,
system.time({
d = getGridMET(AOI,
varname = "pr",
startDate = "1991-10-29",
endDate = "1991-11-06")
})
```

```{r,echo = FALSE}
plot(d$precipitation_amount)
```

# Integration with
```{r}
system.time({
county = zonal::execute_zonal(d, geom = AOI, ID = "fip_code")
})
```

```{r, echo = FALSE}
plot(county[grepl("pr_", names(county))])
```
54 changes: 38 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# climateR
# Welcome!

<!-- badges: start -->

Expand All @@ -20,7 +20,7 @@ Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repost
its core it provides three main things:

1. A catalog of over 100,000k datasets from over 2,000 data
providers/archives. See (climateR::params)
providers/archives. See (`climateR::params`)

``` r
nrow(params)
Expand All @@ -31,15 +31,25 @@ length(unique(params$asset))
#> [1] 4653
```

This catalog is an ever evolving, set of documented and federated
datasets that can be accessed by the data access utilites.
This catalog is an [evolving, federated collection of
datasets](https://github.com/mikejohnson51/climateR-catalogs) that can
be accessed by the data access utilities.

2. A general [toolkit for accessing remote and local gridded
data](docs/reference/index.html#data-access) files bounded by space,
time, and variable constraints (`dap`, `dap_crop`, `read_dap_file`)
data](https://mikejohnson51.github.io/climateR/reference/index.html#data-access)
files bounded by space, time, and variable constraints (`dap`,
`dap_crop`, `read_dap_file`)

3. A set of [shortcuts](docs/reference/index.html#shortcuts) that
implement these methods for a core set of selected catalog elements
3. A set of
[shortcuts](https://mikejohnson51.github.io/climateR/reference/index.html#shortcuts)
that implement these methods for a core set of selected catalog
elements

> :warning: **Python Users**: Access the to data catalogs is available
> through the USGS
> [`gdptools`](https://gdptools.readthedocs.io/en/latest/) package.
> Directly analogous climateR functionality can be found in
> [`climtePy`](https://github.com/LynkerIntel/climatePy)
# Installation

Expand All @@ -50,28 +60,40 @@ remotes::install_github("mikejohnson51/climateR")

# Basic Usage

## Rainfall from GridMet for Colorado

### October 29,1991 - November 6, 1991
Finding rainfall in Colorado between October 29,1991 - November 6, 1991.
The source dataset for this example uses the getGridMET shortcut.

``` r
library(AOI)
library(terra)
library(climateR)

AOI = aoi_get(state = "CO", county = "all")
plot(AOI$geometry)
```

<img src="man/figures/README-unnamed-chunk-4-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-5-1.png" width="100%" />

``` r
d = getGridMET(AOI,
system.time({
d = getGridMET(AOI,
varname = "pr",
startDate = "1991-10-29",
endDate = "1991-11-06")
})
#> user system elapsed
#> 0.471 0.097 1.962
```

plot(d$precipitation_amount)
<img src="man/figures/README-unnamed-chunk-7-1.png" width="100%" />

# Integration with

``` r
system.time({
county = zonal::execute_zonal(d, geom = AOI, ID = "fip_code")
})
#> user system elapsed
#> 2.715 0.257 3.344
```

<img src="man/figures/README-unnamed-chunk-5-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-9-1.png" width="100%" />
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/00-geopiper.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions docs/articles/01-intro.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/articles/01-intro_files/figure-html/unnamed-chunk-14-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/01-intro_files/figure-html/unnamed-chunk-19-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb6a74e

Please sign in to comment.