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

Model Plugin - watttime #125

Closed
3 tasks
jawache opened this issue Sep 6, 2023 · 0 comments · Fixed by #130 or #140
Closed
3 tasks

Model Plugin - watttime #125

jawache opened this issue Sep 6, 2023 · 0 comments · Fixed by #130 or #140
Assignees

Comments

@jawache
Copy link
Contributor

jawache commented Sep 6, 2023

  • What: Building a plugin to the watttime API
  • Why: So we can include grid-ci metrics to observations
  • DoD:
  • Does the model meet the specification?
  • Does the model have complete test coverage, including edge cases, happy path and error cases?
  • Is the code documented?

Config

  • variable: If this variable is present in the top level config what behaviour does it trigger? What is the default value if none is provided?

Observation

List the variables this model expects in an input observation

  • location: A location values, for now it can be a lat/lon but in the future we will think about this differently.
  • timestamp: The time of the observation.
  • duration: The duration of the observation.

Impacts

List the variables this model exports out as an impact

  • grid-ci: The carbon intensity of the grid in this region for this time.

Behavior

  • Calls the WattTime API which return grid-ci values for a particular region: https://www.watttime.org/api-documentation/#grid-emissions-data
  • You will need to pass in the start time for the first observation and the start time for the last observation.
  • It seems to return all the data in 5 min increments, need to figure out how to map this to your series of observations which might not on the same 5 min time series. Investigate and propose an idea to the team for us to discuss before you implement.

Assumptions

What are the core assumptions this model makes?

  • The watttime API needs authentication, the GSF has a license, pls don't checkin.
  • Make the authentication work using environment variables.
  • Their API works for free in the CAISO region (California) so for integration tests might be best to use that.
  • The data they return is in lbs/kWh need to convert into gCO2e/kWh!

Limitations

In what situations is this model limited in it's function, behaviour, accuracy etc...

  • The API is rate limited, so try to make as few API calls as possible (so not once per observation, once per observation series).
  • You can make the assumption that he location in the first observation is the same as all the other observations.

Example

Provide at least one example of some input config and observations. This is in pimpl format not rimpl format, so the config is the global config and all parameters must be present on the observation.

Input

config:
 location: <lat>,<lon>
observations: 
  - timestamp: 2023-07-06T00:00
    duration: 3600

Output

config:
 location: <lat>,<lon>
observations: 
  - timestamp: 2023-07-06T00:00
    duration: 3600
impacts: 
  - timestamp: 2023-07-06T00:00
    duration: 3600
    grid-ci: 100
@jawache jawache added the model label Sep 6, 2023
@gnanakeethan gnanakeethan moved this to In Progress in IF Sep 7, 2023
@gnanakeethan gnanakeethan linked a pull request Sep 8, 2023 that will close this issue
9 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in IF Sep 13, 2023
@gnanakeethan gnanakeethan linked a pull request Sep 14, 2023 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants