Learn R Programming

FedData is an R package implementing functions to automate downloading geospatial data available from several federated data sources.

Currently, the package enables extraction from nine datasets:

This package is designed with the large-scale geographic information system (GIS) use-case in mind: cases where the use of dynamic web-services is impractical due to the scale (spatial and/or temporal) of analysis. It functions primarily as a means of downloading tiled or otherwise spatially-defined datasets; additionally, it can preprocess those datasets by extracting data within an area of interest (AoI), defined spatially. It relies heavily on the sf and terra packages.

Development

Contributors

  • Dylan Beaudette - USDA-NRCS Soil Survey Office, Sonora, CA
  • Jeffrey Hollister - US EPA Atlantic Ecology Division, Narragansett, RI
  • Scott Chamberlain - ROpenSci and Museum of Paleontology at UC Berkeley

Install FedData

  • From CRAN:
install.packages("FedData")
  • Development version from GitHub:
install.packages("devtools")
devtools::install_github("ropensci/FedData")

Getting Started

Check out our Getting Started article.

Acknowledgements

This package is a product of SKOPE (Synthesizing Knowledge of Past Environments) and the Village Ecodynamics Project through grants awarded to the University of Montana, the Crow Canyon Archaeological Center, and Washington State University by the National Science Foundation. This software is licensed under the MIT license. Continuing development is supported by the Montana Climate Office.

FedData was reviewed for rOpenSci by @jooolia, and was greatly improved as a result. rOpenSci on-boarding was coordinated by @sckott.

Copy Link

Version

Install

install.packages('FedData')

Monthly Downloads

397

Version

4.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

March 17th, 2024

Functions in FedData (4.0.1)

get_ghcn_inventory

Download and crop the inventory of GHCN stations.
read_crn_data

Read chronology data from a Tucson-format chronology file.
polygon_from_extent

Turn an extent object into a polygon
read_crn_metadata

Read metadata from a Tucson-format chronology file.
read_crn

Read a Tucson-format chronology file.
substr_right

Get the rightmost 'n' characters of a character string.
station_to_data_frame

Convert a list of station data to a single data frame.
get_ssurgo_study_area

Download and crop the spatial and tabular data for a SSURGO study area.
split_bbox

Splits a bbox into a list of bboxes less than a certain size
soils_query

Submit a Soil Data Access (SDA) Query
get_wbd

Download and crop the Watershed Boundary Dataset.
replace_null

Replace NULLs
%>%

Pipe operator
meve

The boundary of Mesa Verde National Park
plot_nhd

A basic plotting function for NHD data.
sequential_duplicated

Get a logical vector of which elements in a vector are sequentially duplicated.
get_ssurgo_inventory

Download and crop a shapefile of the SSURGO study areas.
url_base

Strip query parameters from a URL
unwrap_rows

Unwraps a matrix and only keep the first n elements.
get_daymet

Download and crop the 1-km DAYMET v4 daily weather dataset.
download_daymet_thredds

Download the 1-km DAYMET daily weather dataset for a region as a netcdf.
get_ghcn_daily

Download and crop the Global Historical Climate Network-Daily data.
download_itrdb

Download the latest version of the ITRDB.
check_service

Check whether a web service is unavailable, and stop function if necessary.
download_ssurgo_inventory

Download a zipped directory containing a shapefile of the SSURGO study areas.
download_ssurgo_study_area

Download a zipped directory containing the spatial and tabular data for a SSURGO study area.
extract_ssurgo_data

Extract data from a SSURGO database pertaining to a set of mapunits.
download_ghcn_daily_station

Download the daily data for a GHCN weather station.
download_data

Use curl to download a file.
get_ned

Download and crop the 1 (~30 meter) or 1/3 (~10 meter) arc-second National Elevation Dataset.
get_itrdb

Download the latest version of the ITRDB, and extract given parameters.
get_padus

Download and crop the PAD-US Dataset.
get_ghcn_daily_station

Download and extract the daily data for a GHCN weather station.
get_nass_cdl

Download and crop the NASS Cropland Data Layer.
get_ned_tile

Load and crop tile from the 1 (~30 meter) or 1/3 (~10 meter) arc-second National Elevation Dataset.
get_ssurgo

Download and crop data from the NRCS SSURGO soils database.
get_nhd

Download and crop the National Hydrography Dataset.
get_nlcd

Download and crop the National Land Cover Database.