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

route overview (main.ipynb) #35

Open
kostubhagarwal opened this issue Oct 17, 2024 · 5 comments · May be fixed by #39
Open

route overview (main.ipynb) #35

kostubhagarwal opened this issue Oct 17, 2024 · 5 comments · May be fixed by #39
Assignees

Comments

@kostubhagarwal
Copy link
Contributor

kostubhagarwal commented Oct 17, 2024

You should be able to setup route_model table in a postgresql database by running route_model.py (you will have to create database manually tho). Then using functions in db_fetch.py you should be able to load data to memory. Then simply refactor the code to reproduce the following three graphs.

Distance (Stage)
Elevation Profile (Stage)
Elevation Profile (Total)

raiyanjaz pushed a commit to raiyanjaz/strategy_msxvi that referenced this issue Oct 22, 2024
raiyanjaz pushed a commit to raiyanjaz/strategy_msxvi that referenced this issue Oct 22, 2024
@raiyanjaz
Copy link
Contributor

When refactoring the code to reproduce the graphs, I noticed that the query Elevation Profile (stage) uses is:

query = f"""
SELECT * 
FROM route_model_df
WHERE stage_name LIKE '{STAGE_SYMBOL}_%'
ORDER BY id 
"""

However, in our case we do not have a column called id in our database. I was wondering if it is possible to know what the column id stored previously

@kostubhagarwal
Copy link
Contributor Author

kostubhagarwal commented Oct 22, 2024

i think it was the first column. but don't use those queries (the old code converts sequel queries into python - which is dumb). read the values direcly from route_model_df (it's much cleaner).

from db_fetch import load_data_to_memory
route_model_df, irradiance_df = load_data_to_memory()

@raiyanjaz
Copy link
Contributor

Okay, and for the graphs is there anything I can compare it to? Should it look similar to the output of the previous code?

@kostubhagarwal
Copy link
Contributor Author

kostubhagarwal commented Oct 22, 2024 via email

@raiyanjaz
Copy link
Contributor

Planning on completing the issue by 10/27/2024

raiyanjaz pushed a commit to raiyanjaz/strategy_msxvi that referenced this issue Oct 27, 2024
raiyanjaz pushed a commit to raiyanjaz/strategy_msxvi that referenced this issue Oct 27, 2024
@raiyanjaz raiyanjaz linked a pull request Oct 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants