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

990

Version

4.2.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

December 10th, 2024

Functions in FedData (4.2.0)

get_ssurgo_study_area

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

Download and crop the Annual National Land Cover Database.
get_padus

Download and crop the PAD-US Dataset.
polygon_from_extent

Turn an extent object into a polygon
plot_nhd

A basic plotting function for NHD data.
read_crn_metadata

Read metadata from a Tucson-format chronology file.
replace_null

Replace NULLs
soils_query

Submit a Soil Data Access (SDA) Query
sequential_duplicated

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

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

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

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

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

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

Strip query parameters from a URL
meve

The boundary of Mesa Verde National Park
read_crn

Read a Tucson-format chronology file.
%>%

Pipe operator
read_crn_data

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

Download and crop the Watershed Boundary Dataset.
unwrap_rows

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

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

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

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

Download and crop the National Land Cover Database.
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_itrdb

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

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

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

Download and crop the NASS Cropland Data Layer.
download_data

Use curl to download a file.
agol_filter

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

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

Download the daily data for a GHCN weather station.
download_itrdb

Download the latest version of the ITRDB.
download_daymet_thredds

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

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

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