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

Figure for Dave B #5

Merged
merged 18 commits into from
Jun 15, 2020
Merged

Figure for Dave B #5

merged 18 commits into from
Jun 15, 2020

Conversation

lokijuhy
Copy link
Collaborator

@lokijuhy lokijuhy commented Jun 8, 2020

This PR is branched off of PR #4 "Distinguish no show types". Review and merge that one before reviewing this one.

Saving charts in altair is currently broken by a dependency issue (altair-viz/altair_saver#13). So, the dave.py command line script doesn't currently work. But I tested all of the code up to altair_saver.save(), and it works:

from mridle.figures import dave
dave.plot_dave_b(data_dir='mridle', example_date=None, start_date='01/14/2019', end_date='04/14/2019')

A screenshot of resulting Figure is in the Paper Draft in Notion.

@lokijuhy lokijuhy requested a review from nicoapg June 8, 2020 14:51
Copy link
Contributor

@nicoapg nicoapg left a comment

Choose a reason for hiding this comment

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

Just issues with the functions that have conflict with the namka_plot branch



def validate_against_dispo_data(dispo_data, slot_df, day, month, year, slot_status):
def validate_against_dispo_data(dispo_data, slot_df, day, month, year, slot_type):
Copy link
Contributor

Choose a reason for hiding this comment

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

Conflict with the namka_plot changes

Comment on lines +417 to +420
if slot_type == 'show':
slot_types = ['show', 'inpatient']
elif slot_type == 'no-show':
slot_types = ['no-show']
Copy link
Contributor

Choose a reason for hiding this comment

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

also has conflict with the Namka plot changes

else:
print('invalid status')
return
selected_dispo_rows = dispo_data[(dispo_data['date'].dt.day == day)
& (dispo_data['date'].dt.month == month)
& (dispo_data['date'].dt.year == year)
& (dispo_data['status'].isin(slot_statuses))
& (dispo_data['status'].isin(slot_types))
Copy link
Contributor

Choose a reason for hiding this comment

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

same issue about slot_types

@lokijuhy lokijuhy merged commit 37d7c6e into master Jun 15, 2020
@lokijuhy lokijuhy deleted the dave_b branch June 15, 2020 13:29
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