-
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
Integrate e-mission-common's CO2 footprint and energy emission calculation into Public Dashboard #146
Comments
I am not sure what you mean by "there is no energy emission available". We do in fact compute the energy consumed in the public dashboard. |
Yes, we compute the energy consumed in the public dashboard, but we don't display the energy consumption for ones which have custom label. We have "Timeseries of energy" metric available for study/program like nrel-commute which uses default labels, i.e. does not have |
The current computation of footprint i.e. CO2 and energy emission in the public dashboard makes use of
For the default label mapping, we are dependent on the |
We have trip information available in the column of the data frame. Maybe we can create a dictionary in the required parameter format, and pass into e-mission-common for footprint calculations. Sample trip format from the test_footprint_calculations
|
Trying to integrate
Got the below issue -
This is likely due to the support for Python 3.10 used, which dashboard still uses Python 3.9. And while trying to use the
This is strange because I assigned previous tag i.e. 0.5.5, which still has the function defined as While this gets fixed, I will explore how to get access to the trip data and baseMode, which are the required parameter of the function |
@JGreenlee I incorporated the following code changes from https://github.com/JGreenlee/e-mission-common/blob/master/test/metrics/test_footprint_calculations.py test in my Jupyter notebook:
I am getting the below issue -
It seems to lookup for data in previous year than 2022, and eventually fails after reaching to 2018. Details of the issue:
|
I have located the issue. It is because only *.py files are being included when emcommon is bundled as a package. Therefore, the I think I need to adjust the |
Update: The Tried approaches to call this sync function:
|
As discussed, changing |
We currently have |
In what instances are there a Replaced Mode that does not have a Mode by the same key? I thought that Replaced Modes were always a subset of Modes |
You're correct! There is only a Replaced Mode - No_travel which is different from the list of Mode. No_travel does not need computation of footprint. This should be fine. |
One idea to cut down on the wait times to map from |
@Abby-Wheelis I think you'd posted a discussion note here. I am unable to see it. |
re-writing from memory since GitHub seems to have eaten what I wrote yesterday, @iantei feel free to add if you remember any additional points There are two general approaches that we could take here:
Both @iantei and I and leaning towards option 2 at this point, but @shankari do you have any additional thoughts? |
some pseudocode for my "local copy of base mode mapping" idea
which can then be used with |
@iantei and @Abby-Wheelis I think we discussed this in an earlier team meeting. I think we should go with (1). To address your points:
What am I missing here? |
Particularly for this reason and the other points you made I think it does make more sense to use the list, and after @iantei and I had poked through the server code together earlier this week, I think I see a relatively clear path to doing so. I'll move forward with implementing the data gathering piece while @iantei wraps up the other open PRs (#148, #145, #150), and then plan to pass it back off for the visualization piece! |
Because of some issues with Docker and loading data, I have not been able to make as much progress on this topic as I would like, but I will pick back up tomorrow. I am also having issues importing from |
If you are having issues using |
I think my biggest issue with importing from |
This is the method Ananta and I came up with that will allow you to use a newer version of e-mission-common for local development/testing diff --git a/viz_scripts/docker/environment36.dashboard.additions.yml b/viz_scripts/docker/environment36.dashboard.additions.yml
index 59d26eb..df84f5e 100644
--- a/viz_scripts/docker/environment36.dashboard.additions.yml
+++ b/viz_scripts/docker/environment36.dashboard.additions.yml
@@ -7,3 +7,4 @@ dependencies:
- pip:
- nbparameterise==0.6
- devcron==0.4
+ - git+https://github.com/JGreenlee/[email protected] There should also be a way to use a local e-mission-common repo with |
Just added this and am now accessing version |
I am now able to add the |
We need to be sure to handle the replaced mode of |
@shankari if you have any ideas on how might be the best way to insert information into the trips before converting them to a dataframe so that the conversion does not fail, that would be great! I have been trying to trace back through |
#152 is working enough to generate the old visualizations, in Our current visualizations show:
Would we like to add anything?
Those last two would mostly show our constants ... but could be interesting particularly in cases like transit |
[label_options](https://github.com/e-mission/nrel-openpath-deploy-configs/tree/main/label_options)
to extract the CO2 emission calculations while there is no energy emission available.The text was updated successfully, but these errors were encountered: