GSODR v1.3.2


Monthly downloads



Global Surface Summary of the Day ('GSOD') Weather Data Client

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') for use in R. 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 are calculated from the original data and included in the final data set. The resulting data include station identification information, state, country, latitude, longitude, elevation, weather observations and associated flags. Additional data are included with this R package: a list of elevation values for stations between -60 and 60 degrees latitude derived from the Shuttle Radar Topography Measuring Mission ('SRTM'). For information on the 'GSOD' data from 'NCEI', please see the 'GSOD' 'readme.txt' file available from, <>.


CircleCI Build Status Build status codecov DOI CRAN_Status_Badge Project Status: Active – The project has reached a stable, usable state and is being actively developed. JOSS

GSODR: Global Surface Summary of the Day (GSOD) Weather Data Client for R


The GSOD or Global Surface Summary of the Day (GSOD) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage. However, the data files are cumbersome and difficult to work with. GSODR aims to make it easy to find, transfer and format the data you need for use in analysis and provides five main functions for facilitating this:

  • get_GSOD() - this function queries and transfers files from the NCEI's FTP server, reformats them and returns a tidy data frame in R. NOTE If you have used file exporting capabilities in versions prior to 1.2.0, these have been removed now in the latest version. This means less dependencies when installing. Examples of how to export the data are found in the GSODR vignette.

  • reformat_GSOD() - this function takes individual station files from the local disk and re-formats them returning a tidy data frame in R

  • nearest_stations() - this function returns a vector of station IDs that fall within the given radius (kilometres) of a point given as latitude and longitude

  • update_station_list() - this function downloads the latest station list from the NCEI's FTP server updates the package's internal database of stations and their metadata.

  • get_inventory() - this function downloads the latest station inventory information from the NCEI's FTP server and returns the header information about the latest version as a message in the console and a tidy data frame of the stations' inventory for each month that data are reported.

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 tibble(), 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.

For more information see the description of the data provided by NCEI,

Quick Start Install

Stable Version

A stable version of GSODR is available from CRAN.


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 the remotes package, available from CRAN. We strive to keep the master branch on GitHub functional and working properly.

if (!require("remotes")) {
  install.packages("remotes", repos = "")


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 projects.

The GSODTools by Florian Detsch 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.

The gsod package from DataBrew aims to streamline the way that researchers and data scientists interact with and utilize weather data and relies on [GSODR], but provides data in the package rather than downloading so it is faster (though available data may be out of date).

rnoaa, from rOpenSci offers tools for interacting with and downloading weather data from the United States National Oceanic and Atmospheric Administration but lacks support for GSOD data.

bomrang, from rOpenSci provides functions to interface with Australia Government Bureau of Meteorology (BoM) data, fetching current and historical data including précis and marine forecasts, current weather data from stations, agriculture bulletin data, BoM 0900 or 1500 weather bulletins and satellite and radar imagery.

riem from rOpenSci allows to get weather data from Automated Surface Observing System (ASOS) stations (airports) in the whole world thanks to the Iowa Environment Mesonet website.

weathercan from rOpenSci makes it easier to search for and download multiple months/years of historical weather data from Environment and Climate Change Canada (ECCC) website.

CliFlo from rOpenSci is a web portal to the New Zealand National Climate Database and provides public access (via subscription) to around 6,500 various climate stations (see for more information). Collating and manipulating data from CliFlo (hence clifro) and importing into R for further analysis, exploration and visualisation is now straightforward and coherent. The user is required to have an Internet connection, and a current CliFlo subscription (free) if data from stations, other than the public Reefton electronic weather station, is sought.

weatherData provides a selection of functions to fetch weather data from Weather Underground and return it as a clean data frame.


Other Data Sources

Elevation Values

90 m hole-filled SRTM digital elevation (Jarvis et al. 2008) was used to identify and correct/remove elevation errors in data for station locations between -60˚ and 60˚ latitude. This applies to cases here where elevation was missing in the reported values as well. In case the station reported an elevation and the DEM does not, the station reported is taken. For stations beyond -60˚ and 60˚ latitude, the values are station reported values in every instance. See for more detail on the correction methods.

WMO Resolution 40. NOAA Policy

Users of these data should take into account the following (from the NCEI website):

"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." WMO Resolution 40. NOAA Policy


  • Please report any issues or bugs.

  • 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.

  • Please note that the GSODR project is released with a Contributor Code of Conduct. By participating in the GSODR project you agree to abide by its terms.


Jarvis, A., Reuter, H. I., Nelson, A., Guevara, E. (2008) Hole-filled SRTM for the globe Version 4, available from the CGIAR-CSI SRTM 90m Database (


Functions in GSODR

Name Description
get_inventory Download and Return a Tidy Data Frame of GSOD Weather Station Data Inventories
print.GSODR.Info Prints object.
reformat_GSOD Tidy and Return a Data Frame of GSOD Weather from Local Data
update_station_list Download Latest Station List Information and Update Internal Database
GSODR Global Surface Summary of the Day (GSOD) Weather Data Client
get_GSOD Download and Return a Tidy Data Frame of GSOD Weather Data
nearest_stations Find Nearest GSOD Stations to a Specified Latitude and Longitude
No Results!

Vignettes of GSODR

No Results!

Last month downloads


Type Package
License MIT + file LICENSE
RoxygenNote 6.1.1
Encoding UTF-8
NeedsCompilation no
Repository CRAN
LazyData FALSE
LazyLoad FALSE
ByteCompile TRUE
VignetteBuilder knitr Tools US-NCEI, meteorological-data, global-weather, weather, weather-data, meteorology, station-data, surface-weather, data-access, US-NCDC
Packaged 2019-01-18 22:52:42 UTC; adamsparks
Date/Publication 2019-01-18 23:10:43 UTC

Include our badge in your README