Interactive data visualization maps for the City of Dearborn, Michigan.
Visualizes Automated License Plate Recognition (ALPR) cameras and surveillance infrastructure using data from OpenStreetMap.
- ALPR cameras with direction cones
- Filter by operator and manufacturer
- Data table with fly-to functionality
- Click popups with camera details
Displays voting precincts and election results with interactive comparison features.
- Precinct boundaries with election results
- Multiple race selection (Mayor, City Council, Proposals)
- Candidate-based color coding with margin intensity
- Cross-race comparison mode
- Vote totals by candidate
- Astro - Static site framework
- Mapbox GL JS - Interactive mapping
- OpenStreetMap - Surveillance data source
- Michigan SOS - Election data source
- Bun or Node.js
- Mapbox account (free tier works)
# Clone the repository
git clone https://github.com/yourusername/dearborn-maps.git
cd dearborn-maps
# Install dependencies
bun install
# Create environment file
cp .env.example .env
# Add your Mapbox token to .env
# PUBLIC_MAPBOX_TOKEN=pk.your_token_here
# Start development server
bun run devbun run buildOutput is in the dist/ folder.
dearborn-maps/
├── src/
│ ├── pages/
│ │ ├── index.astro # Home page
│ │ ├── surveillance.astro # Surveillance map
│ │ └── election-data.astro # Election data map
│ ├── components/
│ │ ├── Map.astro # Surveillance map component
│ │ └── PrecinctMap.astro # Election map component
│ ├── data/
│ │ ├── cameras.json # ALPR camera data
│ │ ├── boundary.json # Dearborn city boundary
│ │ ├── precincts.json # Voting precinct boundaries
│ │ └── election-data-template.json # Election results
│ └── styles/
│ └── global.css # Styles
├── .env.example
├── astro.config.mjs
├── package.json
└── README.md
- Surveillance: OpenStreetMap under ODbL license
- Election Data: Michigan Secretary of State
- Boundaries: OpenStreetMap and Wayne County GIS
- Code: MIT License
- Map Data: OpenStreetMap - ODbL
- Map Tiles: Mapbox - See their terms
- OpenStreetMap contributors
- DeFlock for surveillance mapping inspiration
- Wayne County and Michigan SOS for election data