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

1,022

Version

4.3.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

R. Bocinsky

Last Published

April 12th, 2025

Functions in FedData (4.3.0)

get_ghcn_daily

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

Download and crop the NASS Cropland Data Layer.
get_ned

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

Download and crop the National Hydrography Dataset.
get_daymet

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

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

Download and crop the inventory of GHCN stations.
get_nlcd_annual

Download and crop the Annual National Land Cover Database.
get_ssurgo_inventory

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

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

The boundary of Mesa Verde National Park
get_wbd

Download and crop the Watershed Boundary Dataset.
get_ssurgo

Download and crop data from the NRCS SSURGO soils database.
%>%

Pipe operator
replace_null

Replace NULLs
get_padus

Download and crop the PAD-US Dataset.
sequential_duplicated

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

Read chronology data from a Tucson-format chronology file.
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.
soils_query

Submit a Soil Data Access (SDA) Query
url_base

Strip query parameters from a URL
unwrap_rows

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

A basic plotting function for NHD data.
split_bbox

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

Turn an extent object into a polygon
station_to_data_frame

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

Scaffolds the common pattern of selecting a layer and filter a geometry from an ArcGIS feature service.
download_daymet_thredds

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

Use curl to download a file.
check_service

Check whether a web service is unavailable, and stop function if necessary.
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_itrdb

Download the latest version of the ITRDB.
agol_filter_httr

Scaffolds the common pattern of selecting a layer and filter a geometry from an ArcGIS feature service.
download_ssurgo_inventory

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

Download the daily data for a GHCN weather station.
get_ned_tile

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

Download and crop the National Land Cover Database.
get_itrdb

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