-
Notifications
You must be signed in to change notification settings - Fork 9
Plot the carbon intensity time series #112
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
- Coverage 87.48% 82.69% -4.79%
==========================================
Files 13 14 +1
Lines 631 676 +45
==========================================
+ Hits 552 559 +7
- Misses 79 117 +38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Makes use of our 'output' and the 'forecast' to plot a timeseries of the CI alongside highlights for the CI of running now or running at the optimal time.
We may want to think about this a bit (it's a big package) and the version number is a guess, but let's get the tests running for now.
@andreww one way to handle matplotlib is by putting in as an optional dependency, in a |
Add coloured text giving mean carbon intensity for best and now start times. Make date format on x axis easer to read.
I was seeing a bunch of fractional seconds in the shell output, which is a bit ugly. Explicity set formatting to match our test cases.
This should also print a useful error if it's not installed
We just need to print out a message if --plot is passed.
Thanks - I did this. It ended up being a little fiddly because of the type testing but it seems to be working. Ready to merge? |
@andreww I don't see any interpolation here, running with
Zooming in on the plots figure, I see a 30 min window highlighted, rather than 60 minutes (starting now, red): and the optimal time (green) ![]() |
Ugh, yes, I see. I need to add the start and end times and interpolated values on the start and end of the series of points plotted in green and red. We must have this calculated somewhere - it'll be a case of getting it into the plotting function. Good spot. |
Just a proof of concept for now, but plots the CI forecast time series alongside our planned run times.
Currently looks like this:
I think the optimal and now plots (green and red, respectively) are 30 mins out. Or background data is 30 mins out. Anyhow, this is a start.