View source: R/drivablecountiesvsregion.R
drivablecountiesvsregion | R Documentation |
Compare an exiting georegion to a list of drivable counites or generate the drivable list based on a driving time radius.
drivablecountiesvsregion(
regiondf,
drivingdistance,
countymaps = NA,
fipscodes = NA,
output = c("nearbydf", "mapdata", "outsidecountiesdf", "map")
)
regiondf |
an existing data frame or a file URL |
drivingdistance |
an object of class drivingdistance or a numeric distance from the center of regiondf |
countymaps |
a spatialpolygonsdataframe. If NA, data is downloaded and read from the US Census |
fipscodes |
a data frame of fips codes for all counties with bannerized codes added. If NA, data from the tigris package is modified to work |
output |
a character vector describing what output you want. Available options include, "nearbydf", "mapdata", "outsidecountiesdf" and "map" |
if more than one output is selected, a list containing values of each. If only one output is selected, the object itself is return, without being wrapped in a list. Outputs include:
"nearbydf" a data frame of nearby counties and their distance to the center of the region
"mapdata" a SpaitalPolygonsDataFrame of the nearby counties appropriate for use in a leaflet map
"outsidecountiesdf" a data frame of counties that are within driving range but outside the regiondf
"map" a pre-generated leaflet map
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.