Skip to content

A web scraper for visualizing active police calls in Henrico County, VA.

Notifications You must be signed in to change notification settings

jase231/hpd-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Henrico County PD Alerts

Scrapes Henrico County's Active Police Calls and displays them on a Semantic + LeafletJS front-end.

Features:

  • 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

A note on Nominatim

  • 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.

Usage

  • 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

Thank you to

About

A web scraper for visualizing active police calls in Henrico County, VA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published