• Stars
    star
    190
  • Rank 203,739 (Top 5 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created over 2 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Get your loadshedding schedule in your calendar and never be left in the dark! Open-source, up-to-date, and developer friendly.

eskom-calendar: loadshedding in your calendar

GitHub downloads GitHub Repo stars Twitter share Discord Eskom-calendar API Health
Support on Ko-Fi Support on Patreon

Loadshedding schedules in your digital calendar. No apps, no ads, up-to-date, and developer friendly.

Get it β€’ Key Features β€’ Using the API β€’ Project goals & alternatives β€’ Website & API uptime

How to Get It

Go to eskomcalendar.co.za and just type in your area! No apps, no adverts, no nonsense. If you want more information, keep reading.

Testimonials

Creator of EskomSePush SAfm
Good Things Guy Stellenbosch University

Key Features

Easy to understand and plan around

eskom-calendar makes planning around loadshedding as easy as it gets. Subscribe to the digital calendar for your area, and you'll see loadshedding in your schedule on your phone, laptop, smartwatch, smartfridge, alles. We'll show you loadshedding as far into the furture as Eskom allows us.

An event in your calendar means your lights are off

Many loadshedding apps don't actually tell you when your lights are off, or if they do, it's difficult to find or only shows you the very next power outage. eskom-calendar shows you all the times your lights will be off, right in your digital calendar.

Perfect for teams and businesses

If you're a team manager, add the calendars for your team members and know exactly when everyone will go dark so you don't have someone dropping off in the middle of a meeting.

Businesses can see loadshedding schedules for all their branches in one view, and prepare accordingly.

IT departments can automate turning on generators or shutting down servers (see Using the Data in Your Own Projects).

No adverts

eskom-calendar does one thing, and does it well. You get an event in your calendar if your power is going to go off, and that's it. There's no adverts, there's no bloat. Just loadshedding information. Doesn't get simpler than that, does it?

The only open source, automation friendly option

eskom-calendar was created by Boyd Kane because there was no way for a casual coder to just get loadshedding information programmatically without messing with API keys and whatnot.

To the best of our knowledge, this is the easiest way to automate away the pain of loadshedding, and it's the only open-source option to provide the times when power will be off, as opposed to just the loadshedding schedule for any given area (please get in contact if I'm wrong!, would be great to collab).

Attribution and using the data (commercially or otherwise)

The data (CSV and ICS files) are available under the CC BY-NC-SA 4.0 license. This means that

You are free to:

  • Share: copy and redistribute the material in any medium or format

  • Adapt: remix, transform, and build upon the material

