co2birthdate / dataops

The Unlicense
1 stars 1 forks source link

Generate co2 data for each possible date in range #1

Closed philshem closed 4 years ago

philshem commented 4 years ago

Various co2 data sources are described in the answers here: https://opendata.stackexchange.com/questions/17563/regular-source-for-global-carbon-dioxide-in-the-atmosphere

We need a backend code that collects daily/weekly/monthly/yearly data and creates a dictionary for each date. If there is no value, then the code uses a step function between the date range. See, for example, pandas functions .resample() and .interpolate().

dnew = df.resample("1d").interpolate("time")

source

philshem commented 4 years ago

completed with https://github.com/co2birthdate/dataops/commit/379b77d1a7b48da01e79b7d996e62f31c84f05a3