Downloads the consolidated INFOSIGA-SP data archive (dados_infosiga.zip)
from DETRAN-SP into the local cache. Most users do not need to call this
directly: read_infosiga() downloads the archive on demand. Use this
function when you want to pre-fetch the data (for example, before going
offline) or to force a refresh.
Arguments
- overwrite
Logical. If
FALSE(default) and the archive is already cached, the existing file is kept and returned. Set toTRUEto download again and replace it.- quiet
Logical. If
FALSE(default), report progress with informative messages.- timeout
Download timeout in seconds. The archive is large (around 120 MB), so the default temporarily raises
options()$timeoutto3600. Pass a larger value on slow connections.
Details
The archive is updated monthly by DETRAN-SP and accumulates all records
from 2015 onward. The download URL can be overridden with the
infosigasp.zip_url option, which may be a character vector of mirror URLs
tried in order until one succeeds. The default is the official DETRAN-SP
endpoint followed by a GitHub-release mirror that serves a point-in-time
snapshot when the official portal is unavailable. Override the option to add
your own mirror or for testing.
Because DETRAN-SP overwrites the archive in place each month under the same
file name, a cached copy can become stale silently. When a cached archive is
reused that is older than the infosigasp.stale_days option (30 days by
default; set to Inf to disable), a warning suggests refreshing it. The age
is taken from the cached file's modification time.
See also
read_infosiga() to import the data, and infosiga_cache_dir()
to locate the cache.
