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

Expose inflows/outflows? #4866

Open
jc-harrison opened this issue Feb 4, 2022 · 4 comments
Open

Expose inflows/outflows? #4866

jc-harrison opened this issue Feb 4, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request FlowClient Issues related to FlowClient FlowMachine Issues related to FlowMachine

Comments

@jc-harrison
Copy link
Member

Inflows and outflows are not exposed through FlowAPI. While these can be calculated outside FlowKit by summing the results of a flows query, this approach will lead to inaccuracies because some of the results may be redacted - it would be preferable to calculate the inflows/outflows before redaction.

This is particularly an issue for labelled_flows - in that case, all counts for a location pair are redacted if any count for that pair is too small, so some of the redacted values may be large, leading to significant errors in post-redaction calculation of inflows/outflows.

@jc-harrison jc-harrison added enhancement New feature or request FlowClient Issues related to FlowClient FlowMachine Issues related to FlowMachine labels Feb 4, 2022
@jc-harrison
Copy link
Member Author

It's worth noting that inflows and outflows are already implemented in flowmachine, in the InFlow and OutFlow classes (or, equivalently, the inflow and outflow methods of a Flows query); they're just not exposed through the API. But we may want to think about the nuances of the implementation - InFlow and OutFlow sum OD elements from/to all locations, including the diagonal (i.e. counts of subscribers who stayed in the same location) and flows from/to null locations (which could be counts of inactive or unlocatable subscribers). It may be more useful to sum only off-diagonal elements, with an option to exclude counts from/to null locations.

@Thingus
Copy link
Contributor

Thingus commented Apr 8, 2022

Will we want to expand this for labelled_flows in this PR, or should we hold off?

@jc-harrison
Copy link
Member Author

Will we want to expand this for labelled_flows in this PR, or should we hold off?

I'd consider this issue to cover labelled_flows as well as flows, but fine to handle those in separate PRs (with flows having higher priority).

@jc-harrison
Copy link
Member Author

But we may want to think about the nuances of the implementation - InFlow and OutFlow sum OD elements from/to all locations, including the diagonal (i.e. counts of subscribers who stayed in the same location) and flows from/to null locations (which could be counts of inactive or unlocatable subscribers). It may be more useful to sum only off-diagonal elements, with an option to exclude counts from/to null locations.

This is now covered by issue #5128

@jc-harrison jc-harrison mentioned this issue May 13, 2022
8 tasks
greenape added a commit that referenced this issue Jun 7, 2022
Co-Authored-By: James Harrison <[email protected]>
Co-Authored-By: Thingus <[email protected]>
greenape added a commit that referenced this issue Jun 9, 2022
Co-Authored-By: James Harrison <[email protected]>
Co-Authored-By: Thingus <[email protected]>
greenape added a commit that referenced this issue Jun 9, 2022
Co-Authored-By: James Harrison <[email protected]>
Co-Authored-By: Thingus <[email protected]>
greenape added a commit that referenced this issue Jun 9, 2022
Co-Authored-By: James Harrison <[email protected]>
Co-Authored-By: Thingus <[email protected]>
greenape added a commit that referenced this issue Jun 9, 2022
Co-Authored-By: James Harrison <[email protected]>
Co-Authored-By: Thingus <[email protected]>
@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

No branches or pull requests

3 participants