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

Refactor heatmap calculations to categorize the results by opportunity #1787

Closed
Tracked by #1804
EPajares opened this issue Dec 21, 2022 · 4 comments
Closed
Tracked by #1804
Assignees

Comments

@EPajares
Copy link
Collaborator

EPajares commented Dec 21, 2022

Goal of this issue

The calculations on heat-maps was designed to do calculations over all data. In the next step, we need to separate the data by opportunities and do calculations per opportunity.

Resources

Deliverables

Branch to derive

@EPajares EPajares changed the title Implement classification of results Implement classification of results for heatmap Dec 21, 2022
@EPajares EPajares added the API label Dec 21, 2022
@EPajares EPajares added this to the v1.5 milestone Dec 21, 2022
@metemaddar
Copy link
Contributor

To summarize our meeting on this:

  1. Here first of all we need to separate the data (grid_ids & traveltime) and add them to their own category (For example as a dictionary). This also can decrease the sort time as we have smaller data series to sort.
  2. Then we need to do calculations based on incoming calculation needs as input (Finish new heatmap schema #1786). These calculation names can get connected to their function (Compute mathematical operations on two numpy arrays #1783) to calculate and add needed data to response.

@metemaddar
Copy link
Contributor

When separated grid_ids/travel_times by categories,
The calculations got a bit faster:
Previous Results:

sort takes: 0.36031150817871094 s
mins takes: 0.011055469512939453 s

New results:

sort takes: 0.24292492866516113 s
mins takes: 0.003187417984008789 s

Change

Sort: -36%
Mins: -70%

@EPajares
Copy link
Collaborator Author

Could you run a test with all the poi categories we have? They are listed in the opportunity_config table.

@metemaddar metemaddar changed the title Implement classification of results for heatmap Refactor heatmap calculations to categorize the results Jan 2, 2023
@metemaddar metemaddar changed the title Refactor heatmap calculations to categorize the results Refactor heatmap calculations to categorize the results by opportunity Jan 2, 2023
@EPajares EPajares modified the milestones: v1.5, v1.6 Jan 3, 2023
@EPajares
Copy link
Collaborator Author

EPajares commented Jan 9, 2023

I think we can close this.

@EPajares EPajares closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants