{"id":51584927,"url":"https://github.com/bckohan/lavote_scrape","last_synced_at":"2026-07-11T09:30:52.627Z","repository":{"id":362195361,"uuid":"884028374","full_name":"bckohan/lavote_scrape","owner":"bckohan","description":"GET RESULTS NOM NOM","archived":false,"fork":false,"pushed_at":"2026-06-26T17:28:46.000Z","size":1363,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-26T19:16:13.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bckohan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-06T02:16:53.000Z","updated_at":"2026-06-26T17:28:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bckohan/lavote_scrape","commit_stats":null,"previous_names":["bckohan/lavote_scrape"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bckohan/lavote_scrape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bckohan%2Flavote_scrape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bckohan%2Flavote_scrape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bckohan%2Flavote_scrape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bckohan%2Flavote_scrape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bckohan","download_url":"https://codeload.github.com/bckohan/lavote_scrape/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bckohan%2Flavote_scrape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35358880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-11T09:30:52.047Z","updated_at":"2026-07-11T09:30:52.618Z","avatar_url":"https://github.com/bckohan.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lavote_scrape\n\nPolls LA County election results and saves time-series snapshots as JSON. A GitHub Actions workflow runs hourly and commits new drops automatically. A static viewer on GitHub Pages visualises vote share and batch composition across drops.\n\n**Live viewer → [bckohan.github.io/lavote_scrape](https://bckohan.github.io/lavote_scrape/)**\n\n---\n\n## How it works\n\nThe scraper hits the [LA County results API](https://results.lavote.gov) for a given election ID and saves a new snapshot whenever the server timestamp advances. Snapshots are named `{eid}_{datetime}.json` and committed to the repo root. An `index.json` manifest is kept in sync so the viewer always knows what files exist.\n\nCI runs on the hour via GitHub Actions, cancels the previous run, and exits after ~65 minutes — so there is always exactly one active scrape during an election.\n\n## Setup\n\nRequires [uv](https://docs.astral.sh/uv/).\n\n```bash\ngit clone https://github.com/bckohan/lavote_scrape\ncd lavote_scrape\nuv sync\n```\n\n## Usage\n\n```bash\n# Poll election 4338 with defaults (60s delay, moo on new results)\nuv run scrape 4338\n\n# Common options\nuv run scrape 4338 --delay 30          # poll every 30s\nuv run scrape 4338 --no-moo            # silence the moo\nuv run scrape 4338 --commit            # git commit + push each new file\nuv run scrape 4338 --max-runtime 3600  # exit after 1 hour\n```\n\nThe election ID is in the URL on [results.lavote.gov](https://results.lavote.gov) — e.g. `electionID=4338`.\n\n## Viewer\n\n`index.html` at the repo root is a static single-page app (Chart.js, no build step).\n\n- **Index screen** — all contests grouped by type, searchable by contest or candidate name, sparkline of leading candidate's share over time\n- **Detail screen** — current vote totals, cumulative share line chart, per-drop batch composition, drop size histogram; winners highlighted for multi-seat contests\n\nTo run locally:\n\n```bash\npython3 -m http.server 8000\n# open http://localhost:8000\n```\n\n## GitHub Actions\n\nThe workflow (`.github/workflows/scrape.yml`) runs hourly with `--no-moo --commit --max-runtime 3900`. The default election ID is `4338`; override it via **Actions → Run workflow**.\n\nTo scrape a different election long-term, update the `EID` default in the workflow file.\n\n## Data format\n\n| File | Contents |\n|---|---|\n| `election_{eid}.json` | Contest/candidate metadata from `GetElectionData` |\n| `{eid}_{datetime}.json` | Vote count snapshot from `GetCounterData` |\n| `index.json` | Scraper-maintained manifest of all elections and result files |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbckohan%2Flavote_scrape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbckohan%2Flavote_scrape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbckohan%2Flavote_scrape/lists"}