GSODR
Global Surface Summary of the Day Weather Data Client for R.
https://github.com/ropensci/GSODR
Category: Climate Change
Sub Category: Climate Data Access and Visualization
Keywords
daily-data daily-weather data-access global-data gsod historical-data historical-weather ncdc ncei r r-package rstats weather weather-data weather-information weather-stations
Keywords from Contributors
cycle routes climate hydrology rmarkdown unconf
Last synced: about 19 hours ago
JSON representation
Repository metadata
Data Access Client for Global Surface Summary of the Day (GSOD) Weather Written in R
- Host: GitHub
- URL: https://github.com/ropensci/GSODR
- Owner: ropensci
- License: other
- Created: 2015-03-23T23:26:42.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2025-11-15T23:07:17.000Z (about 1 month ago)
- Last Synced: 2025-12-01T21:45:47.620Z (23 days ago)
- Topics: daily-data, daily-weather, data-access, global-data, gsod, historical-data, historical-weather, ncdc, ncei, r, r-package, rstats, weather, weather-data, weather-information, weather-stations
- Language: R
- Homepage: https://docs.ropensci.org/GSODR
- Size: 176 MB
- Stars: 97
- Watchers: 8
- Forks: 18
- Open Issues: 0
- Releases: 48
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codemeta: codemeta.json
README.Rmd
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# {GSODR}: Global Surface Summary of the Day (GSOD) Weather Data Client
[](https://github.com/ropensci/GSODR/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/ropensci/GSODR)
[](https://doi.org/10.5281/zenodo.439850)
[](https://cran.r-project.org/package=GSODR)
[](https://www.repostatus.org/#active)
[](https://joss.theoj.org/papers/10.21105/joss.00177)
[](https://github.com/ropensci/software-review/issues/79)
## Introduction
The GSOD or [Global Surface Summary of the Day (GSOD)](https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00516) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage.
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides four main functions for facilitating this:
- `get_GSOD()` - this function queries and transfers files from the NCEI's web server, reformats them and returns a data frame.
- `reformat_GSOD()` - this function takes individual station files from the local disk and re-formats them returning a data frame.
- `nearest_stations()` - this function returns a `data.table` of stations with their metadata and the distance in which they fall from the given radius (kilometres) of a point given as latitude and longitude in order from nearest to farthest.
- `get_updates()` - this function downloads the changelog for the GSOD data from the NCEI's server and reorders it by the most recent changes first.
When reformatting data either with `get_GSOD()` or `reformat_GSOD()`, all units are converted to International System of Units (SI), _e.g._, inches to millimetres and Fahrenheit to Celsius.
File output is returned as a `data.table` object, summarising each year by station, which also includes vapour pressure and relative humidity elements calculated from existing data in GSOD.
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, .
## How to Install
### Stable Version
A stable version of {GSODR} is available from [CRAN](https://cran.r-project.org/package=GSODR).
```r
install.packages("GSODR")
```
### Development Version
A development version is available from from GitHub.
If you wish to install the development version that may have new features or bug fixes before the CRAN version does (but also may not work properly), please install from the [rOpenSci R Universe](https://ropensci.org/r-universe/).
We strive to keep the main branch on GitHub functional and working properly.
```r
install.packages("GSODR", repos = "https://ropensci.r-universe.dev")
```
## Using {GSODR}
The most common work might be getting data for a single location.
Here's an example of fetching data for a station in Toowoomba, Queensland, AU in 2021.
```{r example}
library(GSODR)
tbar <- get_GSOD(years = 2021, station = "955510-99999")
tbar
```
## Other Sources of Weather Data in R
There are several other sources of weather data and ways of retrieving them through R.
Several are also [rOpenSci](https://ropensci.org) projects.
[{GSODTools}](https://github.com/environmentalinformatics-marburg/GSODTools) by [Florian Detsch](https://github.com/fdetsch) is an R package that offers similar functionality as {GSODR}, but also has the ability to graph the data and working with data for time series analysis.
[{nasapower}](https://CRAN.R-project.org/package=nasapower) from [rOpenSci](https://docs.ropensci.org/nasapower/) aims to make it quick and easy to automate downloading of the NASA-POWER global meteorology, surface solar energy and climatology data in your R session as a tidy `tibble` object for analysis and use in modelling or other purposes.
POWER (Prediction Of Worldwide Energy Resource) data are freely available for download with varying spatial resolutions dependent on the original data and with several temporal resolutions depending on the POWER parameter and community.
[{riem}](https://CRAN.R-project.org/package=riem) from [rOpenSci](https://docs.ropensci.org/riem/) allows to get weather data from Automated Surface Observing System (ASOS) stations (airports) in the whole world thanks to the Iowa Environment Mesonet website.
[{rnoaa}](https://CRAN.R-project.org/package=rnoaa), from [rOpenSci](https://docs.ropensci.org/rnoaa/) offers tools for interacting with and downloading weather data from the United States National Oceanic and Atmospheric Administration but lacks support for GSOD data.
[{stationaRy}](https://cran.r-project.org/package=stationaRy), from Richard Iannone offers hourly meteorological data from stations located all over the world.
There is a wealth of data available, with historic weather data accessible from nearly 30,000 stations.
[{weathercan}](https://CRAN.R-project.org/package=weathercan) from [rOpenSci](https://github.com/ropensci/weathercan) makes it easier to search for and download multiple months/years of historical weather data from Environment and Climate Change Canada (ECCC) website.
[{weatherOz}](https://CRAN.R-project.org/package=weatherOz) aims to facilitate access and download weather and climate data for Australia from Australian data sources.
Data are sourced from from the Western Australian Department of Primary Industries and Regional Development (DPIRD) and the Scientific Information for Land Owners (SILO) API endpoints and the Australian Government Bureau of Meteorology’s (BOM) FTP server.
[{worldmet}](https://CRAN.R-project.org/package=worldmet) provides an easy way to access data from the NOAA Integrated Surface Database (ISD) (the same database {GSODR} provides access to.
The ISD contains detailed surface meteorological data from around the world for over 35,000 locations.
However, rather than daily values, the package outputs (typically hourly meteorological data) and works very well with the [{openair}](https://CRAN.R-project.org/package=openair) package.
## Notes
### Citing GSOD data
> Cite as: NOAA National Centers of Environmental Information. 1999. Global Surface Summary of the Day - GSOD. 1.0. [indicate subset used]. NOAA National Centers for Environmental Information. Accessed [date].
### NOAA policy
Users of these data should take into account the following:
> 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
- Please [report any issues or bugs](https://github.com/ropensci/GSODR/issues).
- License: MIT
- 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.
## Code of Conduct
Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/).
By contributing to this project, you agree to abide by its terms.
## References
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 DOI: 10.1175/1520-0450(1996)035<0601:IMFAOS>2.0.CO;2.
Owner metadata
- Name: rOpenSci
- Login: ropensci
- Email: info@ropensci.org
- Kind: organization
- Description:
- Website: https://ropensci.org/
- Location: Berkeley, CA
- Twitter: rOpenSci
- Company:
- Icon url: https://avatars.githubusercontent.com/u/1200269?v=4
- Repositories: 307
- Last ynced at: 2023-03-10T20:30:59.242Z
- Profile URL: https://github.com/ropensci
GitHub Events
Total
- Create event: 1
- Release event: 2
- Issues event: 8
- Watch event: 9
- Delete event: 1
- Issue comment event: 5
- Push event: 54
- Pull request review event: 1
- Pull request event: 5
- Fork event: 1
Last Year
- Create event: 1
- Release event: 2
- Issues event: 6
- Watch event: 7
- Delete event: 1
- Issue comment event: 2
- Push event: 51
- Pull request review event: 1
- Pull request event: 5
- Fork event: 1
Committers metadata
Last synced: 13 days ago
Total Commits: 2,321
Total Committers: 8
Avg Commits per committer: 290.125
Development Distribution Score (DDS): 0.008
Commits in past year: 97
Committers in past year: 3
Avg Commits per committer in past year: 32.333
Development Distribution Score (DDS) in past year: 0.062
| Name | Commits | |
|---|---|---|
| Adam H. Sparks | a****s@g****m | 2303 |
| Ubuntu | u****u@s****l | 6 |
| SpatLyu | l****l@g****m | 5 |
| Tomislav Hengl | t****l@i****g | 3 |
| Noam Ross | n****s@g****m | 1 |
| Karthik Ram | k****m@g****m | 1 |
| Josiah Parry | j****y@g****m | 1 |
| Carl Boettiger | c****g@g****m | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: about 1 month ago
Total issues: 69
Total pull requests: 51
Average time to close issues: 26 days
Average time to close pull requests: about 4 hours
Total issue authors: 23
Total pull request authors: 6
Average comments per issue: 2.75
Average comments per pull request: 0.06
Merged pull request: 49
Bot issues: 0
Bot pull requests: 0
Past year issues: 2
Past year pull requests: 4
Past year average time to close issues: 2 days
Past year average time to close pull requests: about 10 hours
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.25
Past year merged pull request: 4
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- adamhsparks (44)
- pat-s (2)
- tosinaregbs (2)
- taraskaduk (2)
- hubbarsc (1)
- choisy (1)
- m-hrachov (1)
- dvictori (1)
- amshew (1)
- rogarui (1)
- sachserf (1)
- emdelponte (1)
- EFreiberger (1)
- pssguy (1)
- sckott (1)
Top Pull Request Authors
- adamhsparks (44)
- SpatLyu (2)
- JosiahParry (2)
- noamross (1)
- karthik (1)
- cboettig (1)
Top Issue Labels
- enhancement (11)
- bug (5)
- question (1)
Top Pull Request Labels
Package metadata
- Total packages: 3
-
Total downloads:
- cran: 2,181 last-month
- Total docker downloads: 130,623
- Total dependent packages: 1 (may contain duplicates)
- Total dependent repositories: 2 (may contain duplicates)
- Total versions: 101
- Total maintainers: 1
proxy.golang.org: github.com/ropensci/GSODR
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ropensci/GSODR#section-documentation
- Licenses: other
- Latest release: v5.0.0+incompatible (published about 1 month ago)
- Last Synced: 2025-12-11T08:16:24.178Z (14 days ago)
- Versions: 25
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 9.049%
- Average: 9.627%
- Dependent repos count: 10.204%
proxy.golang.org: github.com/ropensci/gsodr
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ropensci/gsodr#section-documentation
- Licenses: other
- Latest release: v5.0.0+incompatible (published about 1 month ago)
- Last Synced: 2025-12-11T08:16:23.704Z (14 days ago)
- Versions: 25
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 9.049%
- Average: 9.627%
- Dependent repos count: 10.204%
cran.r-project.org: GSODR
Global Surface Summary of the Day ('GSOD') Weather Data Client
- Homepage: https://docs.ropensci.org/GSODR/
- Documentation: http://cran.r-project.org/web/packages/GSODR/GSODR.pdf
- Licenses: MIT + file LICENSE
- Latest release: 5.0.0 (published about 1 month ago)
- Last Synced: 2025-12-11T08:16:22.854Z (14 days ago)
- Versions: 51
- Dependent Packages: 1
- Dependent Repositories: 2
- Downloads: 2,181 Last month
- Docker Downloads: 130,623
-
Rankings:
- Docker downloads count: 0.045%
- Average: 13.532%
- Downloads: 16.67%
- Dependent packages count: 18.148%
- Dependent repos count: 19.265%
- Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- R.utils * imports
- countrycode * imports
- curl * imports
- data.table * imports
- httr * imports
- stats * imports
- utils * imports
- dplyr * suggests
- ggplot2 * suggests
- gridExtra * suggests
- knitr * suggests
- mapproj * suggests
- maps * suggests
- remotes * suggests
- rmarkdown * suggests
- roxygen2 * suggests
- spelling * suggests
- testthat * suggests
- tidyr * suggests
- actions/checkout v3 composite
- actions/upload-artifact v2 composite
- pat-s/always-upload-cache v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-tinytex v2 composite
- actions/checkout v3 composite
- peter-evans/create-pull-request v4 composite
- r-lib/actions/setup-r v2 composite
Score: 18.450849922982886