Skip to main content

Data from the Alaska Public Offices Commission.

Project description

APOC Data

Alaska campaign financial disclosure 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.


Download a Recent Scrape

You can download the daily-scraped CSVs from the GitHub releases (this is what most users want).

From the Web Interface

Browse from this repo's releases.

From the CLI

Using uv's uvx:

uvx apoc-data release download # downloads all files from the latest release to ./downloads/ folder
uvx apoc-data release download "20260702-125614" --destination mydownloads/ # specify explicitly
uvx apoc-data asset download debt.csv --destination apoc_debt.csv # download a single file
uvx apoc-data release list # see what releases are available
uvx apoc-data asset list --json # see what files are in the latest release, as JSON

Or, you can download these CSVs directly using the direct URLs from the releases page using curl, pandas, ibis, whatever!

curl -L https://github.com/NickCrews/apoc-data/releases/latest/download/candidate_registration.csv > candidate_registration.csv # get latest
curl -L https://github.com/NickCrews/apoc-data/releases/download/20240716-025636/candidate_registration.csv > candidate_registration.csv # or a different url pattern for specific releases

# query directly using duckdb
duckdb -c "SELECT count(*) FROM 'https://github.com/NickCrews/apoc-data/releases/latest/download/candidate_registration.csv'"
duckdb -c "SELECT count(*) FROM 'https://github.com/NickCrews/apoc-data/releases/download/20240716-025636/candidate_registration.csv'"

From python

We provide a python API too. uv add apoc-data and then

from apoc_data.releases import asset_download, release_download, release_list

release_list()  # all releases, newest first, as `Release` objects
release_download(destination="downloads/")  # all files from the latest release
asset_download("debt.csv", destination="apoc_debt.csv")  # a single file

Scrape Yourself

You can also scrape fresh data directly from the APOC website (requires the scrape extra for playwright):

uvx "apoc-data[scrape]" scrape --directory scraped/

There is also a python API. Read the source code.


Dev Notes

Create venv and install dev deps:

uv sync

scrape:

uv run apoc-data scrape --directory downloads --no-headless

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apoc_data-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apoc_data-0.2.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file apoc_data-0.2.0.tar.gz.

File metadata

  • Download URL: apoc_data-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for apoc_data-0.2.0.tar.gz
Algorithm Hash digest
SHA256 47741943b8a3cb230a370926bfec4a380bd2448fecac50671750beda107bfc12
MD5 193c826641839101cf6d54dae7fae62b
BLAKE2b-256 8c63f24c06466179dbbedc4e64b47e064dbe6f6918ae50c394c4385f4b8b89e6

See more details on using hashes here.

File details

Details for the file apoc_data-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: apoc_data-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for apoc_data-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e794c35a3f4522d0e84f6250e72789e8794a1ce0f8de62f00321a7b2a8ce455e
MD5 a8c6fb67929e26cb2562a743d4ad23a9
BLAKE2b-256 ab3247e5066ec543afd39cfd65b87f0de21be49dec431c9af35f90cb31e80cb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page