Add visited on most days query
Another type of reference location which localises subscribers to the location they visited on most days from a span of days, and breaks ties according to the number of events they had at each location.
Just confirming here: we can't have subscriber-level queries so this query is not supposed to take a subscriber ID as an input and spit out the location they visited on most days. Instead it would calculate the location visited on most days for all subscribers, map it back to the aggregation unit and give an aggregate of how many subscribers visited each aggregation unit the most. Right?
We can have subscriber-level queries in flowmachine, but don't want to directly expose them through the API. So e.g. an API user wouldn't be able to get the result of a VisitedOnMostDays query, but could get the result of a SpatialAggregate query that has a VisitedOnMostDays sub-query.
Thanks for clarifying. If that's the case here I need to look at other examples of subqueries that aren't exposed but used in aggregates.
For the exposing-through-API side of things, see e.g. ReferenceLocationSchema, which defines the allowed reference location types (currently daily location, modal location, most frequent location) as parameters for queries such as SpatialAggregate. Query schemas that are not included in FlowmachineQuerySchema will not be directly exposed as top-level queries through the API.
Right I think I've got something but still struggling with the test dataset and hardcoded values in unit tests. If somebody had time to review it with me at some point that'd be fab!
Reopening this because #4463 doesn't include a flowclient function.