The data shape for the most recent 3 months of data is different to the previous months

#17
by Jack-Kelly - opened
Open Climate Fix org

The 30-minutely data for 2024-12, 2025-01, and 2025-02 looks like this:

date,ss_id,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,datetime_GMT
2024-12-02 00:00:00,2405,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9.25,6.33,104.94,90.58,51.63,55.45,57.32,121.51,38.44,25.45,4.95,6.3,8.49,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2024-12-02T00:00:00.000000000+0000
2024-12-02 00:00:00,2428,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,6.92,31.78,61.46,135.28,71.49,71.83,62.67,58.62,50.57,45.93,22.66,30.69,6.41,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2024-12-02T00:00:00.000000000+0000
2024-12-02 00:00:00,2429,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.04,14.76,14.66,16.36,24.2,40.91,25.29,26.5,24.72,45.6,18.35,13.69,6.16,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2024-12-02T00:00:00.000000000+0000
2024-12-02 00:00:00,2430,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.99,6.99,14.71,19.14,25.13,42.66,25.72,28.91,25.68,55.64,16.43,16.59,4.47,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2024-12-02T00:00:00.000000000+0000
2024-12-02 00:00:00,2431,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,22.1,11.87,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2024-12-02T00:00:00.000000000+0000

In contrast, the data for previous months looks like this:

ss_id (i64) datetime_GMT generation_Wh (f64)
2405 2018-01-01T00:30:00Z 0.0
2406 2018-01-01T00:30:00Z 0.0
2408 2018-01-01T00:30:00Z 0.0
2409 2018-01-01T00:30:00Z 0.0
2410 2018-01-01T00:30:00Z 0.0

Questions:

  1. Does each column t1, t2, ..., t48 represent the watt hours generated for each half-hour period of the day? If so, does t1 represent the total energy generated from 00:00 to 00:30?
  2. Is this how all the data will look, going forwards?
Open Climate Fix org

Thanks for the heads up Jack - I'm presuming your assumption 1 is correct, but as for 2, that's up for discussion! Doesn't feel like it would be too hard to move back to the old structure, for ease of integration?

Open Climate Fix org

Awesome, thanks for the very quick reply, @sol-ocf !

Thanks for confirming that this change happened upstream of OCF.

Yeah, I agree, it'd be nice to keep everything in the same format, to make our users' lives as easy as possible. I'm happy to write some code (in Polars, if that's OK) to convert the new data into the old structure. But, before I do that, we should probably decide on whether we're happy to pivot all the timeseries data so we store the data as very wide tables (as proposed in issue #14).

Open Climate Fix org

I've written some Polars code to convert Sheffield Solar's new "wide" format (where each half hour is a different column) into the "tall and thin" format that was used in previous months. Once I've checked that the newly converted data passes some sanity checks, I'll push it to the repo.

Note that Sheffield Solar's new "wide" format contains quite a lot of duplicates. My code de-duplicates the data.

Open Climate Fix org

OK, I've pushed the reshaped data for the last 3 months in git commit 0c1e859c7e0a3f8c167209eefd69efee65590be2

Jack-Kelly changed discussion status to closed

Sign up or log in to comment