carbon-data-specification / Power-Systems-Data

This repository is dedicated to the Power Systems Data Working Group
Other
10 stars 8 forks source link

Should we use key/values for topology and import/capacity? #76

Open Pierre-VF opened 11 months ago

Pierre-VF commented 11 months ago

An alternative way to model capacity in the endpoints (see https://github.com/carbon-data-specification/Power-Systems-Data/blob/main/specifications/cdsc-wg2-03.md )

The current way to display is:

{
    "id": "US-WECC-CISO",
    "imports": [
      {
          "startDatetime": "2021-06-01 00:00:00+00",
          "endDatetime": "2021-06-01 01:00:00+00",
          "measurement": 10.5,
          "unit": "MWh",
           "importByConnectedPSR": [
              {
                "connectedPSR": "US-WECC-LADWP",
                "measurement": 5.5
              },
              {
                "connectedPSR": "US-WECC-BANC",
                "measurement": 10.5
              },
            },...
      },...
    ],
    "next": null,
    "previous": null
}

A shortened way would be:

{
    "id": "US-WECC-CISO",
    "imports": [
      {
          "startDatetime": "2021-06-01 00:00:00+00",
          "endDatetime": "2021-06-01 01:00:00+00",
          "measurement": 10.5,
          "unit": "MWh",
           "importByConnectedPSR": {
                        "US-WECC-LADWP": 5.5,
                "US-WECC-BANC": 10.5,
            },
         }
    ],
    "next": null,
    "previous": null
}

And this could be generalised to other similar endpoints.

Upsides:

Downsides: