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

Handle military time, such as in Pittsburgh's case #180

Closed
j-t-t opened this issue Aug 29, 2018 · 2 comments
Closed

Handle military time, such as in Pittsburgh's case #180

j-t-t opened this issue Aug 29, 2018 · 2 comments
Assignees

Comments

@j-t-t
Copy link
Collaborator

j-t-t commented Aug 29, 2018

No description provided.

@mtjones330
Copy link

mtjones330 commented Aug 29, 2018

The time of day for the Allegheny county crash data is represented as an integer in 24-hour format.
https://data.wprdc.org/dataset/allegheny-county-crash-data

TIME_OF_DAY HOUR_OF_DAY
257 2
1027 10
1839 18
914 9
2230 22
1415 14
1430 14
847 8
1244 12
1150 11
1614 16

@terryf82 terryf82 self-assigned this Aug 29, 2018
@terryf82 terryf82 mentioned this issue Aug 30, 2018
@terryf82
Copy link
Collaborator

I've created PR 181 from a new branch crash_import to resolve this, which actually covers a few separate issues. Of relevance to this specific issue though, the initialize_city script now provides additional options for specifying different time formats. If you specify time (indicating it exists separately from the crash date) you also need to specify time_format as one of "military", "seconds" (since midnight) or "default", and the date parser acts accordingly.

I've updated the configs for our 3 test cities, as well as added a Pittsburgh config, which is presently the only city using the "military" time option.

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

3 participants