diff --git a/.Rbuildignore b/.Rbuildignore index 8bd13e1e..72b1d94e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -11,7 +11,6 @@ appveyor.yml ^data-raw$ ^README\.Rmd$ ^README-.*\.png$ -^CONDUCT\.md$ ^paper$ vignettes/figure ^codecov\.yml$ @@ -24,3 +23,5 @@ vignettes/figure ^Meta$ ^\.ccache$ ^tic\.R$ +^CODE_OF_CONDUCT\.md$ +^CRAN-SUBMISSION$ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..ea0da3de --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, +and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall +community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or +advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email +address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a +professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards +of acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies +when an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at adamhsparks@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, +available at . + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +. Translations are available at . diff --git a/CONDUCT.md b/CONDUCT.md deleted file mode 100644 index 52a673e8..00000000 --- a/CONDUCT.md +++ /dev/null @@ -1,25 +0,0 @@ -# Contributor Code of Conduct - -As contributors and maintainers of this project, we pledge to respect all people who -contribute through reporting issues, posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free experience for -everyone, regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. - -Examples of unacceptable behavior by participants include the use of sexual language or -imagery, derogatory comments or personal attacks, trolling, public or private harassment, -insults, or other unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, -commits, code, wiki edits, issues, and other contributions that are not aligned to this -Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed -from the project team. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by -opening an issue or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the Contributor Covenant -(http:contributor-covenant.org), version 1.0.0, available at -http://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION index 2b403569..b49aa4bf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: GSODR Type: Package Title: Global Surface Summary of the Day ('GSOD') Weather Data Client -Version: 3.1.4.9000 +Version: 3.1.5 Authors@R: c(person("Adam H.", "Sparks", role = c("aut", "cre"), email = "adamhsparks@gmail.com", comment = c(ORCID = "0000-0002-0061-8359")), diff --git a/NEWS.md b/NEWS.md index e0c329c2..8c3c5bf7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,750 +1,744 @@ -# GSODR (development version) +--- +editor_options: + markdown: + wrap: sentence +--- -* Update internal `isd-history` database. +# GSODR 3.1.5 + +## Minor changes + +- Update internal `isd-history` database. + +- Use `return(invisible(NULL))` for functions that check user inputs without any returns. + +- Replace `class(years) == "character")` with `inherits(years, what = "character")` in an internal function, `.validate_years()`. + +- Updates invalid URLs. # GSODR 3.1.4 ## Minor changes -* Skip **ANY** and **ALL** tests on CRAN. -This fixes the "problems" with _GSODR_ failing on a Solaris instance when the server failed to respond. +- Skip **ANY** and **ALL** tests on CRAN. + This fixes the "problems" with *GSODR* failing on a Solaris instance when the server failed to respond. -* Update internal `isd-history` database. +- Update internal `isd-history` database. -* Use `\CRANpkg{}` in place of `\pkg{}` in documentation. +- Use `\CRANpkg{}` in place of `\pkg{}` in documentation. # GSODR 3.1.2 ## Bug fixes -* Fix (more) bugs related to `NA` value replacements. +- Fix (more) bugs related to `NA` value replacements. ## Minor changes and improvements -* Simplify `NA` value replacement in "PRCP" column. +- Simplify `NA` value replacement in "PRCP" column. -* The PRCP column values are rounded to two decimal places as in original GSOD data, not one. +- The PRCP column values are rounded to two decimal places as in original GSOD data, not one. -* The TEMP_ATTRIBUTES, DEWP_ATTRIBUTES, SLP_ATTRIBUTES, STP_ATTRIBUTES, VISIB_ATTRIBUTES and WDSP_ATTRIBUTES columns are formatted as an integer not character. +- The TEMP_ATTRIBUTES, DEWP_ATTRIBUTES, SLP_ATTRIBUTES, STP_ATTRIBUTES, VISIB_ATTRIBUTES and WDSP_ATTRIBUTES columns are formatted as an integer not character. -* Better tests for the generated weather data `data.table` output checking values and formats. +- Better tests for the generated weather data `data.table` output checking values and formats. -* Tests are updated for updated data availability in the GSOD data due to continuous improvements to the data set. +- Tests are updated for updated data availability in the GSOD data due to continuous improvements to the data set. -* Standardise handling of author/contributor comments. -None have a full stop now in the comment. +- Standardise handling of author/contributor comments. + None have a full stop now in the comment. -* Use `on.exit()` to reset the working directory to the original user-space value after changing the working directory to untar files located in `tempdir()`. +- Use `on.exit()` to reset the working directory to the original user-space value after changing the working directory to untar files located in `tempdir()`. # GSODR 3.1.1 ## Bug fixes -* Fixes bug reported in [#84](https://github.com/ropensci/GSODR/issues/84) in the FRSHTT columns where the values were all reported as `NA` even if there were observed values. +- Fixes bug reported in [#84](https://github.com/ropensci/GSODR/issues/84) in the FRSHTT columns where the values were all reported as `NA` even if there were observed values. -* Fixes bug where NA values reported as 99.99, 999.9 or 9999.9 were not replaced with `NA`. +- Fixes bug where NA values reported as 99.99, 999.9 or 9999.9 were not replaced with `NA`. -* Fix bug where FRSHTT (Fog, Rain/Drizzle, Snow/Ice, Hail, Tornado, Thunder) column values split into the respective columns only returned `NA`, not the proper values as expected. -Reported in [#84](https://github.com/ropensci/GSODR/issues/84). +- Fix bug where FRSHTT (Fog, Rain/Drizzle, Snow/Ice, Hail, Tornado, Thunder) column values split into the respective columns only returned `NA`, not the proper values as expected. + Reported in [#84](https://github.com/ropensci/GSODR/issues/84). ## Minor changes -* Examples are no longer wrapped in `\donttest{}` but use `@examplesIf interactive()` instead. +- Examples are no longer wrapped in `\donttest{}` but use `@examplesIf interactive()` instead. # GSODR 3.1.0 ## New features -* Include columns for COUNTRY_NAME (country name in English), ISO2C and ISO3C in the final output from `get_GSOD()` and `reformat_GSOD()`. +- Include columns for COUNTRY_NAME (country name in English), ISO2C and ISO3C in the final output from `get_GSOD()` and `reformat_GSOD()`. -* Diffs in the isd_history are now recorded in the `/data-raw/fetch_isd-history.md` file and shipped with GSODR as `isd_history.rda`, which can be viewed by using `load(system.file("extdata", "isd_diff.rda", package = "GSODR"))`. +- Diffs in the isd_history are now recorded in the `/data-raw/fetch_isd-history.md` file and shipped with GSODR as `isd_history.rda`, which can be viewed by using `load(system.file("extdata", "isd_diff.rda", package = "GSODR"))`. -* Update and improve documentation to reflect country name and ISO code columns. +- Update and improve documentation to reflect country name and ISO code columns. ## Minor improvements -* Update NCEI data usage statement. +- Update NCEI data usage statement. # GSODR 3.0.0 ## Breaking changes -* Remove parallel processing functionality. -A bug that I was unable to properly debug with `future.apply::future_lapply()` caused the `get_GSOD()` and `reformat_GSOD()` functions to run without completing or responding was fixed by simply using R's base `lapply()` function. -If parallel processing is needed, users should implement their own solutions to download and process in parallel. +- Remove parallel processing functionality. A bug that I was unable to properly debug with `future.apply::future_lapply()` caused the `get_GSOD()` and `reformat_GSOD()` functions to run without completing or responding was fixed by simply using R's base `lapply()` function. If parallel processing is needed, users should implement their own solutions to download and process in parallel. ## Bug fixes -* Fix bug that caused the package to run without responding. +- Fix bug that caused the package to run without responding. -* Fix test that failed on CRAN's Solaris server for some reason. +- Fix test that failed on CRAN's Solaris server for some reason. -* Removes a working DOI link from the reference for the equation used because win-builder checks say it doesn't work (even though it does and there's nothing wrong with the link any time I check). +- Removes a working DOI link from the reference for the equation used because win-builder checks say it doesn't work (even though it does and there's nothing wrong with the link any time I check). # GSODR 2.1.2 ## Bug fixes -* Fix bug where `nearest_stations()` did not always return the nearest station as the first value in the vector +- Fix bug where `nearest_stations()` did not always return the nearest station as the first value in the vector ## Minor changes -* Update internal isd-history database, adding 11 stations +- Update internal isd-history database, adding 11 stations -* Fix any links that redirect found in DESCRIPTION, documentation or other materials in the package +- Fix any links that redirect found in DESCRIPTION, documentation or other materials in the package # GSODR 2.1.1 -## Bug fixes +## Bug fixes -* Fix bug where station metadata files could not be updated +- Fix bug where station metadata files could not be updated ## Minor changes -* Update internal station list to latest +- Update internal station list to latest -* Correct an error in documentation for `update_station_list()` +- Correct an error in documentation for `update_station_list()` -* Remove spatial vignettes to slim down Suggests and make CI maintenance easier +- Remove spatial vignettes to slim down Suggests and make CI maintenance easier # GSODR v2.1.0 ## Major changes -* Implement new calculations for EA, ES and RH using improved August-Roche-Magnus approximation (Alduchov & Eskridge 1996). -HT Rich Iannone for his use in [stationaRy](https://cran.r-project.org/package=stationaRy). -This will result in different EA, ES and RH calculations from the prior versions of GSODR. -However, this new implementation should be more accurate as discussed in (Alduchov & Eskridge 1996). +- Implement new calculations for EA, ES and RH using improved August-Roche-Magnus approximation (Alduchov & Eskridge 1996). HT Rich Iannone for his use in [stationaRy](https://cran.r-project.org/package=stationaRy). This will result in different EA, ES and RH calculations from the prior versions of GSODR. However, this new implementation should be more accurate as discussed in (Alduchov & Eskridge 1996). -> Alduchov, O.A. and Eskridge, R.E., 1996. Improved Magnus form approximation of saturation vapor pressure. Journal of Applied Meteorology and Climatology, 35(4), pp.601-609. +> Alduchov, O.A. +> and Eskridge, R.E., 1996. +> Improved Magnus form approximation of saturation vapor pressure. +> Journal of Applied Meteorology and Climatology, 35(4), pp.601-609. ## Minor changes -* Update internal station list to latest +- Update internal station list to latest -* Enhanced documentation +- Enhanced documentation # GSODR v2.0.1 - + ## Bug fixes -* Corrects internal bug that provided a warning message when GSOD files were parsed +- Corrects internal bug that provided a warning message when GSOD files were parsed -* Fixes bug where not all files downloaded were cleaned up on the function exit when fetching station inventories +- Fixes bug where not all files downloaded were cleaned up on the function exit when fetching station inventories -* Fixes bug where station inventories from `get_inventory()` lacked the location metadata, _i.e._ country and other geographic information +- Fixes bug where station inventories from `get_inventory()` lacked the location metadata, *i.e.* country and other geographic information ## Minor changes -* Update vignette to use latest functions from tidyr, _i.e._ `tidyr::pivot_longer()` +- Update vignette to use latest functions from tidyr, *i.e.* `tidyr::pivot_longer()` -* Update internal station list to latest +- Update internal station list to latest -* Tidy up documentation, mainly fix functions' title capitalisation +- Tidy up documentation, mainly fix functions' title capitalisation -* `get_GSOD()` checks the number of stations being requested. -If the number is \>10, the entire annual file will be downloaded and requested stations will then -be selected and returned. -This saves time by reducing the number of requests made to the server. -Users should not see any difference other than quicker responses for a large number of requested stations. +- `get_GSOD()` checks the number of stations being requested. + If the number is \>10, the entire annual file will be downloaded and requested stations will then be selected and returned. + This saves time by reducing the number of requests made to the server. + Users should not see any difference other than quicker responses for a large number of requested stations. ## Major changes -* Requires R >= 3.5.0 due to the storage of .Rds files using the latest version +- Requires R \>= 3.5.0 due to the storage of .Rds files using the latest version # GSODR 2.0.0 ## Bug fixes -* `get_GSOD()` now uses https rather than FTP server, correcting bug where the -data could not be downloaded any longer +- `get_GSOD()` now uses https rather than FTP server, correcting bug where the data could not be downloaded any longer ## Major changes -* Corrected elevation values are no longer available from GSODR +- Corrected elevation values are no longer available from GSODR -* Objects are returned as `data.table` objects +- Objects are returned as `data.table` objects ## Minor changes -* `get_inventory()` now uses https rather than FTP server +- `get_inventory()` now uses https rather than FTP server -* `update_station_list()` now uses https rather than FTP server +- `update_station_list()` now uses https rather than FTP server -* Implement better error handling when attempting to fetch station inventories +- Implement better error handling when attempting to fetch station inventories -* Reduced package dependencies +- Reduced package dependencies -* Improved vignettes that are pre-compiled for faster package installation and -updated content with linting and error corrections +- Improved vignettes that are pre-compiled for faster package installation and updated content with linting and error corrections -* Users may now specify country by FIPS code when using `get_GSOD()` +- Users may now specify country by FIPS code when using `get_GSOD()` -* Improved test coverage +- Improved test coverage -* Update internal database of station locations +- Update internal database of station locations # GSODR 1.3.2 ## Bug fixes -* Fixes a bug where extra data could be appended to data frame. See -. -This also means that when you are retrieving large amounts of data, _e.g._ global data for 20+ years, you won't fill up your hard disk space due to the raw data before processing. +- Fixes a bug where extra data could be appended to data frame. See . This also means that when you are retrieving large amounts of data, *e.g.* global data for 20+ years, you won't fill up your hard disk space due to the raw data before processing. ## Minor changes -* Update internal database of station locations +- Update internal database of station locations # GSODR 1.3.1 ## Bug fixes -* Fix examples that did not run properly +- Fix examples that did not run properly ## Minor changes -* Update internal database of station locations +- Update internal database of station locations # GSODR 1.3.0 ## New Functionality -* Use `future_apply` in processing files after downloading. -This allows for end users to use a parallel process of their choice. +- Use `future_apply` in processing files after downloading. This allows for end users to use a parallel process of their choice. # GSODR 1.2.3 ## Bug fixes -* Refactor internal functionality to be more clear and efficient in execution +- Refactor internal functionality to be more clear and efficient in execution - * `country-list` is not loaded unless user has specified a country in - `get_GSOD()` + - `country-list` is not loaded unless user has specified a country in `get_GSOD()` - * An instance where the FIPS code was determined twice was removed + - An instance where the FIPS code was determined twice was removed -* Replace `\dontrun{}` with `\donttest{}` in documentation examples +- Replace `\dontrun{}` with `\donttest{}` in documentation examples -* Ensure that DESCRIPTION file follows CRAN guidelines +- Ensure that DESCRIPTION file follows CRAN guidelines ## Minor changes -* Format help files, fixing errors and formatting for attractiveness +- Format help files, fixing errors and formatting for attractiveness -* Update internal database of station locations +- Update internal database of station locations -* Store internal database of station locations fields `BEGIN` and `END` as - integer, not double +- Store internal database of station locations fields `BEGIN` and `END` as integer, not double -* Clarify code of conduct statement in README that it only applies to this, - GSODR, project +- Clarify code of conduct statement in README that it only applies to this, GSODR, project -* Prompt user for input with warning about reproducibility if using the - `update_station_list()` function +- Prompt user for input with warning about reproducibility if using the `update_station_list()` function -* Adds metadata header to the `tibble` returned by `get_inventory()` +- Adds metadata header to the `tibble` returned by `get_inventory()` -* Remove start-up message to conform with rOpenSci guidelines +- Remove start-up message to conform with rOpenSci guidelines -* Remove extra code, clean up code-chunks and use `hrbrthemes::theme_ipsum()` - for - [data-raw/fetch_isd-history.md](https://github.com/ropensci/GSODR/blob/main/data-raw/fetch_isd-history.md) +- Remove extra code, clean up code-chunks and use `hrbrthemes::theme_ipsum()` for [data-raw/fetch_isd-history.md](https://github.com/ropensci/GSODR/blob/main/data-raw/fetch_isd-history.md) # GSODR 1.2.2 ## Bug fixes - * Fix bug in creating `isd-history.rda` file where duplicate stations existed - in the file distributed with `GSODR` but with different corrected elevation - values +- Fix bug in creating `isd-history.rda` file where duplicate stations existed in the file distributed with `GSODR` but with different corrected elevation values - * Repatch bug reported and fixed previously in version 1.2.0 where Windows - users could not successfully download files. This somehow snuck back in. +- Repatch bug reported and fixed previously in version 1.2.0 where Windows users could not successfully download files. + This somehow snuck back in. ## Minor changes - * Refactor vignettes for clarity +- Refactor vignettes for clarity # GSODR 1.2.1 ## Bug fixes - * Introduce a message if a station ID is requested but files are not found - on the server. +- Introduce a message if a station ID is requested but files are not found on the server. This is in response to an inquiry from John Paul Bigouette where a station is reported as having data in the inventory but the files do not exist on the server. - * Fix bug that removed a few hundred stations from the internal `GSODR` database of stations in the `data-raw` files. +- Fix bug that removed a few hundred stations from the internal `GSODR` database of stations in the `data-raw` files. ## Minor changes - * Clean documentation, shortening long lines, fixing formatting, - incomplete sentences and broken links +- Clean documentation, shortening long lines, fixing formatting, incomplete sentences and broken links - * Clarify the reasons for errors that a user may encounter +- Clarify the reasons for errors that a user may encounter - * Update internal databases of station metadata +- Update internal databases of station metadata - * Clean up this file +- Clean up this file # GSODR 1.2.0 ## Major changes - * Remove ability to export files from `get_GSOD()` to slim down the package - dependencies and this functions parameters. - Examples of how to convert to a spatial object (both _sp_ and _sf_ are shown) and export ESRI Shapefiles and - GeoPackage files are now included in the vignette. +- Remove ability to export files from `get_GSOD()` to slim down the package dependencies and this functions parameters. + Examples of how to convert to a spatial object (both *sp* and *sf* are shown) and export ESRI Shapefiles and GeoPackage files are now included in the vignette. - * As a result of the previous point, the _sp_ and _rgdal_ packages are no longer Imports but are now in Suggests along with _sf_ for examples in the GSOD vignette. +- As a result of the previous point, the *sp* and *rgdal* packages are no longer Imports but are now in Suggests along with *sf* for examples in the GSOD vignette. ## Bug fixes - * Fix a nasty bug where GSOD files downloaded using Windows would not untar properly. - This caused the `get_GSOD()` function to fail. - Thanks to Ross Darnell, CSIRO, for reporting this. +- Fix a nasty bug where GSOD files downloaded using Windows would not untar properly. + This caused the `get_GSOD()` function to fail. + Thanks to Ross Darnell, CSIRO, for reporting this. - * Correct options in "GSODR use case: Specified years/stations vignette" on line 201 where `file` was incorrectly used in place of `path`. - Thanks to Ross Darnell, CSIRO, for reporting this. +- Correct options in "GSODR use case: Specified years/stations vignette" on line 201 where `file` was incorrectly used in place of `path`. + Thanks to Ross Darnell, CSIRO, for reporting this. - * Correct documentation for `reformat_GSOD()` +- Correct documentation for `reformat_GSOD()` ## Minor changes - * Update internal databases of station metadata +- Update internal databases of station metadata - * Vignettes contain pre-built figures for faster package installation when building vignettes +- Vignettes contain pre-built figures for faster package installation when building vignettes # GSODR 1.1.2 ## Bug fixes - * Fix start-up message formatting +- Fix start-up message formatting - * Correct ORCID comment in author field of DESCRIPTION +- Correct ORCID comment in author field of DESCRIPTION - * Update internal databases for country list and isd_history +- Update internal databases for country list and isd_history ## Minor changes - * Add X-schema tags to DESCRIPTION +- Add X-schema tags to DESCRIPTION # GSODR 1.1.1 ## Bug fixes - * `MAX_FLAG` and `MIN_FLAG` columns now report `NA` when there is no flag +- `MAX_FLAG` and `MIN_FLAG` columns now report `NA` when there is no flag ## Minor changes - * Comment for Bob and Hugh in DESCRIPTION now only ORCID url +- Comment for Bob and Hugh in DESCRIPTION now only ORCID url - * dplyr version set to >= 0.7.0 not 0.7 as before +- dplyr version set to \>= 0.7.0 not 0.7 as before - * Start-up message statement is more clear in relation to WMO resolution 40, that GSODR does not redistribute any weather data itself +- Start-up message statement is more clear in relation to WMO resolution 40, that GSODR does not redistribute any weather data itself - * Remove unnecessary function, .onLoad(), from zzz.R +- Remove unnecessary function, .onLoad(), from zzz.R - * Function titles in documentation now in title case +- Function titles in documentation now in title case - * Correct grammar in documentation +- Correct grammar in documentation # GSODR 1.1.0 ## Bug fixes - * Fixes bug reported in - [issue 36](https://github.com/ropensci/GSODR/issues/36) +- Fixes bug reported in [issue 36](https://github.com/ropensci/GSODR/issues/36) ## Major changes - * The _data.table_ and _fields_ packages are no longer imported. - All internal functions now use _dplyr_ or base R functionality, reducing the dependencies of _GSODR_ +- The *data.table* and *fields* packages are no longer imported. + All internal functions now use *dplyr* or base R functionality, reducing the dependencies of *GSODR* - * Any data frames returned by _GSODR_ functions are returned as a `tibble()` object +- Any data frames returned by *GSODR* functions are returned as a `tibble()` object - * The `YEARMODA` column is now returned as `Date` without time, rather than `Character` +- The `YEARMODA` column is now returned as `Date` without time, rather than `Character` - * Add new function, `get_inventory()`, which downloads the NCEI's station inventory document and returns a `tibble()` object of the data +- Add new function, `get_inventory()`, which downloads the NCEI's station inventory document and returns a `tibble()` object of the data - * Use larger images and provide a table of contents in vignettes +- Use larger images and provide a table of contents in vignettes - * Updated and enhanced introductory vignette +- Updated and enhanced introductory vignette - * Update internal stations list +- Update internal stations list # GSODR 1.0.7 ## Bug fixes - * Fix documentation in vignette where first example would not run due to changes in package data formats +- Fix documentation in vignette where first example would not run due to changes in package data formats - * Fix bug in GSODR vignette where examples would not run due to libraries not being loaded +- Fix bug in GSODR vignette where examples would not run due to libraries not being loaded - * Fix bug where prior server queries would be pre/appended to subsequent queries +- Fix bug where prior server queries would be pre/appended to subsequent queries - * Fix bug where invalid stations would return an empty data frame, should stop and return message about checking the `station` value supplied to `get_GSOD()` and check if data are available for the years requested +- Fix bug where invalid stations would return an empty data frame, should stop and return message about checking the `station` value supplied to `get_GSOD()` and check if data are available for the years requested ## Minor changes - * Update Appendix 2 of GSODR vignette, map of station locations, to be more clear and follow same format as that of `bomrang` package +- Update Appendix 2 of GSODR vignette, map of station locations, to be more clear and follow same format as that of `bomrang` package - * Update example output in GSODR vignette where applicable +- Update example output in GSODR vignette where applicable ## Major changes - * Update internal stations list - +- Update internal stations list # GSODR 1.0.6 ## Bug fixes - * Fix bug where WSPD (mean wind-speed) conversion was miscalculated +- Fix bug where WSPD (mean wind-speed) conversion was miscalculated # GSODR 1.0.5 ## Major changes - * Add welcome message on start-up regarding data use and sharing +- Add welcome message on start-up regarding data use and sharing - * Update internal stations list +- Update internal stations list ## Minor changes - * Tidy up informative messages that the package returns while running +- Tidy up informative messages that the package returns while running ## Bug fixes - * Fix bug where "Error in read_connection_(con):" when writing to CSV occurs +- Fix bug where "Error in read_connection\_(con):" when writing to CSV occurs - * Fix typo in line 160 of `get_GSOD()` where "Rda" should be "rda" to properly load internal package files +- Fix typo in line 160 of `get_GSOD()` where "Rda" should be "rda" to properly load internal package files # GSODR 1.0.4 ## Major changes - * Data distributed with GSODR are now internal to the package and not externally exposed to the user +- Data distributed with GSODR are now internal to the package and not externally exposed to the user - * Vignettes have been updated and improved with an improved order of information presented and some have been combined for easier use +- Vignettes have been updated and improved with an improved order of information presented and some have been combined for easier use ## Minor changes - * Clean code using linting +- Clean code using linting # GSODR 1.0.3 ## Major changes - * Data for station locations and unique identifiers is now provided with the package on installation. Previously this was fetched each time from the ftp server. +- Data for station locations and unique identifiers is now provided with the package on installation. + Previously this was fetched each time from the ftp server. - * The station metadata can now be updated if necessary by using `update_station_list()`, this change overwrites the internal data that were originally distributed with the package. - This operation will fetch the latest list of stations and corresponding information from the NCEI ftp - server. +- The station metadata can now be updated if necessary by using `update_station_list()`, this change overwrites the internal data that were originally distributed with the package. + This operation will fetch the latest list of stations and corresponding information from the NCEI ftp server. Any changes will be overwritten when the R package is updated, however, the package update should have the same or newer data included, so this should not be an issue. - * Replace _plyr_ functions with _purrr_, _plyr_ is no longer actively developed +- Replace *plyr* functions with *purrr*, *plyr* is no longer actively developed - * _plyr_ is no longer an import +- *plyr* is no longer an import ## Minor changes - * Fix bugs in the vignettes related to formatting and spelling +- Fix bugs in the vignettes related to formatting and spelling ## Deprecated and defunct - * `get_station_list()` is no longer supported. Instead use the new +- `get_station_list()` is no longer supported. + Instead use the new - * `update_station_list()` to update the package's internal station database. +- `update_station_list()` to update the package's internal station database. # GSODR 1.0.2.1 ## Minor changes - * Correct references to _GSODRdata_ package where incorrectly referred to as _GSODdata_ +- Correct references to *GSODRdata* package where incorrectly referred to as *GSODdata* # GSODR 1.0.2 ## Minor changes - * Improved documentation (i.e., spelling corrections and more descriptive) +- Improved documentation (i.e., spelling corrections and more descriptive) - * More descriptive vignette for "GSODR use case: Specified years/stations vignette" +- More descriptive vignette for "GSODR use case: Specified years/stations vignette" - * Round MAX/MIN temp to one decimal place, not two +- Round MAX/MIN temp to one decimal place, not two - * Update SRTM elevation data +- Update SRTM elevation data - * Update country list data +- Update country list data - * Fix missing images in README.html on CRAN +- Fix missing images in README.html on CRAN # GSODR 1.0.1 ## Minor changes - * Update documentation for `get_GSOD()` when using `station` parameter +- Update documentation for `get_GSOD()` when using `station` parameter - * Edit paper.md for submission to JOSS +- Edit paper.md for submission to JOSS - * Remove extra packages listed as dependencies that are no longer necessary +- Remove extra packages listed as dependencies that are no longer necessary - * Correct Working_with_spatial_and_climate_data.Rmd where it was missing the first portion of documentation and thus examples did not work +- Correct Working_with_spatial_and_climate_data.Rmd where it was missing the first portion of documentation and thus examples did not work # GSODR 1.0.0 ## Major changes - * The `get_GSOD()` function returns a `data.frame` object in the current R session with the option to save data to local disk +- The `get_GSOD()` function returns a `data.frame` object in the current R session with the option to save data to local disk - * Multiple stations can be specified for download rather than just downloading a single station or all stations +- Multiple stations can be specified for download rather than just downloading a single station or all stations - * A new function, `nearest_stations()` is now included to find stations within a user specified radius (in kilometres) of a point given as latitude and longitude in decimal degrees +- A new function, `nearest_stations()` is now included to find stations within a user specified radius (in kilometres) of a point given as latitude and longitude in decimal degrees - * A general use vignette is now included +- A general use vignette is now included - * New vignette with a detailed use-case +- New vignette with a detailed use-case - * Output files now include fields for State (US only) and Call (International Civil Aviation Organization (ICAO) Airport Code) +- Output files now include fields for State (US only) and Call (International Civil Aviation Organization (ICAO) Airport Code) - * Use FIPS codes in place of ISO3c for file name and in output files because some stations do not have an ISO country code +- Use FIPS codes in place of ISO3c for file name and in output files because some stations do not have an ISO country code - * Spatial file output is now in GeoPackage format (GPKG). This results in a single file output unlike shapefile and allows for long field names +- Spatial file output is now in GeoPackage format (GPKG). + This results in a single file output unlike shapefile and allows for long field names - * Users can specify file name of output +- Users can specify file name of output - * R >= 3.2.0 now required +- R \>= 3.2.0 now required - * Field names in output files use "\_" in place of "." +- Field names in output files use "\_" in place of "." - * Long field names now used in file outputs +- Long field names now used in file outputs - * Country is specified using FIPS codes in file name and output file contents due to stations occurring in some locales that lack ISO 3166 3 letter country codes +- Country is specified using FIPS codes in file name and output file contents due to stations occurring in some locales that lack ISO 3166 3 letter country codes - * The `get_GSOD()` function will retrieve the latest station data from NCDC and automatically merge it with the CGIAR-CSI SRTM elevation values provided by this package. Previously, the package provided it's own list of station information, which was difficult to keep up-to-date +- The `get_GSOD()` function will retrieve the latest station data from NCDC and automatically merge it with the CGIAR-CSI SRTM elevation values provided by this package. + Previously, the package provided it's own list of station information, which was difficult to keep up-to-date - * A new `reformat_GSOD()` function reformats station files in "WMO-WBAN-YYYY.op.gz" format that have been downloaded from the United States National Climatic Data Center's (NCDC) FTP server. +- A new `reformat_GSOD()` function reformats station files in "WMO-WBAN-YYYY.op.gz" format that have been downloaded from the United States National Climatic Data Center's (NCDC) FTP server. - * A new function, `get_station_list()` allows for fetching latest station list from the FTP server and querying by the user for a specified station or location. +- A new function, `get_station_list()` allows for fetching latest station list from the FTP server and querying by the user for a specified station or location. - * New data layers are provided through a separate package, [`GSODRdata`](https://github.com/adamhsparks/GSODRdata), which provide - climate data formatted for use with GSODR. +- New data layers are provided through a separate package, [`GSODRdata`](https://github.com/adamhsparks/GSODRdata), which provide climate data formatted for use with GSODR. - * CHELSA (climatic surfaces at 1 km resolution), + - CHELSA (climatic surfaces at 1 km resolution), - * MODCF * Remotely sensed high-resolution global cloud dynamics for predicting ecosystem and biodiversity distributions, + - MODCF \* Remotely sensed high-resolution global cloud dynamics for predicting ecosystem and biodiversity distributions, - * ESACCI * ESA's CCI-LC snow cover probability and + - ESACCI \* ESA's CCI-LC snow cover probability and - * CRU CL2.0 (climatic surfaces at 10 minute resolution). + - CRU CL2.0 (climatic surfaces at 10 minute resolution). - * Improved file handling for individual station downloads +- Improved file handling for individual station downloads - * Missing values are handled as `NA` not -9999 +- Missing values are handled as `NA` not -9999 - * Change from GPL >= 3 to MIT licence to bring into line with ropensci packages +- Change from GPL \>= 3 to MIT licence to bring into line with ropensci packages - * Now included in ropensci, [ropensci/GSODR](https://github.com/ropensci/GSODR) +- Now included in ropensci, [ropensci/GSODR](https://github.com/ropensci/GSODR) ## Minor changes - * `get_GSOD()` function optimised for speed as best possible after FTPing files from NCDC server +- `get_GSOD()` function optimised for speed as best possible after FTPing files from NCDC server - * All files are downloaded from server and then locally processed, previously these were sequentially downloaded by year and then processed +- All files are downloaded from server and then locally processed, previously these were sequentially downloaded by year and then processed - * A progress bar is now shown when processing files locally after downloading +- A progress bar is now shown when processing files locally after downloading - * Reduced package dependencies +- Reduced package dependencies - * The `get_GSOD()` function now checks stations to see if the years being queried are provided and returns a message alerting user if the station and years requested are not available +- The `get_GSOD()` function now checks stations to see if the years being queried are provided and returns a message alerting user if the station and years requested are not available - * When stations are specified for retrieval using the `station = ""` parameter, the `get_GSOD()` function now checks to see if the file exists on the server, if it does not, a message is returned and all other stations that have files are processed and returned in output +- When stations are specified for retrieval using the `station = ""` parameter, the `get_GSOD()` function now checks to see if the file exists on the server, if it does not, a message is returned and all other stations that have files are processed and returned in output - * Documentation has been improved throughout package +- Documentation has been improved throughout package - * Better testing of internal functions +- Better testing of internal functions ## Bug Fixes - * Fixed: Remove redundant code in `get_GSOD()` function +- Fixed: Remove redundant code in `get_GSOD()` function - * Fixed: The stations data frame distributed with the package now include stations that are located above 60 latitude and below -60 latitude +- Fixed: The stations data frame distributed with the package now include stations that are located above 60 latitude and below -60 latitude ## Deprecated and defunct - * Missing values are reported as NA for use in R, not -9999 as previously +- Missing values are reported as NA for use in R, not -9999 as previously - * The `path` parameter is now instead called `dsn` to be more inline with other tools like `readOGR()` and `writeOGR()` +- The `path` parameter is now instead called `dsn` to be more inline with other tools like `readOGR()` and `writeOGR()` - * Shapefile file out is no longer supported. Use GeoPackage (GPKG) instead +- Shapefile file out is no longer supported. + Use GeoPackage (GPKG) instead - * The option to remove stations with too many missing days is now optional, it now defaults to including all stations, the user must specify how many missing stations to check for an exclude +- The option to remove stations with too many missing days is now optional, it now defaults to including all stations, the user must specify how many missing stations to check for an exclude - * The `max_missing` parameter is now user set, defaults to no check, return all stations regardless of missing days +- The `max_missing` parameter is now user set, defaults to no check, return all stations regardless of missing days # GSODR 0.1.9 ## Bug Fixes - * Fix bug in precipitation calculation. Documentation states that PRCP is in mm to hundredths. - Issues with conversion and missing values meant that this was not the case. - Thanks to Gwenael Giboire for reporting and help with fixing this +- Fix bug in precipitation calculation. Documentation states that PRCP is in mm to hundredths. Issues with conversion and missing values meant that this was not the case. Thanks to Gwenael Giboire for reporting and help with fixing this ## Minor changes - * Users can now select to merge output for station queries across multiple years. Previously one year = one file per station. - Now are set by user, `merge_station_years = TRUE` parameter, only one output file is generated +- Users can now select to merge output for station queries across multiple years. + Previously one year = one file per station. + Now are set by user, `merge_station_years = TRUE` parameter, only one output file is generated - * Country list is now included in the package to reduce run time necessary when querying for a specific country. - However, this means any time that the country-list.txt file is updated, this package needs to be updated as well +- Country list is now included in the package to reduce run time necessary when querying for a specific country. + However, this means any time that the country-list.txt file is updated, this package needs to be updated as well - * Updated `stations` list with latest version from NCDC published 12-07-2016 +- Updated `stations` list with latest version from NCDC published 12-07-2016 - * Country list is now included in the package to reduce run time necessary when querying for a specific country. - However, this means any time that the country-list.txt file is updated, this package needs to be updated as well +- Country list is now included in the package to reduce run time necessary when querying for a specific country. + However, this means any time that the country-list.txt file is updated, this package needs to be updated as well - * Country level, agroclimatology and global data query conversions and calculations are processed in parallel now to reduce runtime +- Country level, agroclimatology and global data query conversions and calculations are processed in parallel now to reduce runtime - * Improved documentation with spelling fixes, clarification and updates +- Improved documentation with spelling fixes, clarification and updates - * Enable `ByteCompile` option upon installation for small increase in speed +- Enable `ByteCompile` option upon installation for small increase in speed - * Use `write.csv.raw` from - `[iotools]("https://cran.r-project.org/web/packages/iotools/index.html")` to greatly improve runtime by decreasing time used to write CSV files to disk +- Use `write.csv.raw` from `[iotools]("https://cran.r-project.org/web/packages/iotools/index.html")` to greatly improve runtime by decreasing time used to write CSV files to disk - * Use `writeOGR()` from `rgdal`, in place of `raster's` `shapefile` to improve runtime by decreasing time used to write shapefiles to disk +- Use `writeOGR()` from `rgdal`, in place of `raster's` `shapefile` to improve runtime by decreasing time used to write shapefiles to disk - * Country level, agroclimatology and global data query conversions and calculations are processed in parallel now to reduce runtime +- Country level, agroclimatology and global data query conversions and calculations are processed in parallel now to reduce runtime - * Improved documentation with spelling fixes, clarification and updates +- Improved documentation with spelling fixes, clarification and updates - * Enable `ByteCompile` option upon installation for small increase in speed +- Enable `ByteCompile` option upon installation for small increase in speed - * Use `write.csv.raw` from `[iotools]("https://cran.r-project.org/web/packages/iotools/index.html")` - to greatly improve runtime by decreasing time used to write CSV files to disk +- Use `write.csv.raw` from `[iotools]("https://cran.r-project.org/web/packages/iotools/index.html")` to greatly improve runtime by decreasing time used to write CSV files to disk # GSODR 0.1.8 ## Bug Fixes - * Fix bug with connection timing out for single station queries commit: [a126641e00dc7acc21844ff0436e5702f8b6e04a](https://github.com/ropensci/GSODR/commit/a126641e00dc7acc21844ff0436e5702f8b6e04a) +- Fix bug with connection timing out for single station queries commit: [a126641e00dc7acc21844ff0436e5702f8b6e04a](https://github.com/ropensci/GSODR/commit/a126641e00dc7acc21844ff0436e5702f8b6e04a) - * Somehow the previously working function that checked country names broke with the `toupper()` function. - A new [function from juba](https://stackoverflow.com/questions/16516593/convert-from-lowercase-to-uppercase-all-values-in-all-character-variables-in-dat) fixes this issue and users can now select country again +- Somehow the previously working function that checked country names broke with the `toupper()` function. + A new [function from juba](https://stackoverflow.com/questions/16516593/convert-from-lowercase-to-uppercase-all-values-in-all-character-variables-in-dat) fixes this issue and users can now select country again - * User entered values for a single station are now checked against actual station values for validity +- User entered values for a single station are now checked against actual station values for validity - * stations.rda is compressed +- stations.rda is compressed - * stations.rda now includes a field for "corrected" elevation using hole-filled SRTM data from Jarvis et al. 2008, see [https://github.com/ropensci/GSODR/blob/main/data-raw/fetch_isd-history.md](https://github.com/ropensci/GSODR/blob/devel/data-raw/fetch_isd-history.md) for a description +- stations.rda now includes a field for "corrected" elevation using hole-filled SRTM data from Jarvis et al. 2008, see [https://github.com/ropensci/GSODR/blob/main/data-raw/fetch_isd-history.md](https://github.com/ropensci/GSODR/blob/devel/data-raw/fetch_isd-history.md) for a description - * Set NA or missing values in CSV or shapefile to -9999 from -9999.99 to - align with other data sources such as WorldClim +- Set NA or missing values in CSV or shapefile to -9999 from -9999.99 to align with other data sources such as WorldClim ## Minor changes - * Documentation is more complete and easier to use +- Documentation is more complete and easier to use # GSODR 0.1.7 ## Bug Fixes - * Fix issues with MIN/MAX where MIN referred to MAX [(Issue 5)](https://github.com/ropensci/GSODR/issues/5) +- Fix issues with MIN/MAX where MIN referred to MAX [(Issue 5)](https://github.com/ropensci/GSODR/issues/5) - * Fix bug where the `tf` item was incorrectly set as `tf < * "~/tmp/GSOD-2010.tar`, not `tf < * tempfile`, in `get_GSOD()` [(Issue 6)](https://github.com/ropensci/GSODR/issues/6) +- Fix bug where the `tf` item was incorrectly set as `tf < * "~/tmp/GSOD-2010.tar`, not `tf < * tempfile`, in `get_GSOD()` [(Issue 6)](https://github.com/ropensci/GSODR/issues/6) - * CITATION file is updated and corrected +- CITATION file is updated and corrected ## Minor changes - * User now has the ability to generate a shapefile as well as CSV file output [(Issue 3)](https://github.com/ropensci/GSODR/issues/3) +- User now has the ability to generate a shapefile as well as CSV file output [(Issue 3)](https://github.com/ropensci/GSODR/issues/3) - * Documentation is more complete and easier to use +- Documentation is more complete and easier to use # GSODR 0.1.6 ## Bug Fixes - * Fix issue when reading .op files into R where temperature was incorrectly read causing negative values where T >= 100F, this issue caused RH values of >100% and incorrect TEMP values [(Issue 1)](https://github.com/ropensci/GSODR/issues/1) +- Fix issue when reading .op files into R where temperature was incorrectly read causing negative values where T \>= 100F, this issue caused RH values of \>100% and incorrect TEMP values [(Issue 1)](https://github.com/ropensci/GSODR/issues/1) - * Spelling corrections +- Spelling corrections ## Major changes - * Include MIN/MAX flag column +- Include MIN/MAX flag column - * Station data is now included in package rather than downloading from NCDC every time get_GSOD() is run, this data has some corrections where stations with missing LAT/LON values or elevation are omitted, this is **not** the original complete station list provided by NCDC. +- Station data is now included in package rather than downloading from NCDC every time get_GSOD() is run, this data has some corrections where stations with missing LAT/LON values or elevation are omitted, this is **not** the original complete station list provided by NCDC. # GSODR 0.1.5 ## Bug Fixes - * Fixed bug where YDAY not correctly calculated and reported in CSV file +- Fixed bug where YDAY not correctly calculated and reported in CSV file - * CSV files for station only queries now are names with the Station Identifier. - Previously named same as global data +- CSV files for station only queries now are names with the Station Identifier. + Previously named same as global data - * Likewise, CSV files for agroclimatology now are names with the Station Identifier. - Previously named same as global data. +- Likewise, CSV files for agroclimatology now are names with the Station Identifier. + Previously named same as global data. ## Minor Changes - * Set values where MIN > MAX to NA - - * Set more MIN/MAX/DEWP values to NA. - GSOD README indicates that 999 indicates missing values in these columns, this does not appear to always be true. - There are instances where 99 is the value recorded for missing data. - While 99F is possible, the vast majority of these recorded values are missing data, thus the function now converts them to NA +- Set values where MIN \> MAX to NA +- Set more MIN/MAX/DEWP values to NA. + GSOD README indicates that 999 indicates missing values in these columns, this does not appear to always be true. + There are instances where 99 is the value recorded for missing data. + While 99F is possible, the vast majority of these recorded values are missing data, thus the function now converts them to NA # GSODR 0.1.4 ## Bug Fixes - * Fixed bug related to MIN/MAX columns when agroclimatology or all stations are selected where flags were not removed properly from numeric values. +- Fixed bug related to MIN/MAX columns when agroclimatology or all stations are selected where flags were not removed properly from numeric values. # GSODR 0.1.3 ## Bug fixes - * Bug fix in MIN/MAX with flags. Some columns have differing widths, which caused a flag to be left attached to some values +- Bug fix in MIN/MAX with flags. + Some columns have differing widths, which caused a flag to be left attached to some values - * Correct URL in README.md for CRAN to point to CRAN not GitHub +- Correct URL in README.md for CRAN to point to CRAN not GitHub ## Minor Changes - * Set NA to -9999.99 +- Set NA to -9999.99 # GSODR 0.1.2 ## Bug Fixes - * Bug fix in importing isd-history.csv file. Previous issues caused all lat/lon/elev values to be >0. +- Bug fix in importing isd-history.csv file. + Previous issues caused all lat/lon/elev values to be \>0. - * Bug fix where WDSP was mistyped as WDPS causing the creation of a new column, rather than the conversion of the existing +- Bug fix where WDSP was mistyped as WDPS causing the creation of a new column, rather than the conversion of the existing - * Bug fix if Agroclimatology selected. Previously this resulted in no records. +- Bug fix if Agroclimatology selected. + Previously this resulted in no records. - * Set the default encoding to UTF8. +- Set the default encoding to UTF8. - * Bug fix for country selection. Some countries did not return proper ISO code. +- Bug fix for country selection. + Some countries did not return proper ISO code. - * Bug fix where WDSP was mistyped as WDPS causing the creation of a new column, rather than the conversion of the existing +- Bug fix where WDSP was mistyped as WDPS causing the creation of a new column, rather than the conversion of the existing - * Use write.csv, not readr::write_csv due to issue converting double to string: +- Use write.csv, not readr::write_csv due to issue converting double to string: # GSODR 0.1.1 ## Major changes -* Now available on CRAN +- Now available on CRAN -* Add single quotes around possibly misspelled words and spell out comma-separated values and geographic information system rather than just using "CSV" or "GIS" in DESCRIPTION. +- Add single quotes around possibly misspelled words and spell out comma-separated values and geographic information system rather than just using "CSV" or "GIS" in DESCRIPTION. -* Add full name of GSOD (Global Surface Summary of the Day) and URL for GSOD, to DESCRIPTION as requested by CRAN. +- Add full name of GSOD (Global Surface Summary of the Day) and URL for GSOD, to DESCRIPTION as requested by CRAN. -* Require user to specify directory for resulting .csv file output so that any files written to disk are interactive and with user's permission +- Require user to specify directory for resulting .csv file output so that any files written to disk are interactive and with user's permission # GSODR 0.1 -* Initial submission to CRAN +- Initial submission to CRAN diff --git a/R/get_GSOD.R b/R/get_GSOD.R index 624162ef..2cfac335 100644 --- a/R/get_GSOD.R +++ b/R/get_GSOD.R @@ -27,7 +27,7 @@ #' \code{vignette("GSODR", package = "GSODR")}. #' #' For more information see the description of the data provided by -#' \acronym{NCEI}, \url{https://www7.ncdc.noaa.gov/CDO/GSOD_DESC.txt}. +#' \acronym{NCEI}, \url{https://www.ncei.noaa.gov/data/global-summary-of-the-day/doc/readme.txt}. #' #' @param years Year(s) of weather data to download. #' @param station Optional. Specify a station or multiple stations for which to diff --git a/R/internal_functions.R b/R/internal_functions.R index 27ebf2b1..9fb39238 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -6,7 +6,7 @@ #' @return None unless error in years being requested by users #' @noRd .validate_years <- function(years) { - if (class(years) == "character") { + if (inherits(years, what = "character")) { stop(call. = FALSE, "Years must be entered as a numeric value.") } @@ -23,6 +23,7 @@ "\nThe year cannot be greater than current year.\n") } } + return(invisible(NULL)) } @@ -48,9 +49,9 @@ ) } BEGIN <- - as.numeric(substr(isd_history[isd_history$STNID == station,]$BEGIN, 1, 4)) + as.numeric(substr(isd_history[isd_history$STNID == station, ]$BEGIN, 1, 4)) END <- - as.numeric(substr(isd_history[isd_history$STNID == station,]$END, 1, 4)) + as.numeric(substr(isd_history[isd_history$STNID == station, ]$END, 1, 4)) if (min(years) < BEGIN | max(years) > END) { message("\nThis station, ", station, @@ -60,6 +61,7 @@ END, ".\n") } + return(invisible(NULL)) } @@ -105,6 +107,7 @@ "letter ISO country code\n") } } + return(country) } @@ -263,7 +266,7 @@ .agroclimatology_list <- function(file_list, isd_history, years) { station_list <- isd_history[isd_history$LAT >= -60 & - isd_history$LAT <= 60,]$STNID + isd_history$LAT <= 60, ]$STNID station_list <- gsub("-", "", station_list) station_list <- @@ -294,7 +297,7 @@ isd_history, years) { station_list <- - isd_history[isd_history$CTRY == country,]$STNID + isd_history[isd_history$CTRY == country, ]$STNID station_list <- gsub("-", "", station_list) station_list <- CJ(years, sorted = FALSE)[, paste0(tempdir(), diff --git a/R/process_csv.R b/R/process_csv.R index a1dbf0de..99f4e9e8 100644 --- a/R/process_csv.R +++ b/R/process_csv.R @@ -103,8 +103,8 @@ DT[, MONTH := as.integer(substr(DATE, 6, 7))] DT[, DAY := as.integer(substr(DATE, 9, 10))] DT[, YDAY := as.integer(strftime(as.Date(DATE), format = "%j"))] - - # Convert *_ATTRIBUTES cols to integer --------------------------------------- + + # Convert *_ATTRIBUTES cols to integer --------------------------------------- for (col in names(DT)[names(DT) %in% c("TEMP_ATTRIBUTES", "DEWP_ATTRIBUTES", "SLP_ATTRIBUTES", @@ -113,7 +113,7 @@ "WDSP_ATTRIBUTES")]) { set(DT, j = col, value = as.integer(DT[[col]])) } - + # Drop unnecessary columns --------------------------------------------------- DT[, c("DATE", "STATION") := NULL] diff --git a/R/update_station_list.R b/R/update_station_list.R index 2f4488eb..4803d919 100644 --- a/R/update_station_list.R +++ b/R/update_station_list.R @@ -85,16 +85,16 @@ update_station_list <- function() { isd_history[isd_history == -999.9] <- NA isd_history <- isd_history[!is.na(isd_history$LAT) & - !is.na(isd_history$LON),] + !is.na(isd_history$LON), ] isd_history <- isd_history[isd_history$LAT != 0 & - isd_history$LON != 0,] + isd_history$LON != 0, ] isd_history <- isd_history[isd_history$LAT > -90 & - isd_history$LAT < 90,] + isd_history$LAT < 90, ] isd_history <- isd_history[isd_history$LON > -180 & - isd_history$LON < 180,] + isd_history$LON < 180, ] # set colnames to upper case names(isd_history) <- toupper(names(isd_history)) diff --git a/README.md b/README.md index 5498cf24..52b14cba 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![tic](https://github.com/ropensci/GSODR/workflows/tic/badge.svg?branch=main)](https://github.com/ropensci/GSODR/actions) -[![codecov](https://codecov.io/gh/ropensci/GSODR/branch/main/graph/badge.svg)](https://codecov.io/gh/ropensci/GSODR) +[![codecov](https://app.codecov.io/gh/ropensci/GSODR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci/GSODR) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.439850.svg)](https://doi.org/10.5281/zenodo.439850) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/GSODR)](https://cran.r-project.org/package=GSODR) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) @@ -36,7 +36,7 @@ File output is returned as a `data.table` object, summarising each year by stati Additional data are calculated by this R package using the original data and included in the final data. These include vapour pressure (ea and es) and relative humidity calculated using the improved August-Roche-Magnus approximation (Alduchov and Eskridge 1996). -For more information see the description of the data provided by NCEI, . +For more information see the description of the data provided by NCEI, . ## How to Install @@ -89,11 +89,12 @@ The user is required to have an Internet connection, and a current CliFlo subscr ### NOAA policy -Users of these data should take into account the following (from the -[NCEI website](https://www7.ncdc.noaa.gov/CDO/cdoselect.cmd?datasetabbv=GSOD&countryabbv=&georegionabbv=)): +Users of these data should take into account the following: -> The following data and products may have conditions placed on their international commercial use. They can be used within the U.S. or for non-commercial international activities without restriction. The non-U.S. data cannot be redistributed for commercial purposes. Re-distribution of these data by others must provide this same notification. A log of IP addresses accessing these data and products will be maintained and may be made available to data providers. -For details, please consult: [WMO Resolution 40. NOAA Policy](https://community.wmo.int/resolution-40) +> The data summaries provided here are based on data exchanged under the World Meteorological Organization (WMO) World Weather Watch Program according to WMO Resolution 40 (Cg-XII). This allows WMO member countries to place restrictions on the use or re-export of their data for commercial purposes outside of the receiving country. +Data for selected countries may, at times, not be available through this system. +Those countries' data summaries and products which are available here are intended for free and unrestricted use in research, education, and other non-commercial activities. +However, for non-U.S. locations' data, the data or any derived product shall not be provided to other users or be used for the re-export of commercial services. ## Meta @@ -103,7 +104,9 @@ For details, please consult: [WMO Resolution 40. NOAA Policy](https://community. - To cite _**GSODR**_, please use: Adam H. Sparks, Tomislav Hengl and Andrew Nelson (2017). GSODR: Global Summary Daily Weather Data in R. _The Journal of Open Source Software_, **2(10)**. DOI: 10.21105/joss.00177. -- Please note that the _**GSODR**_ project is released with a [Contributor Code of Conduct](https://github.com/ropensci/GSODR/blob/main/CONDUCT.md) By participating in the _**GSODR**_ project you agree to abide by its terms. +## Code of Conduct + +Please note that the GSODR project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. ## References diff --git a/codemeta.json b/codemeta.json index 55862460..afcb6ded 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,9 +1,25 @@ { - "@context": [ - "https://raw.githubusercontent.com/mbjones/codemeta/master/codemeta.jsonld", - "http://schema.org" - ], - "@type": "Code", + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@type": "SoftwareSourceCode", + "identifier": "GSODR", + "description": "Provides automated downloading, parsing, cleaning, unit conversion and formatting of Global Surface Summary of the Day ('GSOD') weather data from the from the USA National Centers for Environmental Information ('NCEI'). Units are converted from from United States Customary System ('USCS') units to International System of Units ('SI'). Stations may be individually checked for number of missing days defined by the user, where stations with too many missing observations are omitted. Only stations with valid reported latitude and longitude values are permitted in the final data. Additional useful elements, saturation vapour pressure ('es'), actual vapour pressure ('ea') and relative humidity ('RH') are calculated from the original data using the improved August-Roche-Magnus approximation (Alduchov & Eskridge 1996) and included in the final data set. The resulting metadata include station identification information, country, state, latitude, longitude, elevation, weather observations and associated flags. For information on the 'GSOD' data from 'NCEI', please see the 'GSOD' 'readme.txt' file available from, .", + "name": "GSODR: Global Surface Summary of the Day ('GSOD') Weather Data Client", + "codeRepository": "https://github.com/ropensci/GSODR", + "issueTracker": "https://github.com/ropensci/GSODR/issues", + "license": "https://spdx.org/licenses/MIT", + "version": "3.1.5", + "programmingLanguage": { + "@type": "ComputerLanguage", + "name": "R", + "url": "https://r-project.org" + }, + "runtimePlatform": "R version 4.2.0 (2022-04-22)", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, "author": [ { "@type": "Person", @@ -27,29 +43,55 @@ "@id": "https://orcid.org/0000-0002-7249-3778" } ], - "identifier": "GSODR", - "codeRepository": "https://github.com/ropensci/GSODR", - "dateModified": "2017-01-21", - "dateCreated": "2017-01-21", - "description": "Provides automated downloading, parsing, cleaning, unit conversion and formatting of Global Surface Summary of the Day ('GSOD') weather data from the from the USA National Centers for Environmental Information ('NCEI'). Units are converted from from United States Customary System ('USCS') units to International System of Units ('SI'). Stations may be individually checked for number of missing days defined by the user, where stations with too many missing observations are omitted. Only stations with valid reported latitude and longitude values are permitted in the final data. Additional useful elements, saturation vapour pressure ('es'), actual vapour pressure ('ea') and relative humidity ('RH') are calculated from the original data using the improved August-Roche-Magnus approximation (Alduchov & Eskridge 1996) and included in the final data set. The resulting metadata include station identification information, country, state, latitude, longitude, elevation, weather observations and associated flags. For information on the 'GSOD' data from 'NCEI', please see the 'GSOD' 'readme.txt' file available from, .", - "keywords": ["US-NCEI", "meteorological-data", "global-weather", "weather", "weather-data", "meteorology", "station-data", "surface-weather", "data-access", "US-NCDC", "r", "gsod", "ncdc", "weather-stations", "global-data", "ncei", "weather-information", "historical-weather", "historical-data", "daily-data", "daily-weather", "rstats", "r-package"], - "license": "https://spdx.org/licenses/MIT", - "title": "GSODR", - "version": "3.1.4.9000", - "name": "GSODR: Global Surface Summary of the Day ('GSOD') Weather Data Client", - "issueTracker": "https://github.com/ropensci/GSODR/issues", - "programmingLanguage": { - "@type": "ComputerLanguage", - "name": "R", - "url": "https://r-project.org" - }, - "runtimePlatform": "R version 4.1.2 (2021-11-01)", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Central R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, + "contributor": [ + { + "@type": "Person", + "givenName": "Hugh", + "familyName": "Parsonage", + "email": "hugh.parsonage@gmail.com", + "@id": "https://orcid.org/0000-0003-4055-0835" + }, + { + "@type": "Person", + "givenName": "Taras", + "familyName": "Kaduk", + "email": "taras.kaduk@gmail.com" + }, + { + "@type": "Person", + "givenName": "Gwenael", + "familyName": "Giboire", + "email": "gwenael.giboire@oda-groupe.com" + }, + { + "@type": "Person", + "givenName": "Łukasz", + "familyName": "Pawlik", + "email": "lukpawlik@gmail.com" + }, + { + "@type": "Person", + "givenName": "Ross", + "familyName": "Darnell", + "email": "Ross.Darnell@data61.csiro.au", + "@id": "https://orcid.org/0000-0002-7973-6322" + }, + { + "@type": "Person", + "givenName": "Tyler", + "familyName": "Widdison", + "email": "Tyler.Widdison@usav.org" + } + ], + "copyrightHolder": [ + { + "@type": "Person", + "givenName": "Hugh", + "familyName": "Parsonage", + "email": "hugh.parsonage@gmail.com", + "@id": "https://orcid.org/0000-0003-4055-0835" + } + ], "maintainer": [ { "@type": "Person", @@ -205,14 +247,14 @@ "sameAs": "https://CRAN.R-project.org/package=tidyr" } ], - "softwareRequirements": [ - { + "softwareRequirements": { + "1": { "@type": "SoftwareApplication", "identifier": "R", "name": "R", "version": ">= 3.5.0" }, - { + "2": { "@type": "SoftwareApplication", "identifier": "countrycode", "name": "countrycode", @@ -224,7 +266,7 @@ }, "sameAs": "https://CRAN.R-project.org/package=countrycode" }, - { + "3": { "@type": "SoftwareApplication", "identifier": "curl", "name": "curl", @@ -236,7 +278,7 @@ }, "sameAs": "https://CRAN.R-project.org/package=curl" }, - { + "4": { "@type": "SoftwareApplication", "identifier": "data.table", "name": "data.table", @@ -248,7 +290,7 @@ }, "sameAs": "https://CRAN.R-project.org/package=data.table" }, - { + "5": { "@type": "SoftwareApplication", "identifier": "httr", "name": "httr", @@ -260,7 +302,7 @@ }, "sameAs": "https://CRAN.R-project.org/package=httr" }, - { + "6": { "@type": "SoftwareApplication", "identifier": "R.utils", "name": "R.utils", @@ -272,18 +314,22 @@ }, "sameAs": "https://CRAN.R-project.org/package=R.utils" }, - { + "7": { "@type": "SoftwareApplication", "identifier": "stats", "name": "stats" }, - { + "8": { "@type": "SoftwareApplication", "identifier": "utils", "name": "utils" - } - ], - "contIntegration": ["https://github.com/ropensci/GSODR/actions", "https://codecov.io/gh/ropensci/GSODR"], + }, + "SystemRequirements": null + }, + "applicationCategory": "Tools", + "isPartOf": "https://ropensci.org", + "keywords": ["US-NCEI", "meteorological-data", "global-weather", "weather", "weather-data", "meteorology", "station-data", "surface-weather", "data-access", "US-NCDC", "r", "gsod", "ncdc", "weather-stations", "global-data", "ncei", "weather-information", "historical-weather", "historical-data", "daily-data", "daily-weather", "rstats", "r-package"], + "fileSize": "3788.928KB", "citation": [ { "@type": "ScholarlyArticle", @@ -321,63 +367,11 @@ } } ], - "contributor": [ - { - "@type": "Person", - "givenName": "Hugh", - "familyName": "Parsonage", - "email": "hugh.parsonage@gmail.com", - "@id": "https://orcid.org/0000-0003-4055-0835" - }, - { - "@type": "Person", - "givenName": "Taras", - "familyName": "Kaduk", - "email": "taras.kaduk@gmail.com" - }, - { - "@type": "Person", - "givenName": "Gwenael", - "familyName": "Giboire", - "email": "gwenael.giboire@oda-groupe.com" - }, - { - "@type": "Person", - "givenName": "Łukasz", - "familyName": "Pawlik", - "email": "lukpawlik@gmail.com" - }, - { - "@type": "Person", - "givenName": "Ross", - "familyName": "Darnell", - "email": "Ross.Darnell@data61.csiro.au", - "@id": "https://orcid.org/0000-0002-7973-6322" - }, - { - "@type": "Person", - "givenName": "Tyler", - "familyName": "Widdison", - "email": "Tyler.Widdison@usav.org" - } - ], - "copyrightHolder": [ - { - "@type": "Person", - "givenName": "Hugh", - "familyName": "Parsonage", - "email": "hugh.parsonage@gmail.com", - "@id": "https://orcid.org/0000-0003-4055-0835" - } - ], - "applicationCategory": "Tools", - "isPartOf": "https://ropensci.org", "relatedLink": ["https://docs.ropensci.org/GSODR/", "https://CRAN.R-project.org/package=GSODR"], - "developmentStatus": "https://www.repostatus.org/#active", - "funder": {}, - "fileSize": "3785.37KB", "releaseNotes": "https://github.com/ropensci/GSODR/blob/master/NEWS.md", "readme": "https://github.com/ropensci/GSODR/blob/main/README.md", + "contIntegration": ["https://github.com/ropensci/GSODR/actions", "https://app.codecov.io/gh/ropensci/GSODR"], + "developmentStatus": "https://www.repostatus.org/#active", "review": { "@type": "Review", "url": "https://github.com/ropensci/software-review/issues/79", diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 00000000..0e413c34 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,13 @@ +# GSODR v3.1.5 + +This is a patch release to fix bad URLs, update an internal database and replace `class(years) == "character")` with `inherits(years, what = "character")`. + +## R CMD check results + +0 errors | 0 warnings | 1 note + +* This is a new patch release. + +## Reverse dependencies + +No ERRORs or WARNINGs were found diff --git a/data-raw/fetch_isd-history.Rmd b/data-raw/fetch_isd-history.Rmd index e6e73b5a..642b1e13 100644 --- a/data-raw/fetch_isd-history.Rmd +++ b/data-raw/fetch_isd-history.Rmd @@ -20,19 +20,19 @@ old_hooks <- fansi::set_knit_hooks(knitr::knit_hooks, # Introduction -The isd_history.csv file details GSOD station metadata. -These data include the start and stop years used by _GSODR_ to pre-check requests before querying the server for download and the country code used by _GSODR_ when sub-setting for requests by country. -The following checks are performed on the raw data file before inclusion in _GSODR_, +The "isd_history.csv" file details GSOD station metadata. +These data include the start and stop years used by *GSODR* to pre-check requests before querying the server for download and the country code used by *GSODR* when sub-setting for requests by country. +The following checks are performed on the raw data file before inclusion in *GSODR*, - * Check for valid lon and lat values; - - * isd_history where latitude or longitude are `NA` or both 0 are removed leaving only properly georeferenced stations, +- Check for valid lon and lat values; - * isd_history where latitude is < -90˚ or > 90˚ are removed, + - isd_history where latitude or longitude are `NA` or both 0 are removed leaving only properly georeferenced stations, - * isd_history where longitude is < -180˚ or > 180˚ are removed. + - isd_history where latitude is < -90˚ or > 90˚ are removed, - * A new field, STNID, a concatenation of the USAF and WBAN fields, is added. + - isd_history where longitude is < -180˚ or > 180˚ are removed. + +- A new field, STNID, a concatenation of the USAF and WBAN fields, is added. # Data Processing @@ -153,11 +153,10 @@ save(isd_diff, ## NOAA policy -Users of these data should take into account the following (from the -[NCEI website](https://www7.ncdc.noaa.gov/CDO/cdoselect.cmd?datasetabbv=GSOD&countryabbv=&georegionabbv=)): +Users of these data should take into account the following (from the [NCEI website](https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00516)): > The following data and products may have conditions placed on their international commercial use. They can be used within the U.S. or for non-commercial international activities without restriction. The non-U.S. data cannot be redistributed for commercial purposes. Re-distribution of these data by others must provide this same notification. A log of IP addresses accessing these data and products will be maintained and may be made available to data providers. -For details, please consult: [WMO Resolution 40. NOAA Policy](https://community.wmo.int/resolution-40) +> For details, please consult: [WMO Resolution 40. NOAA Policy](https://community.wmo.int/resolution-40) ## R System Information diff --git a/data-raw/fetch_isd-history.md b/data-raw/fetch_isd-history.md index 03f4155f..b2c542e7 100644 --- a/data-raw/fetch_isd-history.md +++ b/data-raw/fetch_isd-history.md @@ -1,7 +1,7 @@ Fetch and Clean ‘isd_history.csv’ File ================ Adam H. Sparks -2022-02-12 +2022-05-06