e-mission / em-public-dashboard

A simple and stupid public dashboard prototype.
BSD 3-Clause "New" or "Revised" License
0 stars 23 forks source link

Air as a land mode? #140

Open Abby-Wheelis opened 4 months ago

Abby-Wheelis commented 4 months ago

After recent updates, we're noticing that "Air" is appearing as a land mode on production here: godcgo in the "Miles covered by land transport" chart

image

Looking at the code, we do filter out "Airplane" from labeled modes - labeled_land_trips_df = expanded_ct[expanded_ct['Mode_confirm'] != \"Airplane\"] if \"Mode_confirm\" in expanded_ct.columns else None

But in the label options for godcgo the have "air" {"value":"air", "baseMode":"AIR", "met_equivalent":"IN_VEHICLE", "kgCo2PerKm": 0.09975}

Maybe we need to support "air" and "Airplane" OR filter out whichever one has the air base mode?

shankari commented 4 months ago

Note that the code is checking for Mode_confirm with a capital M, which is the display mode. It looks like it is checking for "Airplane" but our display mode is actually "Air". Given that we support custom labels now, the display label can be anything. We should probably switch to the base mode for this and any other mode/purpose checks. I think that the only other one is commute, and we have already switched that.