Open knoffelcut opened 3 years ago
I don't know of any good resource to get the schedules of different areas. AFAIK, the best is to go to your local municipality or electricity provider's website, and find it there - but the formats tend to be completely inconsistent across areas.
If I remember right, I 'hand-crafted' the "City Power" schedule by copy-pasting from the PDF and tidying up the output - which is where the format comes from.
If you look at https://github.com/m3h/loadshedding/blob/eb5c6e370f3fb94c329af674a6b06255ed7c6270/load_shedding_cp.csv#L1-3
you'll see the first line has the headers for the csv. The headers are 'start', 'end', 'stage', and the day of the month.
The contents is then 'start' - start time of the loadshedding block 'end' - end time of the loadshedding block 'stage' - loadshedding stage for row and then which blocks are affected for which day in that row.
The format also only lists the blocks that start being applicable for a particular stage from that stage upwards. e.g. if block 3A is listed at 10:00 on the 1st of the month for stage 1, it is implied that it is listed for stages 2-8 as well.
There's also a number of projects relating to loadshedding. A quick google turns up things that might come in handy... e.g. look at this
https://mybroadband.co.za/forum/threads/loadshedding-api.672196/post-24690490
This looks really useful. Might be able to get the stages etc. from Eskom's API
Only "City Power" is currently included. Other areas, along with a
readme.md
describing the porting procedure and any relevant scripts used for porting to this repo's format, would be great.