Skip to content

Commit

Permalink
merge devel with main
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Jan 5, 2023
2 parents 3a958ff + b56cc46 commit fbc890e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tic.yml
Expand Up @@ -30,7 +30,7 @@ jobs:
config:
# use a different tic template type if you do not want to build on all listed platforms
- { os: windows-latest, r: "release" }
- { os: macOS-latest, r: "release", pkgdown: "false", latex: "true" }
- { os: macOS-latest, r: "release", pkgdown: "true", latex: "true" }
- { os: ubuntu-latest, r: "devel" }
- { os: ubuntu-latest, r: "release" }

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -14,3 +14,5 @@ Meta
docs/
/doc/
/Meta/

*.profraw
2 changes: 1 addition & 1 deletion NEWS.md
Expand Up @@ -14,7 +14,7 @@

* Update list of allowed parameters for querying the API, ([18e4495e0ca2e9f14006260c019ac878a3023843](https://github.com/ropensci/nasapower/commit/9ed90e0708a32650992795b818e1681e7150a0d9)).

* Updated test infrastructure
* Updated test infrastructure.

# nasapower 4.0.7

Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Expand Up @@ -213,7 +213,7 @@
"applicationCategory": "Tools",
"isPartOf": "https://ropensci.org",
"keywords": ["NASA", "meteorological-data", "weather", "global", "weather-data", "meteorology", "NASA-POWER", "agroclimatology", "earth-science", "data-access", "climate-data", "r", "nasa-power", "nasa", "agroclimatology-data", "weather-variables", "rstats", "r-package"],
"fileSize": "378.693KB",
"fileSize": "379.417KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
29 changes: 15 additions & 14 deletions data-raw/README.md
@@ -1,7 +1,7 @@
Fetch NASA-POWER Parameters and Include Them as an Internal List
================
Adam H. Sparks
2022-12-11
2023-01-04

# Create parameters nested list for internal checks before sending queries to POWER server

Expand Down Expand Up @@ -125,52 +125,53 @@ sessioninfo::session_info()
## ─ Session info ───────────────────────────────────────────────────────────────
## setting value
## version R version 4.2.2 (2022-10-31)
## os macOS Ventura 13.0.1
## os macOS Ventura 13.1
## system aarch64, darwin20
## ui X11
## language (EN)
## collate en_US.UTF-8
## ctype en_US.UTF-8
## tz Australia/Perth
## date 2022-12-11
## date 2023-01-04
## pandoc 2.19.2 @ /opt/homebrew/bin/ (via rmarkdown)
##
## ─ Packages ───────────────────────────────────────────────────────────────────
## package * version date (UTC) lib source
## askpass 1.1 2019-01-13 [1] CRAN (R 4.2.2)
## cli 3.4.1 2022-09-23 [1] CRAN (R 4.2.2)
## askpass 1.1 2019-01-13 [1] CRAN (R 4.2.0)
## cli 3.5.0 2022-12-20 [1] CRAN (R 4.2.2)
## colorout * 1.2-2 2023-01-03 [1] Github (jalvesaq/colorout@79931fd)
## crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.2)
## credentials 1.3.2 2021-11-29 [1] CRAN (R 4.2.2)
## credentials 1.3.2 2021-11-29 [1] CRAN (R 4.2.0)
## desc 1.4.2 2022-09-08 [1] CRAN (R 4.2.2)
## digest 0.6.30 2022-10-18 [1] CRAN (R 4.2.2)
## evaluate 0.18 2022-11-07 [1] CRAN (R 4.2.2)
## digest 0.6.31 2022-12-11 [1] CRAN (R 4.2.2)
## evaluate 0.19 2022-12-13 [1] CRAN (R 4.2.2)
## fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.2)
## fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.2)
## fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.2)
## glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.2)
## htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.0)
## htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.2)
## jsonlite * 1.8.4 2022-12-06 [1] CRAN (R 4.2.2)
## knitr 1.41 2022-11-18 [1] CRAN (R 4.2.2)
## lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.2)
## magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.2)
## openssl 2.0.5 2022-12-06 [1] CRAN (R 4.2.2)
## openssl 2.0.5 2022-12-06 [1] CRAN (R 4.2.0)
## pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.2)
## pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.2)
## purrr * 0.3.5 2022-10-06 [1] CRAN (R 4.2.2)
## purrr * 1.0.0 2022-12-20 [1] CRAN (R 4.2.2)
## R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.2)
## rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.2)
## rmarkdown 2.18 2022-11-09 [1] CRAN (R 4.2.2)
## rmarkdown 2.19 2022-12-15 [1] CRAN (R 4.2.2)
## rprojroot 2.0.3 2022-04-02 [1] CRAN (R 4.2.2)
## rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.2)
## sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.2)
## stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.2)
## stringr 1.5.0 2022-12-02 [1] CRAN (R 4.2.2)
## sys 3.4.1 2022-10-18 [1] CRAN (R 4.2.2)
## tibble 3.1.8 2022-07-22 [1] CRAN (R 4.2.2)
## usethis 2.1.6 2022-05-25 [1] CRAN (R 4.2.2)
## usethis 2.1.6 2022-05-25 [1] CRAN (R 4.2.0)
## utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.2)
## vctrs 0.5.1 2022-11-16 [1] CRAN (R 4.2.2)
## xfun 0.35 2022-11-16 [1] CRAN (R 4.2.2)
## xfun 0.36 2022-12-21 [1] CRAN (R 4.2.2)
## yaml 2.3.6 2022-10-18 [1] CRAN (R 4.2.2)
##
## [1] /Users/adamsparks/Library/R/arm64/4.2/library
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Expand Up @@ -26,6 +26,7 @@ apsimx
broadleaf
climatologies
codecov
covrignore
crul
csv
favour
Expand Down
65 changes: 31 additions & 34 deletions vignettes/nasapower.Rmd
Expand Up @@ -50,19 +50,19 @@ daily_single_ag
#> PRECTOTCORR MERRA-2 Precipitation Corrected (mm/day)
#>
#> # A tibble: 31 × 10
#> LON LAT YEAR MM DD DOY YYYYMMDD RH2M T2M
#> <dbl> <dbl> <dbl> <int> <int> <int> <date> <dbl> <dbl>
#> 1 152. -27.5 1985 1 1 1 1985-01-01 54.7 24.9
#> 2 152. -27.5 1985 1 2 2 1985-01-02 42.1 28.6
#> 3 152. -27.5 1985 1 3 3 1985-01-03 43.4 27.4
#> 4 152. -27.5 1985 1 4 4 1985-01-04 48.9 24.3
#> 5 152. -27.5 1985 1 5 5 1985-01-05 55.3 26.5
#> 6 152. -27.5 1985 1 6 6 1985-01-06 60.2 27.0
#> 7 152. -27.5 1985 1 7 7 1985-01-07 63.1 27.2
#> 8 152. -27.5 1985 1 8 8 1985-01-08 70.6 24.9
#> 9 152. -27.5 1985 1 9 9 1985-01-09 60 26.1
#> 10 152. -27.5 1985 1 10 10 1985-01-10 45.2 27.0
#> # … with 21 more rows, and 1 more variable: PRECTOTCORR <dbl>
#> LON LAT YEAR MM DD DOY YYYYMMDD RH2M T2M PRECTOTCORR
#> <dbl> <dbl> <dbl> <int> <int> <int> <date> <dbl> <dbl> <dbl>
#> 1 152. -27.5 1985 1 1 1 1985-01-01 54.7 24.9 0.9
#> 2 152. -27.5 1985 1 2 2 1985-01-02 42.1 28.6 0.49
#> 3 152. -27.5 1985 1 3 3 1985-01-03 43.4 27.4 0.01
#> 4 152. -27.5 1985 1 4 4 1985-01-04 48.9 24.3 0.05
#> 5 152. -27.5 1985 1 5 5 1985-01-05 55.3 26.5 1.33
#> 6 152. -27.5 1985 1 6 6 1985-01-06 60.2 27.0 4.88
#> 7 152. -27.5 1985 1 7 7 1985-01-07 63.1 27.2 10.7
#> 8 152. -27.5 1985 1 8 8 1985-01-08 70.6 24.9 10
#> 9 152. -27.5 1985 1 9 9 1985-01-09 60 26.1 2.45
#> 10 152. -27.5 1985 1 10 10 1985-01-10 45.2 27.0 0.48
#> # … with 21 more rows
```

### Example fetching daily data for an area
Expand Down Expand Up @@ -135,21 +135,19 @@ interannual_re
#> CLRSKY_SFC_SW_DWN CERES SYN1deg Clear Sky Surface Shortwave Downward Irradiance (kW-hr/m^2/day)
#>
#> # A tibble: 144 × 17
#> PARAMETER YEAR LAT LON JAN FEB MAR APR MAY JUN
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 ALLSKY_SF… 1984 -25.8 151. 6.01 6.49 5.79 4.67 4.12 3.77
#> 2 ALLSKY_SF… 1984 -25.8 151. 5.92 5.97 5.64 4.37 4.01 3.61
#> 3 ALLSKY_SF… 1984 -25.8 152. 5.92 5.97 5.64 4.37 4.01 3.61
#> 4 ALLSKY_SF… 1984 -25.8 152. 5.96 5.85 5.56 4.26 3.92 3.52
#> 5 ALLSKY_SF… 1984 -25.8 153. 5.96 5.85 5.56 4.26 3.92 3.52
#> 6 ALLSKY_SF… 1984 -25.8 153. 6.23 6.05 5.88 4.26 3.81 3.3
#> 7 ALLSKY_SF… 1984 -26.2 151. 5.97 6.65 6 4.66 4.02 3.72
#> 8 ALLSKY_SF… 1984 -26.2 151. 6 6.38 5.71 4.38 4.01 3.66
#> 9 ALLSKY_SF… 1984 -26.2 152. 6 6.38 5.71 4.38 4.01 3.66
#> 10 ALLSKY_SF… 1984 -26.2 152. 5.75 5.96 5.37 4.13 3.8 3.44
#> # … with 134 more rows, and 7 more variables: JUL <dbl>,
#> # AUG <dbl>, SEP <dbl>, OCT <dbl>, NOV <dbl>, DEC <dbl>,
#> # ANN <dbl>
#> PARAMETER YEAR LAT LON JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 ALLSKY_SFC… 1984 -25.8 151. 6.01 6.49 5.79 4.67 4.12 3.77 2.46 4.87 6.11 5.5 7.97
#> 2 ALLSKY_SFC… 1984 -25.8 151. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 7.6
#> 3 ALLSKY_SFC… 1984 -25.8 152. 5.92 5.97 5.64 4.37 4.01 3.61 2.6 4.8 5.84 5.24 7.6
#> 4 ALLSKY_SFC… 1984 -25.8 152. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 7.23
#> 5 ALLSKY_SFC… 1984 -25.8 153. 5.96 5.85 5.56 4.26 3.92 3.52 2.66 4.59 5.58 4.94 7.23
#> 6 ALLSKY_SFC… 1984 -25.8 153. 6.23 6.05 5.88 4.26 3.81 3.3 2.96 4.73 5.66 5.25 7.6
#> 7 ALLSKY_SFC… 1984 -26.2 151. 5.97 6.65 6 4.66 4.02 3.72 2.28 4.86 6.08 5.74 7.74
#> 8 ALLSKY_SFC… 1984 -26.2 151. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 7.46
#> 9 ALLSKY_SFC… 1984 -26.2 152. 6 6.38 5.71 4.38 4.01 3.66 2.17 4.88 6.01 5.43 7.46
#> 10 ALLSKY_SFC… 1984 -26.2 152. 5.75 5.96 5.37 4.13 3.8 3.44 2.38 4.81 5.75 4.99 6.94
#> # … with 134 more rows, and 2 more variables: DEC <dbl>, ANN <dbl>
```

### Example fetching climatology data
Expand Down Expand Up @@ -181,12 +179,11 @@ climatology_ag
#> RH2M MERRA-2 Relative Humidity at 2 Meters (%)
#>
#> # A tibble: 2 × 16
#> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL
#> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 152. -27.5 T2M 24.7 23.7 22.0 19.0 15.1 12.6 11.6
#> 2 152. -27.5 RH2M 64.7 69.6 71.1 70.5 69.1 75.1 70.4
#> # … with 6 more variables: AUG <dbl>, SEP <dbl>, OCT <dbl>,
#> # NOV <dbl>, DEC <dbl>, ANN <dbl>
#> LON LAT PARAMETER JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
#> <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 152. -27.5 T2M 24.7 23.7 22.0 19.0 15.1 12.6 11.6 13.1 16.9 20 22.3 23.7
#> 2 152. -27.5 RH2M 64.7 69.6 71.1 70.5 69.1 75.1 70.4 63.1 59.8 59.4 60.3 63.4
#> # … with 1 more variable: ANN <dbl>
```

_Note_ the associated metadata in the data frame header are not saved if the data are exported to a file format other than an R data format, _e.g._, .Rdata, .rda or .rds.
Expand Down

0 comments on commit fbc890e

Please sign in to comment.