Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add visited on most days query #4267

Open
greenape opened this issue Aug 24, 2021 · 6 comments · Fixed by #4463
Open

Add visited on most days query #4267

greenape opened this issue Aug 24, 2021 · 6 comments · Fixed by #4463
Assignees
Labels
enhancement New feature or request FlowClient Issues related to FlowClient FlowMachine Issues related to FlowMachine

Comments

@greenape
Copy link
Member

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.

@greenape greenape added enhancement New feature or request FlowMachine Issues related to FlowMachine labels Aug 24, 2021
@greenape greenape added the P-Now label Sep 23, 2021
@flowstef flowstef self-assigned this Oct 19, 2021
@flowstef
Copy link
Contributor

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?

@jc-harrison
Copy link
Member

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.

@flowstef
Copy link
Contributor

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.

@jc-harrison
Copy link
Member

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.

flowstef added a commit that referenced this issue Oct 20, 2021
@flowstef
Copy link
Contributor

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!

@greenape
Copy link
Member Author

greenape commented Nov 2, 2021

Reopening this because #4463 doesn't include a flowclient function.

@greenape greenape reopened this Nov 2, 2021
@greenape greenape added the FlowClient Issues related to FlowClient label Nov 2, 2021
@greenape greenape removed the P-Now label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FlowClient Issues related to FlowClient FlowMachine Issues related to FlowMachine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants