How chrisscastaneda/wfp-candidate-dashboard works
WFP Candidate Dashboard collects endorsements and election results, reconciles results to endorsed candidates, publishes JSON, then bundles those datasets into a Vue dashboard. Users filter the state tile map and candidate list by office, search, and result status, and expand cards for vote details. The scraper modules are only partly sampled; their broader capabilities and hand-maintained matching workflow are documented in the README, so unsampled implementation links are omitted or marked unverified.
Main entry points: App.vue Dashboard filters · run.py Results runner · elex State and county sources · match.py Contest matcher
Components 25
Data collection
- Endorsement scraper
scrapers/scrape_wfp_candidates.py - Results runner
scrapers/elex/run.py - Source registry
scrapers/elex/registry.py - State and county sources
scrapers/elex - Feed platform adapters
scrapers/elex/platforms - Feed fetcher
scrapers/elex/fetch.py
Results processing
- Normalized contests
scrapers/elex/model.py - Name normalization
scrapers/elex/names.py - Result store
scrapers/elex/store.py - Endorsement data
scrapers/elex/endorsements.py - Contest matcher
scrapers/elex/match.py - Manual race entries
scrapers/elex/states/manual.py - Dashboard publisher
scrapers/elex/publish.py
Dashboard
- Candidate data loader
src/data/candidates.ts - Result data and status
src/data/results.ts - Dashboard filters
src/App.vue - State tile map
src/components/TileMap.vue - Office filters
src/components/CategoryToggles.vue - Status filters
src/components/StatusToggles.vue - Candidate list
src/components/CandidateList.vue - Candidate card
src/components/CandidateCard.vue - Expanded result detail
src/components/ResultDetail.vue
Other components
- Scraper operator
- Election offices
- Dashboard user
Connections 26
- Scraper operator → Endorsement scraper: runs scrape
- Scraper operator → Results runner: runs results
- Results runner → Source registry: loads sources
scrapers/elex/run.py - Source registry → State and county sources: registers sources
scrapers/elex/run.py - State and county sources → Feed platform adapters: uses adapters
scrapers/elex/counties/ny.py - State and county sources → Feed fetcher: requests feeds
scrapers/elex/source.py - Election offices → Feed fetcher: serves feeds
- Feed fetcher → Normalized contests: normalizes feeds
- Results runner → Result store: stores snapshots
scrapers/elex/run.py - Results runner → Endorsement data: loads endorsements
scrapers/elex/run.py - Results runner → Contest matcher: matches races
scrapers/elex/run.py - Contest matcher → Name normalization: normalizes names
scrapers/elex/match.py - Contest matcher → Manual race entries: uses manual races
- Results runner → Dashboard publisher: publishes results
scrapers/elex/run.py - Endorsement scraper → Candidate data loader: produces candidate data
- Dashboard publisher → Result data and status: produces dashboard results
- Candidate data loader → Dashboard filters: provides candidates
src/App.vue - Result data and status → Dashboard filters: provides statuses
src/App.vue - Dashboard filters → State tile map: renders map
src/App.vue - Dashboard filters → Office filters: renders controls
src/App.vue - Dashboard filters → Status filters: renders controls
src/App.vue - Dashboard filters → Candidate list: renders filtered candidates
src/App.vue - Candidate list → Candidate card: renders cards
src/components/CandidateList.vue - Candidate card → Result data and status: looks up results
src/components/CandidateCard.vue - Candidate card → Expanded result detail: expands details
src/components/CandidateCard.vue - Dashboard user → Dashboard filters: filters and searches