codeforamerica / ohana-api

The open source API directory of community social services.
http://ohana-api-demo.herokuapp.com/api
BSD 3-Clause "New" or "Revised" License
185 stars 344 forks source link

Standardize and include service_area in consideration of geographic searches #98

Closed anselmbradford closed 9 years ago

anselmbradford commented 10 years ago

Per our earlier discussion... in order to include things like hotlines in geographic search results the service_area field could be used to include results that are far away geographically, but still can service a location. Currently the service_areas is an array that contains a mix of county names, city names, and geographic regions. For example: Colma, San Mateo County, central California. nationwide,northern Nevada

The data is fairly consistent, however, the current problem with this data is that cities do not designate their state and if there were a city with "county" in the name, it would not be able to be differentiated from being an actual county (however, I'm not sure if such a city name exists). Also, the geographic regions are not precise, only specifying "northern", "central", etc.

Perhaps the array could contain a hash with a name and type, e.g.:

[
{"name":"Colma, CA","type":"city"},
{"name":"San Mateo County","type":"county"},
{"name":"CA","type":"state"},
{"name":"northern CA","type":"region"},
{"name":"US","type":"country"},
]

In this case, for consistency, nationwide is changed to an ISO 3166 country name.

However, the overarching issue is how to include this data in a location search.

monfresh commented 9 years ago

This question should be posed on the OpenReferral repo. It's not an API issue, so I'm closing this.