bulk_dl: Bulk download full open FEMA data sets as .csv files

View source: R/bulk_dl.R

bulk_dlR Documentation

Bulk download full open FEMA data sets as .csv files

Description

For large data requests, it can sometimes be more practical (and quicker) to download and work with the entire data set. This function provides an easy way to download any of FEMA's data sets in its entirety and save it locally as a csv file.

Usage

bulk_dl(data_set, output_dir = NULL, file_name = NULL, size_warning = TRUE)

Arguments

data_set

A character string indicating the name of the data set to download

output_dir

An optional character string indicating the directory (defaults to working directory)

file_name

An optional character string indicating the file name (defaults to data set name with time stamp)

size_warning

A logical indicating whether to issue a warning before proceeding with downloading a large file (default is TRUE)

Value

Returns a downloaded csv file of the data set to the specified output directory.

Examples

## Not run: 
bulk_dl("femaregions") # download the file

## End(Not run)
## Not run: 
file.remove("FemaRegions.csv") # clean up directory after file downloads

## End(Not run)

dylan-turner25/rfema documentation built on Feb. 23, 2025, 9:30 a.m.