Who left the lights on?

Who left the lights on?

Slides from a workshop presented by Peter Rukavina on February 27, 2015 at the University of Prince Edward Island, Robertson Library and sponsored by ARMA Prince Edward Island Chapter.

E2ed169f43b7aae4f46de5fa9ef837e9?s=128

Peter Rukavina

February 27, 2015
Tweet

Transcript

  1. “Who left the lights on?” Slides from a workshop presented

    by Peter Rukavina on February 27, 2015 at the University of Prince Edward Island, Robertson Library and sponsored by ARMA Prince Edward Island Chapter These slides are released under a Creative Commons license. You are encouraged to distribute them as far and as 
 wide as possible under the terms of the license.
  2. None
  3. Thank You • Simon Lloyd for the invitation. • Mark

    Demone for the coordination. • Melissa Belvadi, Don Moses, Alkarim Bhalesha and Jerrad Gilbert at Robertson Library for digital logistics here in the lab.
  4. “Who left the lights on?” How a government-industry open data

    partnership is driving innovation in the delivery of electricity 
 load and generation data to Islanders The Apocalyptic Lightbulb Conspiracy by Daniel Hoherd is licensed under CC BY-NC 2.0
  5. “Is there a situation in which it is beneficial to

    Maritime Electric to have consumption drop?” Jim Lea, Maritime Electric CEO, replies… March 27, 2003, Delta Prince Edward Clip from audio recording Maritime Electric Public Information Session by Peter Rukavina, March 27, 2003.
  6. Ton Zijlstra from Cognitive Cities Conference is licensed by CC

    BY-NC-ND 3.0
  7. “Who left the lights on?” I want to know 


    how much electricity PEI is using, where it comes from, and how much of it is renewable The Apocalyptic Lightbulb Conspiracy by Daniel Hoherd is licensed under CC BY-NC 2.0
  8. “Who left the lights on?” I want to know 


    the load, the generation, and the generation mix The Apocalyptic Lightbulb Conspiracy by Daniel Hoherd is licensed under CC BY-NC 2.0
  9. “Who left the lights on?” I want to have a

    gut feeling for 
 the load, the generation, and the generation mix The Apocalyptic Lightbulb Conspiracy by Daniel Hoherd is licensed under CC BY-NC 2.0
  10. “Who left the lights on?” I want everyone to have

    a gut feeling for 
 the load, the generation, and the generation mix The Apocalyptic Lightbulb Conspiracy by Daniel Hoherd is licensed under CC BY-NC 2.0
  11. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  12. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  13. Bulb by Andrew Enright is licensed under CC BY-NC-SA 2.0

  14. 100 watts Bulb by Andrew Enright is licensed under CC

    BY-NC-SA 2.0
  15. 1000 watts Bulb by Andrew Enright is licensed under CC

    BY-NC-SA 2.0
  16. 1 kilowatt Bulb by Andrew Enright is licensed under CC

    BY-NC-SA 2.0
  17. 1 kilowatt for one hour = 1 kilowatt hour Bulb

    by Andrew Enright is licensed under CC BY-NC-SA 2.0
  18. 1 kilowatt for one hour = 1 kWh Bulb by

    Andrew Enright is licensed under CC BY-NC-SA 2.0
  19. Photo by Peter Rukavina.

  20. 1 million watts x 10,000 Bulb by Andrew Enright is

    licensed under CC BY-NC-SA 2.0
  21. 1 megawatt x 10,000 Bulb by Andrew Enright is licensed

    under CC BY-NC-SA 2.0
  22. 1 MW Bulb by Andrew Enright is licensed under CC

    BY-NC-SA 2.0 x 10,000
  23. 50 MW Diesel 60 MW Oil Screen shot from Google

    Maps “Earth” view taken February 26, 2015. Map data © 2015 Google.
  24. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  25. HTML • HyperText Markup Language • Describes the “contents” of

    the web • The “markup” adds meaning to text, like “make this a big title”:
 
 <h1>Who left the lights on?</h1> • On any page on the web, you can “View Source” to see the HTML of the page
  26. https://thimble.webmaker.org/

  27. CSS • Cascading Style Sheets • Describes the “look” of

    the web • Defines how HTML will appear in the browser • Like “make all the big titles” red:
 
 h1 {
 color: red;
 }
  28. JavaScript • The “programming language” of the web • Supported

    by almost all web browsers • Allows “interactive stuff” to happen in the browser • Simple and easy to learn, like:
 
 var temp_c = 0;
 var temp_f = temp_c * 1.8 + 32;
  29. None
  30. None
  31. var temp_c = 100;
 var temp_f = temp_c * 1.8

    + 32;
 temp_f
  32. http://jsfiddle.net/

  33. Add jQuery

  34. HTML

  35. JavaScript

  36. CSS

  37. http://l.ruk.ca/temp-convert

  38. JSON • JavaScript Object Notation • A lingua franca for

    passing data around the web. • The “fat-free alternative to XML” • Very easily used by JavaScript because it’s a subset of the way objects are represented in JavaScript.
  39. Some JSON { firstname: "Peter", lastname: "Rukavina", telephone: "902-628-8544" }

  40. [ { "street_num": 32, "street_nm": "RIVERVIEW CR", "comm_nm": "VERNON BRIDGE",

    "county": "QUN", "latitude": 46.17488, "longitude": -62.8834 }, { "street_num": 11, "street_nm": "PEMBROKE CR", "comm_nm": "STRATFORD", "county": "QUN",
  41. The Web of JSON • “Web pages” don’t need to

    be (only) human- readable • Open data on the web works best when… • it’s simply attached to a URL • it’s in an easily-manipulated format • it’s easy to understand
  42. http://www.electionspei.ca/ api/ provincial/ districts/ index.php? street_nm=PRINCE& street_no=100

  43. { "addresses_found": 1, "addresses": [ { "district": { "name": "Charlottetown

    - Victoria Park", "returningofficer": { "firstname": "Amy", "lastname": "Doyle", "street": "25 Cumberland St.", "city": "Charlottetown", "phone": "892-0846" }, "number": "12", "url": { "html": "http:\/\/www.electionspei.ca\/ provincial\/districts\/district12", "xml": "http:\/\/www.electionspei.ca\/ xml\/provincial\/districts\/district12" }
  44. http://l.ruk.ca/json-holland

  45. http://l.ruk.ca/json-holland

  46. None
  47. { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name":

    "urn:ogc:def:crs:OGC: 1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "LOT": "GEORGETOWN", "AREA": 0.001879, "PERIMETER": 0.297538 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -62.572620405028403, 46.199679527058578 ], [ -62.580760470484037, 46.219434133419306 ], [ -62.579024444158172, 46.219831688011375 ], [ -62.577552427247561, 46.219943190658306 ], [ -62.576511573647167, 46.219610925737399 ], [ -62.575648113478202, 46.218968914354932 ], [ -62.573996965015965, 46.218782798817166 ], [ -62.573314930094163,
  48. None
  49. None
  50. None
  51. Powered by GeoJSON

  52. None
  53. None
  54. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  55. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  56. Richard Brown Minister of Environment, Energy and Forestry Photo of

    Richard Brown from Liberal Party of Prince Edward Island
  57. Ron Estabrooks Energy Advisor with the PEI Energy Corporation Photo

    of Ron Estabrooks taken at the open house to officially launch the Hermanville/Clearspring wind development from www.gov.pe.ca.
  58. Still from Ton Zijlstra from Cognitive Cities Conference is licensed

    by CC BY-NC-ND 3.0
  59. Ron Estabrooks Energy Advisor with the PEI Energy Corporation Photo

    of Ron Estabrooks taken at the open house to officially launch the Hermanville/Clearspring wind development from www.gov.pe.ca.
  60. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  61. RTOs and ISOs • Regional Transmission Organization or Independent System

    Operator • Organizations that manage the electricity network • Like the “switchboards” for the electricity network, which has been called “most complex machine ever devised by man.” • For PEI the network is managed by the NBSO: the New Brunswick System Operator
  62. None
  63. http://l.ruk.ca/nbso-web

  64. NBSO as HTML

  65. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  66. Open, but Not Enough • It’s “open” but it’s not

    “open enough” • There’s not enough structure to the data, especially if I want to use it with other tools (to archive it, to graph it, etc.) • Solution: convert the HTML into JSON.
  67. http://l.ruk.ca/nbso-convert

  68. { "NB-Load": "2272", "NB-Demand": "2353", "ISO-NE": "493", "NMISA": "31", "HYDRO-QUEBEC":

    "-945", "NOVA-SCOTIA": "0", "PEI": "165" } http://l.ruk.ca/nsbo-json
  69. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  70. Pachube + SoundCloud Mashup by Peter Rukavina licensed under CC

    BY 3.0
  71. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  72. Clip of audio from CBC Spark interview with Peter Rukavina

    by Nora Young, recorded June 19, 2011.
  73. “Closed” Data from Charlottetown

  74. “Closed” Data from 
 Cornwall

  75. “Closed” Data from 
 Stratford Town of Stratford Building Permit

    Summary 7/1/2013 to 7/31/2013 Applicant Estimated Development Date PermitID Applicant Name Phone # PID Lot# Address Permit Type Project Value Permit Fee JUL-15-2013 DP078-13 Robert Gaudet 902-367-6129 932111 171 6 Carrington Road Accessory Building - New $1,200.00 $30.00 JUL-25-2013 DP056-13 Stratford Quickstop 1044494 1 Jubilee Drive Accessory Building - New $11,000.00 $100.00 Sub Totals: $12,200.00 $130.00 JUL-05-2013 DP072-13 Rosemary Scott 902-569-3021 728188 135 33 Celtic Lane Accessory Structure (Pool, Deck, etc) - $800.00 $30.00 Addition JUL-16-2013 DP077-13 Kent Building Supply - 329375 154 Spinnaker Drive Accessory Structure (Pool, Deck, etc) - $5,000.00 $30.00 Andrew Sanderson Addition Sub Totals: $5,800.00 $60.00 JUL-26-2013 DP085-13 Richard E. Woodfield 902-367-3637 1010693 7 Picton Beete Cr Accessory Structure (Pool, Deck, etc) - $3,000.00 $30.00 New JUL-12-2013 DP076-13 Jamie Doiron 902-629-0224 486118 14 Towerwood Drive Accessory Structure (Pool, Deck, etc) - $3,000.00 $30.00 New JUL-03-2013 DP039-13 Chris and Jennifer 902-569-2114 471508 10 Aintree Drive Accessory Structure (Pool, Deck, etc) - $6,000.00 $30.00 Whitlock New JUL-30-2013 DP016-13 Craig and Jennifer 902-566-1801 1014638 93 Bonavista Avenue Accessory Structure (Pool, Deck, etc) - $25,000.00 $30.00 Lawlor New JUL-15-2013 DP062-13 Drew and Karen 902-894-3959 1029180 22 Saints Crescent Accessory Structure (Pool, Deck, etc) - $50,000.00 $30.00 MacIntyre New Sub Totals: $87,000.00 $150.00 JUL-31-2013 DP059-13 Craftsman 940650 11 Galway Court Single Family Dwelling - Addition $18,000.00 $56.80 Construction JUL-05-2013 DP071-13 Roger Johnson 902-569-4882 709154 73 Rankin Drive Single Family Dwelling - Addition $40,000.00 $114.40 JUL-10-2013 DP070-13 Greenleaf Construction 902-566-3358 603613 1 2 Battery Point Drive Single Family Dwelling - Addition $150,000.00 $43.68 Sub Totals: $208,000.00 $214.88 JUL-25-2013 DP081-13 D.C. McCardle 902-367-9200 398586 70 77 Southampton Drive Single Family Dwelling - New $180,000.00 $458.20 JUL-18-2013 DP079-13 D.C. McCardle Ltd 902-367-9200 398586 72 85 Southampton Dr Single Family Dwelling - New $200,000.00 $469.40 JUL-30-2013 DP084-13 Barry MacDonald 1045749 13 11 Donegal Lane Single Family Dwelling - New $300,000.00 $1,187.60 Thursday, August 01, 2013 Town of Stratford Building Permit Summary 7/1/2013 to 7/31/2013 Page 1 of 2
  76. What if I want to…

  77. What if I want to…

  78. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  79. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  80. Richard Brown Minister of Environment, Energy and Forestry Photo of

    Richard Brown from Liberal Party of Prince Edward Island
  81. Ron Estabrooks Energy Advisor with the PEI Energy Corporation Photo

    of Ron Estabrooks taken at the open house to officially launch the Hermanville/Clearspring wind development from www.gov.pe.ca.
  82. None
  83. 60 MW from oil 50 MW from diesel 39 MW

    from diesel 200 MW from cables 11 MW from oil 12 MW from wind 30 MW from wind 30 MW from wind 99 MW from wind 23 MW from wind
  84. Generation Mix • 194 MW (maximum) from wind energy •

    160 MW from local fossil fuel generators • 200 MW from submarine cables
  85. Peak Load 220 MW

  86. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  87. “Can we get real-time data on load and generation?”

  88. (one year passes)

  89. Yes!

  90. http://l.ruk.ca/pei-wind

  91. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  92. None
  93. None
  94. http://l.ruk.ca/pei-json

  95. PEI as JSON [ { "data1": 210.15, "data2": 139.22, "data3":

    7.98, "data4": 82.02, "data5": 57.2, "updateDate": 1424875441, "error": 0 } ]
  96. http://e.ruk.ca/pei-json

  97. PEI as (Better) JSON { "on-island-load": 210.15, "on-island-wind": 139.22, "on-island-fossil":

    7.98, "wind-local": 82.02, "wind-export": 57.2, "percentage-wind": "66.25" }
  98. http://l.ruk.ca/pei-fiddle

  99. None
  100. http://l.ruk.ca/pei-archive

  101. http://l.ruk.ca/pei-graph

  102. None
  103. None
  104. “I have become slightly obsessed by your energy graph and

    am very grateful that you have found a way to record the load and wind power generated in PEI. Do you by any chance have a spread sheet of these values? I am looking at using storage to balance wind fluctuations and was hoping to try and using the real load and wind data to accomplish that.”
  105. http://pei.consuming.ca/

  106. None
  107. None
  108. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix
  109. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  110. None
  111. I want everyone to have a gut feeling for 


    whether it’s a good time to use electricity or not
  112. None
  113. “PEI Energy Thingy” • Uses a Raspberry Pi, an inexpensive,

    web- connected, touch-screen computer • Uses the JSON version of the PEI load and generation data • Provides simple feedback:
 red - bad time to use energy (no wind, fossil)
 yellow - average time to use energy
 green - good time to use energy (high wind)
  114. Maritime Electric www.gov.pe.ca energy.reinvented.net SCADA (proprietary) JSON (open) JSON (more

    open) red, yellow or green
  115. http://innovis.cpsc.ucalgary.ca/

  116. http://innovis.cpsc.ucalgary.ca/

  117. I want to have a gut feeling for 
 my

    own load “From MW to KW”
  118. Social Consumption Project • Can we measure household electricity usage

    in real time? • Can we display this usage information to people in the house? • Can we use social pressures and a feeling of competition to motivate a decrease in consumption?
  119. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  120. None
  121. Meter Type 8 Itron Brand Serial Number Current Reading (in

    kWh)
  122. My Electricity Meter • Broadcasts its current reading by radio

    in the
 900 MHz range. • This broadcast is in the clear (not encrypted). • Anyone in range of the meter can receive the readings.
  123. None
  124. My Water Meter • Broadcasts its current reading by radio

    in the
 900 MHz range. • This broadcast is in the clear (not encrypted). • Anyone in range of the meter can receive the readings.
  125. None
  126. Grid Insight AMRUSB-1 • An inexpensive (< $100) USB stick

    containing a radio receiver capable of reading and decoding electricity and water meter readings. • The readings can be processed by almost any computer, including a Raspberry Pi.
  127. None
  128. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  129. Social Consumption Project • Can we measure household electricity usage

    in real time? • Can we display this usage information to people in the house? • Can we use social pressures and a feeling of competition to motivate a decrease in consumption? and water! ^
  130. None
  131. Social Consumption Project • Five Charlottetown test households. • Equipped

    with water and electricity meters and wireless Internet. • Households okay with sharing their consumption data with others in the test group and with the public.
  132. Web Database

  133. http://l.ruk.ca/scp-table

  134. http://l.ruk.ca/scp-compare

  135. http://l.ruk.ca/scp-peter

  136. http://consuming.ca/

  137. None
  138. Social Consumption Project • Can we measure household electricity usage

    in real time? • Can we display this usage information to people in the house? • Can we use social pressures and a feeling of competition to motivate a decrease in consumption?
  139. Tools of an Artist by John is licensed under CC

    BY-NC-SA 2.0
  140. Node-RED

  141. What is Node-RED? • A visual “drag and drop” way

    of wiring together devices and data. • No programming required. • Runs locally on your computer, and is accessed using a web browser on your computer. • The Social Consumption Project Raspberry Pi computers use it to read and upload electricity and water meter data to the web.
  142. Fire up Node-RED

  143. Fire up Node-RED cd /usr/local/nodered/node-red-0.10.3 node red

  144. Fire up Node-RED 127.0.0.1:1880

  145. None
  146. Add an inject node

  147. None
  148. Configure it

  149. Add a http request node

  150. None
  151. http://e.ruk.ca/pei-json

  152. Wire the nodes together

  153. Add a debug node

  154. Click Deploy

  155. Click the Inject trigger

  156. See the magic happen…

  157. Add a json node

  158. Add a template node

  159. Add a switch node

  160. Add 2 template nodes

  161. Add 2 template nodes

  162. Add a debug node

  163. The Flow

  164. Click Deploy

  165. Click the Inject trigger

  166. See the magic happen…

  167. Social Consumption Project

  168. None
  169. Windmill by Stephen Downes is licensed under CC BY-NC 2.0

  170. I want everyone to have a gut feeling for 


    the load, the generation, and the generation mix I want everyone to have a gut feeling for 
 whether it’s a good time to use electricity or not I want to have a gut feeling for 
 my own load ✔ ✔ ✔
  171. Open Data
 Guiding Principles • You can’t anticipate what citizens

    will use your open data for (maybe they will make music from electricity). • Reduce as many barriers as possible to easy, painless access to data: find the right format(s) and put the data right on the web, with a URL. • “Eat your own dogfood” – develop systems that consume you own open data.
  172. Still from Ton Zijlstra from Cognitive Cities Conference is licensed

    by CC BY-NC-ND 3.0 Be the one public servant in the blue shirt…