Cache data to rappdirs::user_cache_dir("mapbaltimore")
Usage
cache_baltimore_data(data = NULL, filename = NULL, overwrite = FALSE)
cache_msa_streets(
url =
"https://geodata.md.gov/imap/rest/services/Transportation/MD_HighwayPerformanceMonitoringSystem/MapServer/2",
filename = "baltimore_msa_streets.gpkg",
crs = pkgconfig::get_config("mapbaltimore.crs", 2804),
overwrite = FALSE
)
cache_edge_of_pavement(
url =
"https://gisdata.baltimorecity.gov/egis/rest/services/OpenBaltimore/Edge_of_Pavement/FeatureServer/0",
filename = "edge_of_pavement.gpkg",
crs = pkgconfig::get_config("mapbaltimore.crs", 2804),
overwrite = FALSE
)
cache_baltimore_property(
url =
"https://geodata.baltimorecity.gov/egis/rest/services/Housing/dmxOwnership/MapServer/0",
location = NULL,
filename = "baltimore_property.gpkg",
crs = pkgconfig::get_config("mapbaltimore.crs", 2804),
overwrite = FALSE
)
show_cached_files()
Arguments
- data
Data to cache.
- filename
File name to use for cached file. Defaults to name of data. If the data is an sf object make sure to include the file type, e.g. "data.gpkg", supported by
sf::write_sf()
. All other data is written to rda withreadr::write_rds()
.- overwrite
Logical. Default
FALSE
. IfTRUE
, overwrite any existing cached files that use the same filename.- url
URL
- crs
Coordinate reference system.
- location
sf
,sfc
, orbbox
object (or other object convertible withas_bbox()
. Optional.