Pull data from the City and County's campaign finance websites and display the total raised along with all of the donors per candidate in each race.
Runs from scripts/index.js
, which calls out to the other files in scripts/
. It:
- downloads a single year, usually the current year, from the two portals as a ZIP archive (
download.js
) - unzips the downloaded file into an Excel file (
extract.js
) - convert that Excel file into a series of
.json
files withindata/
(transform.js
) - the files are stored here so that we only have to download a single year's worth of data to update - loads the data into a SQL lite database so we can do some subsequent aggreation (
loads.js
) - create
$lib/data-sac-city.json
with the data needed for the body route (aggregate.js
)