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

Introduce inferred labels in stacked bar charts #128

Draft
wants to merge 119 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
581b492
Function to create 100% Stacked Bar Chart
iantei Feb 26, 2024
d6f1b82
Add calculate_pct(labels, values) to calculate the proportion.
iantei Feb 26, 2024
5ddc396
Introduce a process_trip_data() to create a dataframe with cols Mode,…
iantei Feb 26, 2024
1165562
Merge list of all dataframes into one.
iantei Feb 26, 2024
2e9ad7d
Remove functions related with Pie Chart from plots.py.
iantei Feb 26, 2024
a55e9f6
Remove code and markdown blocks related with Pie Chart from generic_m…
iantei Feb 26, 2024
7e71308
Add sensed_algo_prefix for generic_metrics notebook.
iantei Feb 26, 2024
45db963
Added load_viz_notebook_sensor_inference_data() function in generic m…
iantei Feb 26, 2024
ec9037b
Filter for mode_of_interest.
iantei Feb 26, 2024
ebeb9dd
Remove Generic Metrics markdown.
iantei Feb 26, 2024
a1283bb
Markdown and code for 100% Stacked Bar Charts based on Number of Trips.
iantei Feb 26, 2024
441019c
2. 100% Stacked Bar Charts representing 80th of number of trips.
iantei Feb 26, 2024
e53c0cc
3. 100% Stacked Bar Charts representing commute trips.
iantei Feb 26, 2024
eb3dcfc
Clean up.
iantei Feb 26, 2024
e582011
4. 100% Stacked Bar Charts representing Distance by Mode.
iantei Feb 26, 2024
5fedbb0
5. 100% Stacked Bar Charts representing Count by Purpose.
iantei Feb 26, 2024
f31e43e
6. 100% Stacked Bar Charts representing Replaced mode.
iantei Feb 26, 2024
7b6cef2
Update markdown for 6.
iantei Feb 26, 2024
428982c
7. 100% Stacked Bar Charts representing Trip Distance based on Replac…
iantei Feb 26, 2024
119d707
Update Markdown text.
iantei Feb 26, 2024
1c5e00a
Copied the bar plots from generic_metrics_sensed notebook to generic_…
iantei Feb 26, 2024
4d58d4c
Copied the bar plots from mode_specific_metrics notebook to generic_m…
iantei Feb 26, 2024
7f31c5d
Added Store alt text function for stacked bar charts. Added html tabl…
iantei Feb 26, 2024
3388258
Added alt_text for stacked bar charts in generic metric notebook.
iantei Feb 26, 2024
11345f6
Retrieve htmlFile in index.html.
iantei Feb 26, 2024
2f7b0da
Update data-sizex to 8 from 4 for ntrips_mode_confirm.
iantei Feb 26, 2024
c17027d
Add X and Y axis labels.
iantei Feb 27, 2024
5d83605
Update the quality text for sensed in scaffolding.py
iantei Feb 27, 2024
f91f379
Update the default loaded configs.
iantei Feb 27, 2024
339f0cd
Remove older file names and option values associated with it. Update …
iantei Feb 27, 2024
1cc1254
Update the file names. Remove print statements.
iantei Feb 27, 2024
c2c0576
Rotate the X- axis ticks by 90, and provide last updated text below X…
iantei Feb 27, 2024
c639d89
For Stacked Bar Charts: 1. Update the plots title. 2. rename file fro…
iantei Feb 27, 2024
687633f
Experiment with adding html file in the same widget as image.
iantei Feb 27, 2024
66cb274
Changed the option value from miles_ to distance for Stacked Bar Chart.
iantei Feb 27, 2024
ddcfb1c
Added new widget for the additional information table with a checkbox…
iantei Feb 29, 2024
a95225a
Round up the pct values in the table to one decimal place, and format…
iantei Feb 29, 2024
cad3b1d
Update the data-sizex for distance_ option value.
iantei Feb 29, 2024
328c185
Update the legend to showcase (Sensed) for all the Sensed modes. Adde…
iantei Feb 29, 2024
07b08c8
Enable the checkbox only for the Stacked Bar Charts.
iantei Feb 29, 2024
eed9a0e
Uncheck the checkbox when switching to non-Stacked Bar Chart related …
iantei Feb 29, 2024
eb83f5c
Revert changes implemented for checkbox.
iantei Mar 1, 2024
ce3e38d
Added More Info button alongside the plot title for Stacked Bar Charts.
iantei Mar 1, 2024
c3a7273
Removed ntrips_ebike_purpose, and introduced ntrips_ebike_replaced_mode.
iantei Mar 1, 2024
ef5574f
Fix the ntrips_replaced_mode value.
iantei Mar 1, 2024
4c8eb68
Update to keep both alt_text as well as alt_html in a single function.
iantei Mar 1, 2024
41324d2
Removed store_alt_text function related with pie chart.
iantei Mar 1, 2024
90e2bf9
Update merged_debug_df to appropriate functions.
iantei Mar 1, 2024
052fb54
Update all Stacked Bar Charts to store both alt_text and alt_html fil…
iantei Mar 1, 2024
77e963d
Refactor Stacked Bar Chart 1. Now handles case when we have only one …
iantei Mar 1, 2024
6718f5f
Refactor Stacked Bar Chart 2. Now handles case when we have only one …
iantei Mar 1, 2024
7fa150e
Refactor Stacked Bar Chart 3. Now handles case when we have only one …
iantei Mar 1, 2024
1b9a15c
Refactor Stacked Bar Chart 4. Now handles case when we have only one …
iantei Mar 1, 2024
7e4d3aa
Refactor Stacked Bar Chart 5. Now handles case when we have only one …
iantei Mar 1, 2024
2e84f41
Refactor Stacked Bar Chart 6. Now handles case when we have only one …
iantei Mar 1, 2024
4112448
Refactor Stacked Bar Chart 7. Now handles case when we have only one …
iantei Mar 1, 2024
64abfb3
Update dist block for average_miles_mode_confirm.
iantei Mar 1, 2024
a9b2fa3
Removed and merged number of trips and distance related Mode_Specific…
iantei Mar 1, 2024
ac7475d
Remove all changes associated with Mode Specific ntrips and distance …
iantei Mar 1, 2024
5aafc02
Mode_of_interest needs to not None for it be available.
iantei Mar 1, 2024
87289ab
Update <= for the cutoff.
iantei Mar 1, 2024
2bae83c
Handle expanded_ct, expanded_ct empty cases. 2. Fill up the empty lis…
iantei Mar 1, 2024
e97c20b
Remove generic_metrics_sensed and mode_specific_metrics notebooks. Re…
iantei Mar 1, 2024
b554005
Corrected the heading for under 80th Stack Chart.
iantei Mar 2, 2024
8450622
Added the metric/imperial notation of distance in chart title.
iantei Mar 2, 2024
01cadb4
Fix text representation for distance_mode.
iantei Mar 2, 2024
2819568
Update the data-sizex of average_miles_replaced_mode identical to oth…
iantei Mar 2, 2024
d033234
Update option value from distance_mode to total_trip_length, and upda…
iantei Mar 2, 2024
067e242
Simplify the selection of stacked metrics using boolean check only.
iantei Mar 7, 2024
8e7292a
Updated the text to showcase as under 80th percentile for ntrips_unde…
iantei Mar 7, 2024
4542530
frontend/metrics_program.html
iantei Mar 7, 2024
29b60d4
Shortened the text for ntrips_purpose.
iantei Mar 7, 2024
66b2397
Update use_imperial for Miles in average_miles_replaced_mode.
iantei Mar 7, 2024
376e064
Simplify process_data_for_cutoff().
iantei Mar 11, 2024
d5c15bd
Simplify process_data_frame() for Based on Number of Trips.
iantei Mar 11, 2024
59236a1
Re-used process_data_frame() instead of process_trip_purpose_data().
iantei Mar 11, 2024
21716f8
Renamed data_frame to df and column_name to df_col, and third param t…
iantei Mar 11, 2024
ae9c309
Update the text value for total_trip_length to align with others.
iantei Mar 12, 2024
976c636
Changes to reduce size when there is single bar present in the 100% S…
iantei Mar 12, 2024
5b82f6e
Update the legend box to pin it to the upper left corner and with fon…
iantei Mar 12, 2024
d3e531d
Update the plot_title_no_quality for Total Trip Length stacked bar ch…
iantei Mar 12, 2024
64c02e4
Change from label_units to label_units_lower for Total trip length ch…
iantei Mar 12, 2024
cda15cc
Shorten Stacked Bar Charts' Trip Type labels.
iantei Mar 12, 2024
f6c7144
Update trip type param text for df_purpose_trip_eb.
iantei Mar 14, 2024
d354641
Segregate sensed land, Replace mode based charts into different Stack…
iantei Mar 22, 2024
b5da35b
Fix for the error RuntimeError(Unknown return type) in Stacked Bar Ch…
iantei Mar 22, 2024
b33426e
Added metrics dropdown for 1.Number of total trips by replaced mode. …
iantei Mar 22, 2024
4dd2f8f
Remove process_distance_data() function from Replaced Mode block.
iantei Mar 22, 2024
30b7f68
Update Labeled bar for land based distance computation (Stacked Bar C…
iantei Mar 22, 2024
bfba1f1
Limit generation of charts in accordance with study_type.
iantei Mar 22, 2024
ba1c038
Remove unnecessary extra block of code.
iantei Mar 22, 2024
531e510
Update the study_type to program from study.
iantei Mar 22, 2024
541a973
Update the metric list description for ntrips_total_replaced_mode.
iantei Mar 22, 2024
9270ea9
Update access to data_eb and expanded_ct after the check of it not be…
iantei Mar 24, 2024
310f36e
Update else statement.
iantei Mar 24, 2024
6a3684b
Added by land in plot_title_no_quality.
iantei Mar 24, 2024
9954f40
Update Markdown for individual Stacked Bar Charts.
iantei Mar 24, 2024
e76733b
Update the metrics options to list three options for replaced mode.
iantei Apr 8, 2024
0dd48e9
1. Update the text from More Info to View as Text. 2. Show the View a…
iantei Apr 8, 2024
d0d19ba
Introduce new function for filter_inferred_trips.
iantei Apr 8, 2024
a25dfb7
Introduce expand_inferredlabels function.
iantei Apr 8, 2024
2a98e7a
Introduce new quality data functions to return the values for the bar…
iantei Apr 8, 2024
a8c4529
1. Remove old implementation of load_viz_notebook_data, and introduce…
iantei Apr 8, 2024
e5deba0
Update load_viz_notebook_data with unified form for both inferred and…
iantei Apr 8, 2024
1ee4c94
1. Update the load_viz_notebook_data() to return values_dict 2. Updat…
iantei Apr 8, 2024
8d676aa
1. Introduce data_eb_inferred. 2. Return the value for mode_dict. 3.U…
iantei Apr 8, 2024
83ab16d
1. Update inferred bar. 2. Update the text description for the Y-axis…
iantei Apr 8, 2024
98c5a28
For Number of Trips for Replaced Mode: 1. Update inferred bar. 2. Upd…
iantei Apr 8, 2024
5b83d3f
Update the cutoff to consider just expanded_ct_sensed. Update process…
iantei Apr 8, 2024
b8fc519
For 80th percentile number of trips: 1. Update inferred bar. 2. Updat…
iantei Apr 8, 2024
5db935a
For commute trips: 1. Update inferred bar. 2. Update the text descrip…
iantei Apr 8, 2024
16df1af
For Total Trip Length covered by each mode: 1. Update inferred bar. 2…
iantei Apr 8, 2024
091324d
For Total Trip Length covered by each mode in Land: 1. Update inferre…
iantei Apr 8, 2024
735f32a
For Total Trip Length covered by replaced mode: 1. Update inferred ba…
iantei Apr 8, 2024
9fa7652
For number of trips for each purpose: 1. Remove the mode_specific com…
iantei Apr 8, 2024
2885bfa
Add 100% stacked bar chart for number of trips for each purpose by r…
iantei Apr 8, 2024
97b05ae
Update the value from total_trip_ to total_trip_length_ to match the …
iantei Apr 8, 2024
c73583d
Update the return values for updated load_viz_notebook_data().
iantei Apr 8, 2024
7195dcc
Adding % of total trips for 80th percentile charts.
iantei Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the metric list description for ntrips_total_replaced_mode.
iantei committed Mar 22, 2024
commit 541a9731a9e15f68a66fea4de5619162513f2911
2 changes: 1 addition & 1 deletion frontend/metrics_program.html
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<option value="ts_users" data-sizex="8" data-sizey="2">Timeseries of active users</option>
<option value="ts_all_modes" data-sizex="8" data-sizey="2">Timeseries of all mode shares</option>
<!-- Mode Specific -->
<option value="ntrips_total_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific number of trips (${data.display_config.use_imperial}) by replaced mode</option>
<option value="ntrips_total_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific number of trips by replaced mode</option>
<option value="total_trip_length_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific trip length (${data.display_config.use_imperial}) by replaced mode</option>
<option value="average_miles_replaced_mode" data-sizex="6" data-sizey="4">Average ${data.display_config.use_imperial} for each replaced mode (w/Other)</option>
<option value="ntrips_${data.intro.mode_studied}_per_day" data-sizex="6" data-sizey="4">`${data.intro.mode_studied}` specific Trip frequency</option>
2 changes: 1 addition & 1 deletion frontend/metrics_program_withoutEnergyMetrics.html
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<option value="ts_users" data-sizex="8" data-sizey="2">Timeseries of active users</option>
<option value="ts_all_modes" data-sizex="8" data-sizey="2">Timeseries of all mode shares</option>
<!-- Mode Specific -->
<option value="ntrips_total_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific number of trips (${data.display_config.use_imperial}) by replaced mode</option>
<option value="ntrips_total_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific number of trips by replaced mode</option>
<option value="total_trip_length_replaced_mode" data-sizex="10" data-sizey="4">${data.intro.mode_studied}` specific trip length (${data.display_config.use_imperial}) by replaced mode</option>
<option value="average_miles_replaced_mode" data-sizex="6" data-sizey="4">Average ${data.display_config.use_imperial} for each replaced mode (w/Other)</option>
<option value="ntrips_${data.intro.mode_studied}_per_day" data-sizex="6" data-sizey="4">`${data.intro.mode_studied}` specific Trip frequency</option>