ElectriGo
Electricity Predictions to Go
The Goal
Predict the future power usage based off past
power usage, past weather, and future weather
forecasts
The Data - Users
CREATE TABLE users (
username text,
addtracker boolean,
adduser boolean,
password text,
salt text,
PRIMARY KEY (username)
)

type User struct {
Username
string
CanAddUser bool
CanAddTracker bool
Password
string
salt
string
}
User Data Example
username | addtracker | adduser | password
| salt
----------+------------+---------+--------------------------+-----bob |
True | True | VWRESCEASA3453ASDF323R3Q | T5DW
The Data - Trackers
CREATE TABLE trackers (
api_key text,
id bigint,
owner text,
period bigint,
PRIMARY KEY ((api_key, id))
)
CREATE INDEX trackers_owner_idx
ON trackers (owner);

type Tracker struct {
API_String string
ID
int
Period int
Owner
string
Predictor *predictions.Predictor
stop
chan bool
}
Tracker Data
api_key
| id | owner | period
----------------------------------+-------+-------+-------B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | bob |

60
The Data - Weather
CREATE TABLE weatherrecords (
station uuid,
time timestamp,
cloudcover double,
humidity double,
pop double,
temperature double,
windspeed double,
PRIMARY KEY (station, time)
)

type WeatherRecord struct {
Time
time.Time
Humidity float64
Temperature float64
WindSpeed float64
PoP
float64
CloudCover float64
}
Weather Data Example
station
| time
| cloudcover | humidity | pop | temperature | windspeed
--------------------------------------+--------------------------+------------+----------+-----+-------------+----------d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:00:00-0500 |
0.6 | 0.85 | 1 | -26.122 | 2.6062
d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:15:00-0500 | 0.6225 | 0.8475 | 1 |
-26.11 | 2.6018
d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:30:00-0500 |
0.645 | 0.845 | 1 | -26.097 | 2.5973
The Data - Record
CREATE TABLE records (
api_key text,
id bigint,
time timestamp,
prediction boolean,
value double,
PRIMARY KEY ((api_key, id), time,
prediction)
)

type Record struct {
Time
time.Time
Value
float64
Tracker *Tracker
Prediction bool
Weather *WeatherRecord
}
Record Data Example
api_key
| id | time
| prediction | value
----------------------------------+-------+--------------------------+------------+------B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:00:05-0500 |
B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:15:05-0500 |
B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:30:05-0500 |
B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:45:05-0500 |

False | 15843
False | 15739
False | 15844
False | 15843
How it (Roughly) looks
Why? (The Business Side)
Power usage = Cost
Cheaper short-term power sources exit
take time to start up
Turn On Backup power sources ahead of peak
load
Sell either code or service to comapnies, both
parties make money.

Team ElectricGo: 2013 Apache Cassandra Hackathon at McGill University

  • 1.
  • 2.
    The Goal Predict thefuture power usage based off past power usage, past weather, and future weather forecasts
  • 3.
    The Data -Users CREATE TABLE users ( username text, addtracker boolean, adduser boolean, password text, salt text, PRIMARY KEY (username) ) type User struct { Username string CanAddUser bool CanAddTracker bool Password string salt string }
  • 4.
    User Data Example username| addtracker | adduser | password | salt ----------+------------+---------+--------------------------+-----bob | True | True | VWRESCEASA3453ASDF323R3Q | T5DW
  • 5.
    The Data -Trackers CREATE TABLE trackers ( api_key text, id bigint, owner text, period bigint, PRIMARY KEY ((api_key, id)) ) CREATE INDEX trackers_owner_idx ON trackers (owner); type Tracker struct { API_String string ID int Period int Owner string Predictor *predictions.Predictor stop chan bool }
  • 6.
    Tracker Data api_key | id| owner | period ----------------------------------+-------+-------+-------B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | bob | 60
  • 7.
    The Data -Weather CREATE TABLE weatherrecords ( station uuid, time timestamp, cloudcover double, humidity double, pop double, temperature double, windspeed double, PRIMARY KEY (station, time) ) type WeatherRecord struct { Time time.Time Humidity float64 Temperature float64 WindSpeed float64 PoP float64 CloudCover float64 }
  • 8.
    Weather Data Example station |time | cloudcover | humidity | pop | temperature | windspeed --------------------------------------+--------------------------+------------+----------+-----+-------------+----------d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:00:00-0500 | 0.6 | 0.85 | 1 | -26.122 | 2.6062 d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:15:00-0500 | 0.6225 | 0.8475 | 1 | -26.11 | 2.6018 d4f560cf-6a9c-4ec0-8af1-a37c5e664ff9 | 2013-11-23 02:30:00-0500 | 0.645 | 0.845 | 1 | -26.097 | 2.5973
  • 9.
    The Data -Record CREATE TABLE records ( api_key text, id bigint, time timestamp, prediction boolean, value double, PRIMARY KEY ((api_key, id), time, prediction) ) type Record struct { Time time.Time Value float64 Tracker *Tracker Prediction bool Weather *WeatherRecord }
  • 10.
    Record Data Example api_key |id | time | prediction | value ----------------------------------+-------+--------------------------+------------+------B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:00:05-0500 | B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:15:05-0500 | B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:30:05-0500 | B25ECB703CD25A1423DC2B1CF8E6F008 | 50578 | 2013-11-23 08:45:05-0500 | False | 15843 False | 15739 False | 15844 False | 15843
  • 11.
  • 12.
    Why? (The BusinessSide) Power usage = Cost Cheaper short-term power sources exit take time to start up Turn On Backup power sources ahead of peak load Sell either code or service to comapnies, both parties make money.