-
Notifications
You must be signed in to change notification settings - Fork 23
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
Converting pie charts into bar charts in visualization #82
base: main
Are you sure you want to change the base?
Conversation
Testing done: By running Jupyter notebooks and comparing them with previous pie charts
@shankari Please review |
|
Can you explain what you mean by this? How did you compare the charts? |
" data = pd.DataFrame({\"Mode_confirm\": labels_mc,\n", | ||
" \"Number of Trips\": values_mc})\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why you have this copy-pasted before every line.
Can you please explain:
- why we need to create a separate data frame for the visualization of bar charts when we did not for pie charts?
- why this needs to be copy-pasted instead being refactored into common code with the same interface?
"\n", | ||
" #data\n", | ||
" miles_dict = dict(zip(miles['Mode_confirm'], miles['Total (miles)']))\n", | ||
"\n", | ||
" labels_m = []\n", | ||
" values_m = []\n", | ||
"\n", | ||
" for x, y in miles_dict.items():\n", | ||
" labels_m.append(x)\n", | ||
" values_m.append(y)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this no longer required?
The general rule of thumb for replacing pie charts is stacked bar graphs, not bar graphs directly |
Testing done: By running Jupyter notebooks and comparing them with previous pie charts