Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Area service breakdowns #118

Closed Mike-Heneghan closed 4 years ago

Mike-Heneghan commented 4 years ago

Further stats which would be useful for the team would be the number of services in a boundary area i.e. service count per local authority area.

For services with a defined service area, this would be relatively easy although this would also need to include services with a location which is within a service area boundary data set.

We currently have a method for locations in service areas. These locations could be linked to their services which return a data set of services in the service area by location.

Mike-Heneghan commented 4 years ago

When going about writing DB queries need to remember to only allow services which are searchable by users i.e. those which can actually be found on the site.

It might be worth making a note of how many services there are that have multiple locations in ALISS.

Need to iterate through service area regions and create a list of each service available in that region. These services could be deemed available if they were explicitly set as being available in that service area region if they have locations in that service area.

Need to find by ServiceArea and then by location and the merge the data sets and deduplicate.

Mike-Heneghan commented 4 years ago

Interesting article on merging dicts of query sets.

https://stackoverflow.com/questions/38987/how-do-i-merge-two-dictionaries-in-a-single-expression

Mike-Heneghan commented 4 years ago

Merged