get_bag_from_cache: Get BAG adres_plus for one or more gemeentes, local or server...

View source: R/get_bag_from_cache.R

get_bag_from_cacheR Documentation

Get BAG adres_plus for one or more gemeentes, local or server cache

Description

Given one or more gemeente's, read the file ⁠bag_<gemeente>_plus.rds⁠ either from a local cache folder, or from a shared mount on Rstudio Connect. If the file does not yet exist, it is downloaded and placed in the cache. Much preferred to the previous use of e.g. 'data_public/.../bag.rds' because we can reuse the same (up to date!) copy of the BAG table, and we do not have to redeploy an application if only the BAG has updated.

Usage

get_bag_from_cache(gemeentes, cache_folder = "cache", force = FALSE)

Arguments

gemeentes

Vector of gemeente naam to download/read

cache_folder

The local folder to use for caching. Ignored on rsconnect, where a fixed path is used ("/data/bag" is a share on rsconnect dev and prod).

force

Download a new copy even when we have it in the cache


moturoa/shintobag documentation built on April 6, 2024, 7:25 a.m.