get_GSOD(years = NULL, station = NULL, country = NULL, path = "", max_missing = 5, agroclimatology = FALSE, shapefile = FALSE, CSV = TRUE, merge_station_years = FALSE)
country_list
for a full list of country names and ISO codes
available.
merge_station_years
option.All missing values in resulting files are represented as -9999 regardless of which field they occur in.
Be sure to have disk space free and allocate the proper time for this to run. This is a time, processor and disk input/output/space intensive process. This function was largely based on T. Hengl's "getGSOD.R" script, available from http://spatial-analyst.net/book/system/files/getGSOD.R with enhancements to be cross-platform, faster and more flexible. For more information see the description of the data provided by NCDC, http://www7.ncdc.noaa.gov/CDO/GSOD_DESC.txt.
The CSV or ESRI format shapefile in the respective year-directory will contain the following fields/values:
Values calculated by this package and included in final output:
## Not run:
# # Download weather station for Toowoomba, Queensland for 2010, save resulting
# # file, GSOD-955510-99999-2010.csv, in the user's home directory.
#
# get_GSOD(years = 2010, station = "955510-99999", path = "~/")
#
# # Download data for Philippines for year 2010 and generate a yearly
# # summary file, GSOD-PHL-2010.csv, file in the user's home directory with a
# # maximum of five missing days per station allowed.
#
# get_GSOD(years = 2010, country = "Philippines", path = "~/")
#
# # Download global GSOD data for agroclimatology work for years 2009 and 2010
# # and generate yearly summary files, GSOD-agroclimatology-2010.csv and
# # GSOD-agroclimatology-2011.csv in the user's home directory with a maximum
# # of five missing days per weather station allowed.
#
# get_GSOD(years = 2010:2011, path = "~/", agroclimatology = TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab