a6b53de2a70b239a704cf79b562e978cae1eafc3
Wraps cog_spending across a named list of state/county/city layers, tagging each row with its `layer` and attaching a scope_note that documents geographic-scope caveats (state totals are statewide, county totals include areas outside a listed city, city proper excludes special districts). Per-capita uses each layer's own population from the canonical_fips_xwalk. Provenance is inherited from cog_spending but rewritten to reflect the outer verb (verb, call, layers). Tests: 19 new / 99 total pass. devtools::check() 0E/0W/2N.
uscogdata
Curated R reader for the Civilytics US Census of Governments finance corpus.
Provides unit-level financial profiles, geographic rollups, and peer comparisons with auditable provenance and built-in cross-vintage correctness. Reads the published corpus (Hive-partitioned parquet + manifest.json) directly from Nextcloud via DuckDB httpfs — no local bulk downloads required.
Status
Under active development (Phase 2 of the cog_pipeline project). See
../cog_pipeline/docs/reader-specification.md for the reader contract this
package implements.
Installation
# pak::pkg_install("gitea.civilytics.org/Civilytics/uscogdata")
Configuration
USCOGDATA_URL— corpus root URL (public Nextcloud share, trailing slash)USCOGDATA_CACHE_DIR— optional override for the manifest cache directoryUSCOGDATA_MANIFEST_TTL_SECS— optional manifest re-fetch TTL (default 3600)
Languages
R
100%