1. SF Radar Map
This radar map ingests data from two SF city government Socrata databases, fire and service calls, which update records of all open and closed service calls within the city limits every 10-20 minutes.
I created a cloudflare worker to handle API calls, and simply call it upon page load.
The SF APIs respond with a GeoJSON FeatureCollection containing a Feature for each incident. there's a lot of interesting data attached to these Features that simply does not map well or add to incident context, so I recommend checking out all of the data fields.
Each incident is parsed and mapped using Leaflet.js, a comprehensive library for easy construction of maps. The layer feature of this library is what I used to parse an incidents data into a Leaflet.js pointToLayer. Leaflet.js also uses tile-caching to keep performance speedy and supports web raster basemaps like the one i used from CARTO (they do a good job of trying to make you pay, but their free API access is still around).
Some calls are marked as sensitive and will not include a location. Generally, non-sensitive calls will have a cross-street as a location.
Severity is determined by the priority rating given to each call by the dispatchers, and will update if a call has been reassessed.
I'm currently in the process of integrating a grouping feature for calls that occur in the same area and are possibly connected. For example, multiple accounts of shots fired within a five-block radius are likely connected to a single incident and should be indicated as such.