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
Show file tree
Hide file tree
Changes from all commits
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
67 changes: 54 additions & 13 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
const study_name = first_domain.substr(0, openpath_index);
return study_name;
}

var mode_studied
$(function () {
$(document).ready(function () {
// Simple solution to program/study plots dropdown; load the config and corresponding metrics.html
Expand All @@ -403,6 +403,7 @@
// get units
const dist_units = (data.display_config.use_imperial) ? "miles" : "kilometers";
console.log("Units for display are", data.display_config.use_imperial, dist_units);
mode_studied = data.intro.mode_studied
// Load list of plots corresponding to study/program
dynamic_labels = data.label_options
if (data.intro.program_or_study == 'program') {
Expand All @@ -422,11 +423,9 @@
const unitConfigured = configuredResponse.replaceAll("${data.display_config.use_imperial}", dist_units);
$('#metric').append(unitConfigured);
addPreconfiguredMetrics([
"ntrips_mode_confirm",
"miles_mode_confirm",
"ntrips_sensed_mode",
"miles_sensed_mode",
`ntrips_${data.intro.mode_studied}_purpose`,
"ntrips_total",
"total_trip_length",
"ntrips_purpose",
`ntrips_${data.intro.mode_studied}_per_weekday`,
`sketch_CO2impact_${data.intro.mode_studied}`
]);
Expand All @@ -450,10 +449,8 @@
const unitConfigured = response.replaceAll("${data.display_config.use_imperial}", dist_units);
$('#metric').append(unitConfigured);
addPreconfiguredMetrics([
"ntrips_mode_confirm",
"miles_mode_confirm",
"ntrips_sensed_mode",
"miles_sensed_mode",
"ntrips_total",
"total_trip_length",
"ntrips_purpose",
"ntrips_sensed_per_weekday",
"ts_emissions_user"
Expand Down Expand Up @@ -531,15 +528,59 @@
// and without this change, even if we set the dateVal to ''
// we would try to load ntrips_purpose__default.png
const imgFile = "plots/" + metric + "_" + dateVal + program + ".png";
const htmlFile = "plots/" + metric + "_" + dateVal + program + ".html";
const altTextFile = "plots/" + metric + "_" + dateVal + program + ".txt";
const altText = loadFile(altTextFile);
const nw = ["<li data-min-sizex='2' data-min-sizey='2'>"
const isStackedMetric = ['ntrips_total', 'ntrips_purpose', 'ntrips_under80', 'ntrips_commute_mode_confirm',
'total_trip_length', 'total_trip_length_land',`ntrips_${mode_studied}_total`,
`ntrips_${mode_studied}_purpose`,`total_trip_length_${mode_studied}_replaced_mode`]
.includes(metric);
const jsonData = { metric, dateVal, program, metricLabel, dateLabel, programLabel, sizex, sizey };

if (isStackedMetric){
const nw = ["<li data-min-sizex='2' data-min-sizey='2'>"
+ labelText
+ "&nbsp;"
+ "<button class= 'btn btn_default addInfo' style='color: black; background-color: none; border-color: white;' data-info='" + encodeURIComponent(JSON.stringify(jsonData))+ "'> View as Text </button>"
+ "&nbsp;"
+ "<button class='remove'>x</button>"
+ "<img src='" + imgFile + "' alt='" + altText + "' width=90% height=90%>"
+ "</li>",
sizex, sizey];
gridster.add_widget.apply(gridster, nw);
}
else{
const nw = ["<li data-min-sizex='2' data-min-sizey='2'>"
+ labelText
+ "<button class='remove'>x</button>"
+ "<img src='" + imgFile + "' alt='" + altText + "' width=90% height=90%>"
+ "</li>",
sizex, sizey];
gridster.add_widget.apply(gridster, nw);
}
});

$('body').on("click", ".gridster ul > li .addInfo", function () {
const addButton = $(this);
const additionalInfo = JSON.parse(decodeURIComponent(addButton.data('info')));
const metric = additionalInfo.metric;
const dateVal = additionalInfo.dateVal;
const program = additionalInfo.program;
const metricLabel = additionalInfo.metricLabel;
const dateLabel = additionalInfo.dateLabel;
const programLabel = additionalInfo.programLabel;
const sizex = additionalInfo.sizex;
const sizey = additionalInfo.sizey;
const labelText = metricLabel + " " + dateLabel + " " + programLabel;
const htmlFile = "plots/" + metric + "_" + dateVal + program + ".html";

const nw_additionalInformation = ["<li data-min-sizex='2' data-min-sizey='2'>"
+ labelText
+ "<button class='remove'>x</button>"
+ "<img src='" + imgFile + "' alt='" + altText + "' width=90% height=90%>"
+ "<object data='" + htmlFile + "' type='text/html' style='margin-top: 20px;' width='90%' height='90%'></object>"
+ "</li>",
sizex, sizey];
gridster.add_widget.apply(gridster, nw);
gridster.add_widget.apply(gridster, nw_additionalInformation);
});

$('body').on("click", ".gridster ul > li .remove", function () {
Expand Down
22 changes: 10 additions & 12 deletions frontend/metrics_program.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<!-- Generic -->
<option value="ntrips_mode_confirm" data-sizex="4" data-sizey="4">Number of trips</option>
<option value="ntrips_commute_mode_confirm" data-sizex="4" data-sizey="4">Number of commute trips</option>
<option value="ntrips_sensed_mode" data-sizex="4" data-sizey="4">Number of trips (sensed)</option>
<option value="ntrips_purpose" data-sizex="4" data-sizey="4">Trip count by purpose</option>
<option value="ntrips_under10miles_mode_confirm" data-sizex="4" data-sizey="4">Trip count under 80th pecentile</option>
<option value="ntrips_under10miles_sensed_mode" data-sizex="4" data-sizey="4">Trip count under 80th percentile (sensed)</option>
<option value="miles_mode_confirm" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by mode</option>
<option value="miles_sensed_mode" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by mode (sensed)</option>
<option value="miles_sensed_mode_land" data-sizex="4" data-sizey="4">Trip length by land mode (sensed)</option>
<option value="ntrips_total" data-sizex="10" data-sizey="4">Number of trips</option>
<option value="ntrips_under80" data-sizex="10" data-sizey="4">Number of trips (under 80th percentile of total trips)</option>
<option value="ntrips_commute_mode_confirm" data-sizex="10" data-sizey="4">Number of commute trips</option>
<option value="total_trip_length" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode</option>
<option value="total_trip_length_land" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode in land</option>
<option value="ntrips_purpose" data-sizex="10" data-sizey="4">Number of trips by purpose</option>
<option value="average_miles_mode_confirm" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial})</option>
<option value="average_miles_sensed_mode" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial}) (sensed)</option>
<option value="ntrips_per_day" data-sizex="6" data-sizey="4">Trip frequency</option>
Expand All @@ -20,9 +17,10 @@
<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_${data.intro.mode_studied}_purpose" data-sizex="4" data-sizey="4">`${data.intro.mode_studied}` specific trip count by purpose</option>
<option value="miles_${data.intro.mode_studied}_replaced_mode" data-sizex="4" 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="4" data-sizey="4">Average Miles for each replaced mode (w/Other)</option>
<option value="ntrips_${data.intro.mode_studied}_total" data-sizex="10" data-sizey="4">`${data.intro.mode_studied}` specific number of trips by replaced mode</option>
<option value="ntrips_${data.intro.mode_studied}_purpose" data-sizex="10" data-sizey="4">`${data.intro.mode_studied}` specific number of trips by purpose</option>
<option value="total_trip_length_${data.intro.mode_studied}_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>
<option value="ntrips_${data.intro.mode_studied}_per_weekday" data-sizex="6" data-sizey="4">`${data.intro.mode_studied}` specific Trips per weekday</option>
<option value="sketch_energy_impact_${data.intro.mode_studied}" data-sizex="6" data-sizey="4">Sketch of `${data.intro.mode_studied}` specific energy impact</option>
Expand Down
22 changes: 10 additions & 12 deletions frontend/metrics_program_withoutEnergyMetrics.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<!-- Replica of metrics_program.html without energy options-->
<!-- Generic -->
<option value="ntrips_mode_confirm" data-sizex="4" data-sizey="4">Number of trips</option>
<option value="ntrips_commute_mode_confirm" data-sizex="4" data-sizey="4">Number of commute trips</option>
<option value="ntrips_sensed_mode" data-sizex="4" data-sizey="4">Number of trips (sensed)</option>
<option value="ntrips_purpose" data-sizex="4" data-sizey="4">Trip count by purpose</option>
<option value="ntrips_under10miles_mode_confirm" data-sizex="4" data-sizey="4">Trip count under 80th percentile</option>
<option value="ntrips_under10miles_sensed_mode" data-sizex="4" data-sizey="4">Trip count under 80th percentile (sensed)</option>
<option value="miles_mode_confirm" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by mode</option>
<option value="miles_sensed_mode" data-sizex="4" data-sizey="4">Trip length by mode (sensed)</option>
<option value="miles_sensed_mode_land" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by land mode (sensed)</option>
<option value="ntrips_total" data-sizex="10" data-sizey="4">Number of trips</option>
<option value="ntrips_under80" data-sizex="10" data-sizey="4">Number of trips (under 80th percentile of total trips)</option>
<option value="ntrips_commute_mode_confirm" data-sizex="10" data-sizey="4">Number of commute trips</option>
<option value="total_trip_length" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode</option>
<option value="total_trip_length_land" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode in land</option>
<option value="ntrips_purpose" data-sizex="10" data-sizey="4">Number of trips by purpose</option>
<option value="average_miles_mode_confirm" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial})</option>
<option value="average_miles_sensed_mode" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial}) (sensed)</option>
<option value="ntrips_per_day" data-sizex="6" data-sizey="4">Trip frequency</option>
Expand All @@ -20,9 +17,10 @@
<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_${data.intro.mode_studied}_purpose" data-sizex="4" data-sizey="4">`${data.intro.mode_studied}` specific trip count by purpose</option>
<option value="miles_${data.intro.mode_studied}_replaced_mode" data-sizex="4" data-sizey="4">`${data.intro.mode_studied}` specific trip distance (${data.display_config.use_imperial}) by replaced mode</option>
<option value="average_miles_replaced_mode" data-sizex="4" data-sizey="4">Average Miles for each replaced mode (w/Other)</option>
<option value="ntrips_${data.intro.mode_studied}_total" data-sizex="10" data-sizey="4">`${data.intro.mode_studied}` specific number of trips by replaced mode</option>
<option value="ntrips_${data.intro.mode_studied}_purpose" data-sizex="10" data-sizey="4">`${data.intro.mode_studied}` specific number of trips by purpose</option>
<option value="total_trip_${data.intro.mode_studied}_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>
<option value="ntrips_${data.intro.mode_studied}_per_weekday" data-sizex="6" data-sizey="4">`${data.intro.mode_studied}` specific Trips per weekday</option>
<option value="sketch_CO2impact_${data.intro.mode_studied}" data-sizex="6" data-sizey="4">Sketch of `${data.intro.mode_studied}` specific emission impact</option>
Expand Down
15 changes: 6 additions & 9 deletions frontend/metrics_study.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<!-- Generic -->
<option value="ntrips_mode_confirm" data-sizex="4" data-sizey="4">Number of trips</option>
<option value="ntrips_commute_mode_confirm" data-sizex="4" data-sizey="4">Number of commute trips</option>
<option value="ntrips_sensed_mode" data-sizex="4" data-sizey="4">Number of trips (sensed)</option>
<option value="ntrips_purpose" data-sizex="4" data-sizey="4">Trip count by purpose</option>
<option value="ntrips_under10miles_mode_confirm" data-sizex="4" data-sizey="4">Trip count under 80th percentile</option>
<option value="ntrips_under10miles_sensed_mode" data-sizex="4" data-sizey="4">Trip count under 80th percentile (sensed)</option>
<option value="miles_mode_confirm" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by mode</option>
<option value="miles_sensed_mode" data-sizex="4" data-sizey="4">Trip length (${data.display_config.use_imperial}) by mode (sensed)</option>
<option value="miles_sensed_mode_land" data-sizex="4" data-sizey="4">Trip length by land mode (${data.display_config.use_imperial}) (sensed)</option>
<option value="ntrips_total" data-sizex="10" data-sizey="4">Number of trips</option>
<option value="ntrips_under80" data-sizex="10" data-sizey="4">Number of trips (under 80th percentile of total trips)</option>
<option value="ntrips_commute_mode_confirm" data-sizex="10" data-sizey="4">Number of commute trips</option>
<option value="total_trip_length" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode</option>
<option value="total_trip_length_land" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode in land</option>
<option value="ntrips_purpose" data-sizex="10" data-sizey="4">Number of trips by purpose</option>
<option value="average_miles_mode_confirm" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial})</option>
<option value="average_miles_sensed_mode" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial}) (sensed)</option>
<option value="ntrips_per_day" data-sizex="6" data-sizey="4">Trip frequency</option>
Expand Down
15 changes: 6 additions & 9 deletions frontend/metrics_study_withoutEnergyMetrics.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<!-- Replica of metrics_study.html without energy option-->
<!-- Generic -->
<option value="ntrips_mode_confirm" data-sizex="4" data-sizey="4">Number of trips</option>
<option value="ntrips_commute_mode_confirm" data-sizex="4" data-sizey="4">Number of commute trips</option>
<option value="ntrips_sensed_mode" data-sizex="4" data-sizey="4">Number of trips (sensed)</option>
<option value="ntrips_purpose" data-sizex="4" data-sizey="4">Trip count by purpose</option>
<option value="ntrips_under10miles_mode_confirm" data-sizex="4" data-sizey="4">Trip count under 80th Percentile</option>
<option value="ntrips_under10miles_sensed_mode" data-sizex="4" data-sizey="4">Trip count under 80th Percentile (sensed)</option>
<option value="miles_mode_confirm" data-sizex="4" data-sizey="4">Trip distance (${data.display_config.use_imperial}) by mode</option>
<option value="miles_sensed_mode" data-sizex="4" data-sizey="4">Trip distance (${data.display_config.use_imperial}) by mode (sensed)</option>
<option value="miles_sensed_mode_land" data-sizex="4" data-sizey="4">Trip distance by land mode (sensed)</option>
<option value="ntrips_total" data-sizex="10" data-sizey="4">Number of trips</option>
<option value="ntrips_under80" data-sizex="10" data-sizey="4">Number of trips (under 80th percentile of total trips)</option>
<option value="ntrips_commute_mode_confirm" data-sizex="10" data-sizey="4">Number of commute trips</option>
<option value="total_trip_length" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode</option>
<option value="total_trip_length_land" data-sizex="10" data-sizey="4">Total trip length (${data.display_config.use_imperial}) covered by mode in land</option>
<option value="ntrips_purpose" data-sizex="10" data-sizey="4">Number of trips by purpose</option>
<option value="average_miles_mode_confirm" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial})</option>
<option value="average_miles_sensed_mode" data-sizex="6" data-sizey="4">Average trip length (${data.display_config.use_imperial}) (sensed)</option>
<option value="ntrips_per_day" data-sizex="6" data-sizey="4">Trip frequency</option>
Expand Down
2 changes: 0 additions & 2 deletions viz_scripts/docker/crontab
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
0 7 * * * python bin/update_mappings.py mapping_dictionaries.ipynb >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py generic_metrics.ipynb default >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py generic_metrics_sensed.ipynb default >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py generic_timeseries.ipynb default >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py mode_specific_metrics.ipynb default >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py mode_specific_timeseries.ipynb default >> /var/log/intake.stdinout 2>&1
0 8 * * * python bin/generate_plots.py energy_calculations.ipynb default >> /var/log/intake.stdinout 2>&1
# For testing only
Expand Down
2 changes: 1 addition & 1 deletion viz_scripts/energy_calculations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"outputs": [],
"source": [
"expanded_ct, file_suffix, quality_text, debug_df = scaffolding.load_viz_notebook_data(year,\n",
"expanded_ct, _, file_suffix, quality_text, debug_df, _ = scaffolding.load_viz_notebook_data(year,\n",
" month,\n",
" program,\n",
" study_type,\n",
Expand Down
Loading