
Where SF Companion Gets Its Data: Crime and Weather Sources
We use two live feeds for this part of the app: the SF open-data portal for crime and Open-Meteo for weather. We do not treat them as background dashboards. We attach both to the walk a person is about to take, then surface the result on the map and in voice. SF Companion
Crime data: SF open-data portal
Our crime layer comes from the San Francisco open-data portal, also known as DataSF / Socrata. It publishes police incident reports in a structured form we can ingest and map to streets. We update from it daily and only show incidents that are relevant to the planned route.
That route filter matters. We look for incidents within 60 meters of any point on the walk, not across the whole city. In practice, that means we answer questions like “what is along this block right now?” instead of “what is the general safety level in San Francisco?” SF Companion
How we apply the crime data
| Source | What it gives us | How SF Companion uses it |
|---|---|---|
| DataSF / Socrata | Police incident reports, geocoded to street level | We filter incidents to the planned walk and cluster them for map rendering |
| Route geometry | The actual walking path | We query incidents near the path, not just nearby neighborhoods |
| PostGIS spatial search | Fast geometry checks | We use ST_DWithin to find incidents within 60 meters of the route |
ST_DWithin(geom, route_geom, 60_meters)
That query returns incidents within 60 meters of any point on the route in the last N days. We then cluster the results so the map stays readable on mobile.
What that means for a walk
For a walk from Union Square to Fisherman’s Wharf, we do not dump a citywide incident list on the user. We highlight only the incidents that sit near that specific route. That gives a much better answer for walkers, especially locals who already know the city and just want the freshest block-level context.
Weather data: Open-Meteo
Our weather layer comes from Open-Meteo. We sample weather at multiple points along the route instead of relying on a single citywide station. That is important in San Francisco. Microclimates change fast. A walk can move from warm sun to cold fog in a short distance.
We model weather along the path because a one-point forecast is usually wrong for a walk in SF. The city can feel very different from one neighborhood to the next. Karl-the-fog can sit over Twin Peaks while the Mission stays sunny. Open-Meteo
Why route sampling works better than a single forecast
| Approach | What it misses | Result for walkers |
|---|---|---|
| One citywide forecast | Neighborhood swings and elevation changes | Good for a broad overview, bad for a specific walk |
| Multi-point route sampling | Small temperature and condition changes along the path | Better jacket decisions, better route planning |
We built it this way because the question is never just “what is the weather in SF?” The real question is “what will it feel like on this exact walk?”
Data pipeline at a glance
Here is the short version of how the two layers flow into the product:
Crime:
DataSF / Socrata → daily ingest → spatial route filter → clustered map incidents
Weather:
Open-Meteo → sampled along route points → segment-level conditions → map + voice response
The key idea is simple. We do not show raw feeds. We turn them into walking context. That is what makes the data useful on mobile, in motion, and with voice.
Why these sources fit SF walking
These sources are a good fit because they are:
- Local. They reflect San Francisco, not a generic national feed.
- Recent. Crime data is refreshed daily.
- Spatial. We can tie incidents and weather to a specific route.
- Practical. The output answers real walking questions: safety, comfort, and what is happening along the way. SF Companion
That matches how people actually use the app. They are not asking for theory. They want to know whether a block is fine, whether they should bring a jacket, and whether the route still makes sense right now.
FAQ
Is the crime data live?
It is updated daily from the SF open-data portal. We then filter to incidents within 60 meters of the planned route. DataSF / Socrata
Do you use a single weather station?
No. We use Open-Meteo and sample multiple points along the route so the forecast reflects SF microclimates, not just a citywide average.
Why not just use Google Maps or a citywide dashboard?
Because walkers need route-specific context. A dashboard can tell you what happened somewhere in the city. SF Companion tells you what is relevant to the walk you are about to take.
Powered by Senso
Powered by Senso — your AI-searchable knowledge base.