But only if you follow the following terms:

  • Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

  • NonCommercial: You may not use the material for commercial purposes.

  • ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

  • No additional restrictions: You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Attribution should be done in a form similar to how StackOverflow requires it. Specifically:

  • Visually indicate that the content is from EskomCalendar in some way. It doesn’t have to be obnoxious; a discreet text blurb is fine.

  • When a specific calendar is being used, you must hyperlink directly to the website's version of that calendar (for example, https://eskomcalendar.co.za/ec?calendar=city-of-cape-town.ics). You do not have to present the full URL to the user, so long as it is clear that it is an EskomCalendar URL.

  • If no specific calendar is being used, or the machine_friendly.csv file is being used, you must either hyperlink directly to the project website (https://eskomcalendar.co.za) or directly to the project github page (https://github.com/beyarkay/eskom-calendar)

By directly, we mean each hyperlink must point directly to the specified URL in standard HTML visible even with JavaScript disabled, and not use a tinyurl or any other form of obfuscation or redirection. Furthermore, the links must not be nofollowed.

Using the API

We are really interested to see what the developers of South Africa do with this data source. Go view the api here

Hey! The API is version 0.0.1, so might still have some rough edges. That said, it does have all the data you'd want for regular usage and should already be stable enough for hobby projects. If you find a problem or have a suggestion, please open an issue on the API repo ❀️

Thanks to the folks at shuttle.rs for powering the backend! Honestly it probably wouldn't have happened without their free tier.

As a quick preview, the API lets you get the times when Stellenbosch will be out of power with a simple get request:

curl https://eskom-calendar-api.shuttleapp.rs/outages/western-cape-stellenbosch | jq

[
  {
    "area_name": "western-cape-stellenbosch",
    "stage": 6,
    "start": "2023-06-01T18:00:00+02:00",
    "finsh": "2023-06-01T20:30:00+02:00",
    "source": "https://twitter.com/Eskom_SA/status/1664250326818365440"
  },
  ...
]

Go check it out! It's free and unrestricted.

curl-ing the raw github data

(This method has been replaced by the API, and isn't as nice to use as the API.)

The main file of interest will be machine_friendly.csv built from the same source of information as the calendar files. It looks something like:

       β”‚ File: machine_friendly.csv
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   β”‚ area_name,start,finsh,stage,source
   2   β”‚ kwazulu-natal-mpofana,2022-09-25T23:00:00+02:00,2022-09-26T01:30:00+02:00,3,"https://twitter.com/Eskom_SA/status/1574014612097454080"
   3   β”‚ kwazulu-natal-mpofana,2022-09-26T07:00:00+02:00,2022-09-26T09:30:00+02:00,3,"https://twitter.com/Eskom_SA/status/1574014612097454080"
   4   β”‚ kwazulu-natal-mpofana,2022-09-26T16:00:00+02:00,2022-09-26T17:30:00+02:00,4,"https://twitter.com/Eskom_SA/status/1574014612097454080"

and you can just curl the file to get ahold of it. So go wild! DDoS Github if you want to πŸ˜‰. There are plenty of ideas floating around and I'd love to see more. Note that the header is finsh, not finish (so that it lines up nicely with start)

Simply download the CSV via curl (-s to be silent, -L to follow redirects)

curl -sL https://github.com/beyarkay/eskom-calendar/releases/download/latest/machine_friendly.csv
area_name,stage,start,finsh,source
free-state-seretse,4,2022-09-10T10:00:00+02:00,2022-09-10T12:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
free-state-seretse,4,2022-09-10T18:00:00+02:00,2022-09-10T20:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
...

Get all data for a specific area

curl -sL https://github.com/beyarkay/eskom-calendar/releases/download/latest/machine_friendly.csv \
  | grep stellenbosch
western-cape-stellenbosch,4,2022-09-10T14:00:00+02:00,2022-09-10T16:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
western-cape-stellenbosch,4,2022-09-10T22:00:00+02:00,2022-09-11T00:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
...

Get all data for a certain day in a certain area

curl -sL https://github.com/beyarkay/eskom-calendar/releases/download/latest/machine_friendly.csv \
  | grep cape-town-area-15 \
  | grep 2022-09-11
city-of-cape-town-area-15,4,2022-09-11T00:00:00+02:00,2022-09-11T02:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
city-of-cape-town-area-15,4,2022-09-11T08:00:00+02:00,2022-09-11T10:30:00+02:00,"https://twitter.com/Eskom_SA/status/1568494585113976835"
...

Get the file in Python

(mac users you might need this if you get an SSL error)

import pandas as pd
url = "https://github.com/beyarkay/eskom-calendar/releases/download/latest/machine_friendly.csv"
df = pd.read_csv(url, parse_dates=['start', 'finsh'])

Feel free to open a PR with any other snippets or languages you think of!

Project Goals and Alternatives

eskom-calendar tries to achieve the following goals:

  • Be open-source, easy to integrate with, and encouraging of new ideas
  • Provide an accesible information source for loadshedding in South Africa
  • Be dead simple to use

eskom-calendar does not try to:

  • Solve every solution itself. It embraces the Unix philosophy of do one thing, and do it well. Calendars are provided as an example of what's possible, but the heart of it is the open-source data with which websites, apps, bots, automations, etc, can be built.
  • Compete. eskom-calendar tries to be the best product for users, but chasing "competitors" is distracting at best, pointless at worst.

The best known alternative would be EskomSePush, but the author didn't want another app, and wanted to see the whole loadshedding schedule at a glance. Hence eskom-calendar was born (making it open source was just the default).

Contributors

All Contributors

Boyd Kane is the creator and maintainer. Reach out on twitter if you want to chat in private, otherwise open an issue!

Boyd Kane
Boyd Kane

⚠️ πŸ’» πŸ› πŸ“– 🚧
Shaun
Shaun

🚧
cliffbattco
cliffbattco

🚧
Carl Combrinck
Carl Combrinck

πŸ›
Luc Hayward
Luc Hayward

πŸ›

Contributing

Please see CONTRIBUTING.md.

Support

This project is funded by vibes and good words at the moment. If you like what I do, or you use the project commercially, please consider supporting me:

More Repositories

1

eskom-calendar-api

The backend for the eskom-calendar API
Rust
11
star
2

vvim

Typing in vim, but without a keyboard! (machine learning, arduino, and 3D printing will replace the keyboard)
Python
10
star
3

attractors

Generate, visualise, and explore strange attractor visually
Rust
6
star
4

card_game_builder

Got a cardgame idea? This project will convert it to printable PDFs which you can cut out!
TeX
5
star
5

actual-evolution

A factorio mod that makes biter/spitter behaviour evolve over time
Lua
4
star
6

no-more-json

An API that takes care of JSON parsing so you don't have to
Rust
4
star
7

tiktok-scraper

Download TikToks. Understand the Algorithm. Profit.
Jupyter Notebook
3
star
8

dotfiles

All config and dot files
Shell
3
star
9

beyarkay.github.io

Boyd Kane's personal website
TypeScript
3
star
10

provenance-rs

A history-of-ownership protocol to stop misinformation
Rust
3
star
11

c3

Custom calendar creator - Convert APIs to internet calendars with ease
JavaScript
3
star
12

XY_Plotter

An Arduino-based robotics project with a Python wrapper to draw things on your wall
Python
2
star
13

Entelect2020

Java
1
star
14

CarsAnalysis

Data collection and analysis of the seconds hand car market
Python
1
star
15

Hexels

Individually Addressable LED pixel matrix in a hexagonal shape
C++
1
star
16

m_and_m_and_m

Python
1
star
17

goat-game

Game about goats
GDScript
1
star
18

RecipeDownloader

A web scraper and some ML analysis scripts for recipe data
Python
1
star
19

ProjectAlpheus

An Arduino-based, Python powered robotics project that uses a remote camera to precisely calculate, and thereby manipulate, its position
C++
1
star
20

c3-demo

Template repository for c3: https://github.com/beyarkay/c3
Python
1
star
21

MarksAnalysis

Automatically generate graphs and sample statistics of Class marks
Python
1
star
22

EntellectChallenge2019

Second in the Entellect University Challenge 2019
Java
1
star
23

GoogleHashCode2022

Java
1
star
24

c3-weather

Python
1
star
25

genghis

Genghis is a bot battling, turn based strategy game and judge system.
Python
1
star
26

roboviz

A fork of the (now dead) RoboGen repository, implementing swarm robotics as an undergraduate CS project.
C++
1
star
27

OSDataStructures

Learning data structures, based in Java, using Jupyter Notebooks
Java
1
star
28

Mondrian

A robot to draw on a flat surface, with local positioning done through a moving phone camera
Jupyter Notebook
1
star
29

PurchaseAnalysis

Web scraper and visualiser for car & property price, as well as various metrics associated with the price
Jupyter Notebook
1
star
30

gumtrunk

A simple web scraping utility
Python
1
star
31

c3-tv-series

A C3 repository for creating calendars about when the next episode of a TV series will air
Python
1
star
32

aoc-2023-c

Advent of Code 2023 (in C)
C
1
star