singularity-energy / open-grid-emissions

Tools for producing high-quality hourly generation and emissions data for U.S. electric grids
MIT License
67 stars 4 forks source link

Check for complete timeseries #299

Closed grgmiller closed 1 year ago

grgmiller commented 1 year ago

This PR adds a validation function that each hourly timeseries. When this function is called, you can specify whether you want to check for a complete annual timeseries, or a complete timeseries within each month, depending on the context.

If the period is a 'year', checks that the length of the timeseries is 8760 (for a non-leap year) or 8784 (for a leap year). If the period is a 'month', checks that the length of the timeseries is equal to the length of the complete date_range between the earliest and latest timestamp in a month.

image

This PR fixes CAR-1996.