Skip to content

Commit

Permalink
Merge pull request #120 from rabutler-usbr/master
Browse files Browse the repository at this point in the history
v 0.2.1 fixes for CRAN submission
  • Loading branch information
rabutler-usbr committed Oct 17, 2023
2 parents ee80a95 + c7148f9 commit 59cf149
Show file tree
Hide file tree
Showing 16 changed files with 214 additions and 50 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
- {os: windows-latest, r: 'oldrel-1'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'oldrel-1'}
- {os: macOS-latest, r: 'oldrel-2'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'oldrel-1'}
- {os: ubuntu-20.04, r: 'oldrel-2'}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ prism.Rproj
prismDataScratch.R
.httr-oauth
/revdep/.cache.rds
/revdep/library/*
data-raw/prism_example/*
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Allows users to access the Oregon State Prism climate data
Some user friendly visualizations are also provided.
URL: https://docs.ropensci.org/prism/, https://github.com/ropensci/prism
BugReports: https://github.com/ropensci/prism/issues
Version: 0.2.0.9000
Version: 0.2.1
Authors@R: c(
person("Hart", "Edmund", email ="Edmund.m.hart@gmail.com",role = c("aut", "ccp")),
person("Kendon", "Bell", email = "kmb56@berkeley.edu", role = c("aut")),
Expand Down
26 changes: 17 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# prism 0.2.0.9000
# prism 0.2.1

**Released October 17, 2023**

## Minor Enhancements

* Removed lubridate from imports to fix CRAN note.
* Removed vignette that depended on too many other libraries; did not want to add them all to Suggests and also relied on external shape file. Will move to somewhere else online.
* Removed LazyData and LazyLoad from Description to fix CRAN note.
* Updated error message in `pd_image()` when input has length of 0.
* Fixed documentation for `get_prism_normals()` to reference the new period (1991-2020). (#111)
* Updated error message in `get_prism_dailys()` if a date before Jan. 1, 1981 is provided.
* Added `service` parameter to `get_prism_dailys()`, `get_prism_monthlys()`, and `get_prism_annual()`, so user can provide subscription based URLs, instead of default public available 4km data. (@adamlilith)
* Deprecated `check` parameter in `get_prism_dailys()` as it does not exist in monthly or annual functions. (#116)
* Changed defaults in get data functions (#104)
* `get_prism_monthlys()`
* `mon` now defaults to `1:12`, so default now downloads all months for the specified years
* `years` no longer has a default of `NULL`, so user will understand it has to be provided
* `get_prism_annual()`
* `years` no longer has a default of `NULL`, so user will understand it has to be provided
* Minor updates to documentation of `mon` and `years` parameters
* Removed purrr from imports.

## Bug Fixes and Clean Up

* Fixing CRAN notes
* Removed LazyData and LazyLoad from Description to fix CRAN note.
* Removed lubridate from imports to fix CRAN note.
* Removed vignette that depended on too many other libraries; did not want to add them all to Suggests and also relied on external shape file. This may be linked to from README in the future.
* Updated error message in `pd_image()` when input has length of 0.
* Fixed documentation for `get_prism_normals()` to reference the new period (1991-2020). (#111)
* Updated error message in `get_prism_dailys()` if a date before Jan. 1, 1981 is provided.
* Deprecated `check` parameter in `get_prism_dailys()` as it does not exist in monthly or annual functions. (#116)
* Removed purrr from imports by switching one call from `purrr:map()` to `lapply()`.

# prism 0.2.0

Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ knitr::knit_hooks$set(output = function(x, options) {

[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/prism)](https://cran.r-project.org/package=prism)
[![R build status](https://github.com/ropensci/prism/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/prism/actions)
[![codecov.io](https://codecov.io/github/ropensci/prism/coverage.svg?branch=master)](https://codecov.io/github/ropensci/prism?branch=master)
[![codecov.io](https://codecov.io/github/ropensci/prism/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/prism?branch=master)


This package allows users to access and visualize data from the [Oregon State PRISM project](https://prism.nacse.org). Data are all in the form of gridded rasters for the continental US at 4 different temporal scales: daily, monthly, annual, and 30 year normals. Please see their webpage for a full description of the data products, or [see their overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets_aug2013.pdf).
This package allows users to access and visualize data from the [Oregon State PRISM project](https://prism.nacse.org). Data are all in the form of gridded rasters for the continental US at 4 different temporal scales: daily, monthly, annual, and 30 year normals. Please see their webpage for a full description of the data products, or [see their overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf).

## Installation

Expand Down Expand Up @@ -63,7 +63,7 @@ The remainder of this README provides examples following this work flow.

## prism data and parameters

Data are available in 4 different temporal scales as mentioned above. At each temporal scale, there are 7 different parameters/variables available. Keep in mind these are modeled parameters, not measured. Please see the [full description](https://www.prism.oregonstate.edu/documents/Daly2008_PhysiographicMapping_IntJnlClim.pdf) for how they are calculated.
Data are available in 4 different temporal scales as mentioned above. At each temporal scale, there are 7 different parameters/variables available. Keep in mind these are modeled parameters, not measured. Please see the [full description](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf) for how they are calculated.

| Parameter name| Description |
|:---------------|:-------------|
Expand Down
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/prism)](https://cran.r-project.org/package=prism)
[![R build
status](https://github.com/ropensci/prism/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/prism/actions)
[![codecov.io](https://codecov.io/github/ropensci/prism/coverage.svg?branch=master)](https://codecov.io/github/ropensci/prism?branch=master)
[![codecov.io](https://codecov.io/github/ropensci/prism/coverage.svg?branch=master)](https://app.codecov.io/github/ropensci/prism?branch=master)

This package allows users to access and visualize data from the [Oregon
State PRISM project](https://prism.nacse.org). Data are all in the form
of gridded rasters for the continental US at 4 different temporal
scales: daily, monthly, annual, and 30 year normals. Please see their
webpage for a full description of the data products, or [see their
overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets_aug2013.pdf).
overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf).

## Installation

Expand Down Expand Up @@ -56,7 +56,7 @@ Data are available in 4 different temporal scales as mentioned above. At
each temporal scale, there are 7 different parameters/variables
available. Keep in mind these are modeled parameters, not measured.
Please see the [full
description](https://www.prism.oregonstate.edu/documents/Daly2008_PhysiographicMapping_IntJnlClim.pdf)
description](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf)
for how they are calculated.

| Parameter name | Description |
Expand Down Expand Up @@ -143,16 +143,16 @@ work off of one or more of these folder names (`pd`).
``` r
## Truncated to keep file list short
prism_archive_ls()
#> [1] "PRISM_ppt_30yr_normal_4kmM4_annual_bil"
#> [2] "PRISM_ppt_stable_4kmM3_2000_bil"
#> [3] "PRISM_ppt_stable_4kmM3_2001_bil"
#> [4] "PRISM_ppt_stable_4kmM3_2002_bil"
#> [5] "PRISM_ppt_stable_4kmM3_2003_bil"
#> [6] "PRISM_ppt_stable_4kmM3_2004_bil"
#> [7] "PRISM_ppt_stable_4kmM3_2005_bil"
#> [8] "PRISM_ppt_stable_4kmM3_2006_bil"
#> [9] "PRISM_ppt_stable_4kmM3_2007_bil"
#> [10] "PRISM_ppt_stable_4kmM3_2008_bil"
#> [1] "PRISM_ppt_30yr_normal_4kmM4_01_bil"
#> [2] "PRISM_ppt_30yr_normal_4kmM4_annual_bil"
#> [3] "PRISM_ppt_stable_4kmM2_1950_bil"
#> [4] "PRISM_ppt_stable_4kmM2_195001_bil"
#> [5] "PRISM_ppt_stable_4kmM2_195002_bil"
#> [6] "PRISM_ppt_stable_4kmM2_195003_bil"
#> [7] "PRISM_ppt_stable_4kmM2_195004_bil"
#> [8] "PRISM_ppt_stable_4kmM2_195005_bil"
#> [9] "PRISM_ppt_stable_4kmM2_195006_bil"
#> [10] "PRISM_ppt_stable_4kmM2_195007_bil"
....
```

Expand All @@ -165,19 +165,19 @@ can get that with the `pd_get_name()` function.
``` r
## Truncated to keep file list short
pd_to_file(prism_archive_ls())
#> [1] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_30yr_normal_4kmM4_annual_bil\\PRISM_ppt_30yr_normal_4kmM4_annual_bil.bil"
#> [2] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM3_2000_bil\\PRISM_ppt_stable_4kmM3_2000_bil.bil"
#> [3] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM3_2001_bil\\PRISM_ppt_stable_4kmM3_2001_bil.bil"
#> [4] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM3_2002_bil\\PRISM_ppt_stable_4kmM3_2002_bil.bil"
#> [5] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM3_2003_bil\\PRISM_ppt_stable_4kmM3_2003_bil.bil"
#> [1] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_30yr_normal_4kmM4_01_bil\\PRISM_ppt_30yr_normal_4kmM4_01_bil.bil"
#> [2] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_30yr_normal_4kmM4_annual_bil\\PRISM_ppt_30yr_normal_4kmM4_annual_bil.bil"
#> [3] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM2_1950_bil\\PRISM_ppt_stable_4kmM2_1950_bil.bil"
#> [4] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM2_195001_bil\\PRISM_ppt_stable_4kmM2_195001_bil.bil"
#> [5] "C:\\Users\\RAButler\\Documents\\prismtmp\\PRISM_ppt_stable_4kmM2_195002_bil\\PRISM_ppt_stable_4kmM2_195002_bil.bil"
....

pd_get_name(prism_archive_ls())
#> [1] "Annual 30-year normals - 4km resolution - Precipitation"
#> [2] "2000 - 4km resolution - Precipitation"
#> [3] "2001 - 4km resolution - Precipitation"
#> [4] "2002 - 4km resolution - Precipitation"
#> [5] "2003 - 4km resolution - Precipitation"
#> [1] "Jan 30-year normals - 4km resolution - Precipitation"
#> [2] "Annual 30-year normals - 4km resolution - Precipitation"
#> [3] "1950 - 4km resolution - Precipitation"
#> [4] "Jan 1950 - 4km resolution - Precipitation"
#> [5] "Feb 1950 - 4km resolution - Precipitation"
....
```

Expand Down
32 changes: 24 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
Re-submission of submission from 2020-11-10. The tarball is now < 5 MB.

## Test environment

* Local: Windows 10 Enterprise: R 3.6.3
* Ubuntu 20.04 (using GitHub Actions): R 3.6.3, 4.0.3, and R-devel
* MacOS-latest (using GitHub Actions): R 3.6.3, 4.0.3, and R-devel
* Windows (using GitHub Actions): R 3.6.3, R 4.0.3, and R-devel; Win-builder R 4.0.3 and R-devel
* R-Hub: Windows, R-devel; Ubuntu Linux 16.04, R-release; Fedora Linux, R-devel
* Local: Windows 10 Enterprise: R 4.3.1
* Ubuntu 20.04 (using GitHub Actions): oldrel-3, oldrel-2, oldrel-1, release, devel
* MacOS-latest (using GitHub Actions): release
* Windows (using GitHub Actions): oldrel-2, oldrel-1, release, devel
* R-Hub: Windows, R-devel; Ubuntu Linux 20.04, R-release; Fedora Linux, R-devel

## R CMD check results

There were no ERRORs or WARNINGs or NOTEs.
R-hub produced the following NOTES on Windows/R-devel:

* checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''
* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'

From all my checking, this appears to be an issue with R-hub and has an open issue (https://github.com/r-hub/rhub/issues/560). This is also not an issue locally or on GitHub Actions, so I submitted anyways.

R-hub produced the following NOTE on Fedora Linux/R-devel and Ubuntu Linux 20.04/R-release:

* checking HTML version of manual ... NOTE
Skipping checking HTML validation: no command 'tidy' found

This also appears to be a known issue with R-hub and does not occur on GitHub Actions.



## Downstream dependencies

Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
citEntry(entry = "Manual",
bibentry(bibtype = "Manual",
title = "prism: Download data from the Oregon prism project",
author = "Edmund M. Hart and Kendon Bell",
year = "2015",
Expand Down
2 changes: 1 addition & 1 deletion man/prism-package.Rd

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

77 changes: 77 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Platform

|field |value |
|:--------|:------------------------------------------|
|version |R version 4.3.1 (2023-06-16 ucrt) |
|os |Windows 10 x64 (build 19044) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |English_United States.utf8 |
|ctype |English_United States.utf8 |
|tz |America/Denver |
|date |2023-10-17 |
|rstudio |2023.06.0+421 Mountain Hydrangea (desktop) |
|pandoc |NA |

# Dependencies

|package |old |new |Δ |
|:------------|:------|:------|:--|
|prism |0.2.0 |0.2.1 |* |
|askpass |1.2.0 |1.2.0 | |
|bit |4.0.5 |4.0.5 | |
|bit64 |4.0.5 |4.0.5 | |
|cli |3.6.1 |3.6.1 | |
|clipr |0.8.0 |0.8.0 | |
|colorspace |2.1-0 |2.1-0 | |
|cpp11 |0.4.6 |0.4.6 | |
|crayon |1.5.2 |1.5.2 | |
|curl |5.1.0 |5.1.0 | |
|dplyr |1.1.3 |1.1.3 | |
|fansi |1.0.5 |1.0.5 | |
|farver |2.1.1 |2.1.1 | |
|generics |0.1.3 |0.1.3 | |
|ggplot2 |3.4.4 |3.4.4 | |
|glue |1.6.2 |1.6.2 | |
|gtable |0.3.4 |0.3.4 | |
|hms |1.1.3 |1.1.3 | |
|httr |1.4.7 |1.4.7 | |
|isoband |0.2.7 |0.2.7 | |
|jsonlite |1.8.7 |1.8.7 | |
|labeling |0.4.3 |0.4.3 | |
|lifecycle |1.0.3 |1.0.3 | |
|lubridate |1.9.3 |NA |* |
|magrittr |2.0.3 |2.0.3 | |
|mime |0.12 |0.12 | |
|munsell |0.5.0 |0.5.0 | |
|openssl |2.1.1 |2.1.1 | |
|pillar |1.9.0 |1.9.0 | |
|pkgconfig |2.0.3 |2.0.3 | |
|prettyunits |1.2.0 |1.2.0 | |
|progress |1.2.2 |1.2.2 | |
|purrr |1.0.2 |NA |* |
|R6 |2.5.1 |2.5.1 | |
|raster |3.6-26 |3.6-26 | |
|RColorBrewer |1.1-3 |1.1-3 | |
|Rcpp |1.0.11 |1.0.11 | |
|readr |2.1.4 |2.1.4 | |
|rlang |1.1.1 |1.1.1 | |
|scales |1.2.1 |1.2.1 | |
|sp |2.1-1 |2.1-1 | |
|stringi |1.7.12 |1.7.12 | |
|stringr |1.5.0 |1.5.0 | |
|sys |3.4.2 |3.4.2 | |
|terra |1.7-55 |1.7-55 | |
|tibble |3.2.1 |3.2.1 | |
|tidyselect |1.2.0 |1.2.0 | |
|timechange |0.2.0 |NA |* |
|tzdb |0.4.0 |0.4.0 | |
|utf8 |1.2.3 |1.2.3 | |
|vctrs |0.6.4 |0.6.4 | |
|viridisLite |0.4.2 |0.4.2 | |
|vroom |1.6.4 |1.6.4 | |
|withr |2.5.1 |2.5.1 | |

# Revdeps

55 changes: 55 additions & 0 deletions revdep/checks/libraries.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package,old,new,delta
prism,0.2.0,0.2.1,*
askpass,1.2.0,1.2.0,
bit,4.0.5,4.0.5,
bit64,4.0.5,4.0.5,
cli,3.6.1,3.6.1,
clipr,0.8.0,0.8.0,
colorspace,2.1-0,2.1-0,
cpp11,0.4.6,0.4.6,
crayon,1.5.2,1.5.2,
curl,5.1.0,5.1.0,
dplyr,1.1.3,1.1.3,
fansi,1.0.5,1.0.5,
farver,2.1.1,2.1.1,
generics,0.1.3,0.1.3,
ggplot2,3.4.4,3.4.4,
glue,1.6.2,1.6.2,
gtable,0.3.4,0.3.4,
hms,1.1.3,1.1.3,
httr,1.4.7,1.4.7,
isoband,0.2.7,0.2.7,
jsonlite,1.8.7,1.8.7,
labeling,0.4.3,0.4.3,
lifecycle,1.0.3,1.0.3,
lubridate,1.9.3,NA,*
magrittr,2.0.3,2.0.3,
mime,0.12,0.12,
munsell,0.5.0,0.5.0,
openssl,2.1.1,2.1.1,
pillar,1.9.0,1.9.0,
pkgconfig,2.0.3,2.0.3,
prettyunits,1.2.0,1.2.0,
progress,1.2.2,1.2.2,
purrr,1.0.2,NA,*
R6,2.5.1,2.5.1,
raster,3.6-26,3.6-26,
RColorBrewer,1.1-3,1.1-3,
Rcpp,1.0.11,1.0.11,
readr,2.1.4,2.1.4,
rlang,1.1.1,1.1.1,
scales,1.2.1,1.2.1,
sp,2.1-1,2.1-1,
stringi,1.7.12,1.7.12,
stringr,1.5.0,1.5.0,
sys,3.4.2,3.4.2,
terra,1.7-55,1.7-55,
tibble,3.2.1,3.2.1,
tidyselect,1.2.0,1.2.0,
timechange,0.2.0,NA,*
tzdb,0.4.0,0.4.0,
utf8,1.2.3,1.2.3,
vctrs,0.6.4,0.6.4,
viridisLite,0.4.2,0.4.2,
vroom,1.6.4,1.6.4,
withr,2.5.1,2.5.1,
7 changes: 7 additions & 0 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## revdepcheck results

We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

Binary file added revdep/data.sqlite
Binary file not shown.
1 change: 1 addition & 0 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
1 change: 1 addition & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Wow, no problems at all. :)*
4 changes: 2 additions & 2 deletions vignettes/prism.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ knitr::knit_hooks$set(output = function(x, options) {
- Edmund Hart - November 13, 2015


The prism package allows users to access and visualize data from the [Oregon State PRISM project](https://prism.nacse.org). Data are all in the form of gridded rasters for the continental US at 4 different temporal scales: daily, monthly, annual, and 30 year normals. Please see their webpage for a full description of the data products, or [see their overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets_aug2013.pdf).
The prism package allows users to access and visualize data from the [Oregon State PRISM project](https://prism.nacse.org). Data are all in the form of gridded rasters for the continental US at 4 different temporal scales: daily, monthly, annual, and 30 year normals. Please see their webpage for a full description of the data products, or [see their overview](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf).

## Installation

Expand Down Expand Up @@ -66,7 +66,7 @@ The remainder of this README provides examples following this work flow.

## prism data and parameters

Data are available in 4 different temporal scales as mentioned above. At each temporal scale, there are 7 different parameters/variables available. Keep in mind these are modeled parameters, not measured. Please see the [full description](https://www.prism.oregonstate.edu/documents/Daly2008_PhysiographicMapping_IntJnlClim.pdf) for how they are calculated.
Data are available in 4 different temporal scales as mentioned above. At each temporal scale, there are 7 different parameters/variables available. Keep in mind these are modeled parameters, not measured. Please see the [full description](https://www.prism.oregonstate.edu/documents/PRISM_datasets.pdf) for how they are calculated.

| Parameter name| Description |
|:---------------|:-------------|
Expand Down

0 comments on commit 59cf149

Please sign in to comment.