-
Notifications
You must be signed in to change notification settings - Fork 11
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
update custom label-options to new specification #120
Conversation
As part of the work on unifying footprint calculations, the label options spec gets the following changes: - baseMode renamed to base_mode (to be consistent with other config fields which are snake_case) - the new 'footprint' field, which is an object with energy intensities broken down by fuel type. This will replace 'kgCo2PerKm'. - properties are inherited from the base_mode. For example, a mode label option with base_mode of CAR will inherit the icon, color, met, and footprint of CAR. These can still be overridden if given on the mode label option. I have updated the existing label options to adhere to this. Many of the existing fields will no longer be used or will be redundant because the base mode already provide them. I have left these fields in the JSON files for backwards-compatibility reasons, organized onto a separate, indented line. Once we are confident that users are on a new version of the app, we can remove them. Only the fields on the unindented lines will remain. example-program-label-options.json and example-study-label-options.json are removed. Instead of these, we are going to have the docs point to the "default" label options (https://github.com/JGreenlee/e-mission-common/blob/master/src/emcommon/resources/label-options.default.json) to give deployers an example of how to set up a label options file the example label-options were not used by anything except the dev-emulator configs. I removed the label_options field from these, so they will just use the default label options.
701c157
to
ad5f991
Compare
"baseMode":"BICYCLING", "met": {"ALL": {"range": [0, -1], "mets": 6}}, "kgCo2PerKm": 0}, | ||
{"value":"taxi", "base_mode": "TAXI", | ||
"baseMode":"TAXI", "met_equivalent":"IN_VEHICLE", "kgCo2PerKm": 0.30741}, | ||
{"value":"bike_scooter_share", "base_mode": "BICYCLING", "footprint": {"electric": {"wh_per_km": 8.39, "wh_per_trip": 2.05 }}, |
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.
The kgCo2PerKm
for bike_scooter_share
was 0.00447
, which is exactly half of what the default e_scooter kgCo2PerKm
was (0.00894
)
So it seems like bikeshare was assumed to be 0 (i.e. rebalancing was ignored) and then an average was taken of bikeshare and scootershare.
For the new footprint
field, I have done the same – took half of the new scootershare footprint (electric @ 16.78 Wh / km + 4.1 Wh / trip)
"baseMode":"MOPED", "met_equivalent":"IN_VEHICLE", "kgCo2PerKm": 0.085416859}, | ||
{"value":"auto_rickshaw", "base_mode": "MOPED", "icon": "rickshaw", "footprint": { "electric": { "wh_per_km": "TODO" }}, | ||
"baseMode":"MOPED", "met_equivalent":"IN_VEHICLE", "kgCo2PerKm": 0.231943784}, | ||
{"value":"motorcycle", "base_mode": "MOPED", "footprint": { "gasoline": { "wh_per_km": "TODO" }}, |
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.
TODO need updated footprint
s for e-auto_rickshaw
, auto_rickshaw
, and motorcycle
.
@Abby-Wheelis do you know where the kgCo2PerKm
values came from?
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 never documented where I got those from ... unfortunately, looking and documenting now:
e-rickshaw: 341.82 Wh/km from a study in Bangkok
auto_rickshaw: (gasoline) 10km/L -> 970 Wh/km
motorcycle: (gasoline) 20.5km/L -> 473.17 Wh/km
based on an energy inventory, and assumed 9700 wh/L
@@ -24,7 +24,6 @@ | |||
} | |||
} | |||
}, | |||
"label_options": "https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/label_options/example-program-label-options.json", |
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.
@JGreenlee why did we remove these?
As part of the work on unifying footprint calculations, the label options spec gets the following changes:
I have updated the existing label options to adhere to this. Many of the existing fields will no longer be used or will be redundant because the base mode already provide them. I have left these fields in the JSON files for backwards-compatibility reasons, organized onto a separate, indented line. Once we are confident that users are on a new version of the app, we can remove them. Only the fields on the unindented lines will remain.
example-program-label-options.json and example-study-label-options.json are removed. Instead of these, we are going to have the docs point to the "default" label options (https://github.com/JGreenlee/e-mission-common/blob/master/src/emcommon/resources/label-options.default.json) to give deployers an example of how to set up a label options file.
The example label-options were not used by anything except the dev-emulator configs. I removed the label_options field from these, so they will just use the default label options.