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

replacing datetime with arrow #82

Closed
wants to merge 0 commits into from
Closed

Conversation

achasmita
Copy link
Contributor

fixed issue #73

@achasmita
Copy link
Contributor Author

Data is same before and after changes for trajectory and trip table:
Screen Shot 2023-10-18 at 11 06 22 PM
Screen Shot 2023-10-18 at 11 06 39 PM

@achasmita
Copy link
Contributor Author

Since there is no data in recent 7 days, the table appears blank
Screen Shot 2023-10-20 at 9 13 42 AM
We can select date from filter and load data accordingly:
Screen Shot 2023-10-20 at 9 15 12 AM

Copy link
Contributor

@shankari shankari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the hallmarks of a hastily slapped together set of changes.

Please make sure that PRs that are submitted are clean and actually ready for review.

@@ -10,8 +10,9 @@
For more details on building multi-page Dash applications, check out the Dash documentation: https://dash.plot.ly/urls
"""
import os
from datetime import date
from datetime import date, timedelta
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are switching to arrow, why do we even need datetime?

def update_store_trajectoriess(start_date, end_date):
#it will only load data for recent 7 days in the begining and user can load necessary data adjusting the date filter.
if not start_date or not end_date:
end_date_obj = arrow.now().date() - timedelta(days=arrow.now().weekday())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing this? why would we not just have this be end_date_obj = arrow.now()
I am also not sure how this is addressing timezones or dateformat or any of the issues in #73
We have not outlined the full set of requirements in #73 since you are still working on #51

pages/data.py Outdated
Comment on lines 41 to 43
def update_store_trajectories(start_date_obj,end_date_obj):
global store_trajectories
df = query_trajectories(start_date_obj,end_date_obj)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this have to be removed from here?

Comment on lines 111 to 113
for col in df.columns:
if df[col].dtype == 'object':
df[col] = df[col].apply(str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the rationale for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reverted this change as this change is already included in another commit.

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

Successfully merging this pull request may close these issues.

2 participants