Data from the Alaska Public Offices Commission.
This scrapes the CSV files from the APOC website once a day and uploads them to this repo's releases.
Browse from this repo's releases.
pip install apoc-data and then
from apoc_data.download import download
download(
release="latest",
filename="debt.csv",
destination="apoc_debt.csv",
)You can download these CSVs using the direct URLs from the releases page using curl, pandas, ibis, whatever!
curl -L https://github.com/NickCrews/apoc-data/releases/download/20240716-025636/candidate_registration.csv > candidate_registration.csvor we have a tiny python script that makes this a little nicer, eg get the latest release, choose the download directory, etc. Read the script for more info.
curl -s https://raw.githubusercontent.com/NickCrews/apoc-data/main/src/apoc_data/download.py | python - --release latestpdm install
playwright install chromiumscrape:
python -m apoc_data.scrape --directory downloads --no-headless