Scrapes Henrico County's Active Police Calls and displays them on a Semantic + LeafletJS front-end.
- Access to the underlying scraped data using the /getAlerts endpoint
- Configurable scraping intervals
- Supports multiple geocoding providers
- Google Maps API for accurate, free-ish geocoding
- OpenStreetMap's Nominatim for decently-accurate, free geocoding
- The tool is currently configured to use the Nominatim instance hosted at geocoding.ai
- Nominatim does not geocode intersections. Sometimes incidents on the county's portal will use an intersection as their location. When running in Nominatim mode, the tool will provide an approximate location for the incident by geocoding the first address of the intersection (e.g. "Lauderdale Dr / Church Rd" will be geocoded as "Lauderdale Dr". This isn't very accurate, but is better then outright failure with incidents rendering somewhere in the Atlantic.
- To build, simply
go build
in the project's root directory - To run, make sure to specify the geocoding provider and the scraping interval (60 second default), e.g.:
./hpd-alerts --provider nominatim --interval 180
./hpd-alerts --provider google --interval 120
- If you intend to run in Google Maps mode, make sure to provide your own API key by setting the
MAPS_TOKEN
environment variable:export MAPS_TOKEN=xyz
- Efron Licht for his blog series Backend from the Beginning
- Paul Fournel for this very cool encoded audio alert