How Does Canada Generate Electricity?

by Arthur Tong

GeoVisualization Project @RyersonGeo, SA8905, FALL 2020

Project Weblink (Click Here)


  • INTRODUCTION

Getting electricity to a country’s homes, different types of buildings and industries is an extremely challenging task, especially for countries that are enourmous in land area; transporting power over long distances are much more difficult. Up to now, the produced electrical energy is either very inconvenient to store or expensive, and with the increasing demand over the years in Canada, balancing betwen two in real time is crucial.

The way how electricity is generated solely depends on what kind of technologies and fuels are avaiable by that area. According to Natural Resources Canada (2020), “the most important energy source in Canada is moving water , which accounts for 59.3% of electricty supply, making it the second largest producer of hydroelectricity in the world with over 378 tearwatt hours in 2014.”

The goal of this interactive map project is to view most of the power plants in Canada and their respective sources and generating capacties (MW), which are proportional to the size of the circles shown in the project weblink above.


  • METHODOLOGY

In this section, I will be introducing the methdology for conducting this project. I would first describe how the data was collected, then followed by steps needed to produce the final dashboard with Tableau Public.

Data Collection

For the purpose of this study, I would need to retrieve pin-point (latitude/longitude) location of all types of power plants across Canada: from primary energy like nuclear energy and the renewables, to secondary energy that are produced from primary energy commodities like coal, natural gas and diesel. I tried looking up on various sources like Open Government Portal, but most of the open data they provide does not necessarily contain the power plants’ exact location.

Therefore, I had to manually pin-point all the data from external sources, mostly based on these two websites Global Energy Observatory (GEO) and The Wind Power. Other projects were identified by looking up on either the publicly/privately owned electricity utility company’s websites for all the provinces, for example BC Hydro, Ontario Hydro, TransAlta, etc, and their relative coordinates were retrieved using google maps. A similar interactive map “Electricity Generating Stations in British Columbia Map” has been done by researchers from University of Victoria, which provided most of the data for British Columbia and framework on what other relevant data I would like to include for my other provinces (as shown in the figure below).

Figure 1: Snapshot of the columns included for the dataset.

In addition, all 13 provinces were accounted and a total of 612 points were collected manually.


Construction of Tableau Dashboard

Tableau Public is the software used for this project. First, load in the excel data into Tableau through Data->Open New Data Source-> Microsoft Excel. Here, make sure the latitude and longitude columns were assigned a Geographic role as shown in the snapshot below, so they could be used to map the data.

Figure 2: Snapshot showcasing the Geographic roles assigned to the Latitude and Longitude columns.

From the new worksheet screen, sections on the left corresponds to the columns of the table. Drag the non-generated latitude and longitude to columns and rows and choose the ‘symbol map’ under ‘show me’ on top right. If the ‘unknown locations’ tab pop-up from the bottom right, it means that Tableau was not able to automatically align the name of the provinces given to the column to their database, which can be simply fixed by clicking that tab and manually edit the unknown locations. After dragging in essential elements you want to present, it would look something like this as shown in the figure below. In addition, the base map can also be changed into a dark theme under Map->Background Maps.

Figure 3: Taleau Interactive Map Layout. ‘Source’ is presented by differnet colours while their ‘capacity’ is presented by the sizes of the circles.

Moving on, to create a bar/pie chart, hover the bar on the left to choose which graph would best visualize the data you are trying present, then drag essential data into columns/rows.

Figure 4: Bar graph showing “Total capacity by all provinces”.

Last but not least, add a new ‘dashboard’ sheet and drag in all the maps/graphs into the dashboard to be the final product. Organizing the layout in the dashboard could be frustrating without the proper frame, you may also consider making elements like the filters and smaller graphs into a ‘float’ item by right clicking it, so that those ‘floating’ items could be placed on top of other elements on the dashbaord; in this case, I made the bar graph ‘floating’ so it is layed on top of the interactive map.

Figure 5: Dashboard Layout.

RESULTS & LIMITATIONS

Hydroelectricty do contribute to 56.67% of electricity generation across the country, followed by natural gas (12.39%) and nuclear energy (11.29%). However, a lot of electricity generation in Alberta are still based on coal, which takes up to 46.21% of the total capacity in that province.

Since all the data were collected manually, they may not be 100% accurate but the idea is to have a sense on where approximately it is located. For example, one single wind farm containing ten wind turbines may consist a large space across the mountain/field, the data collected was based on one wind turbine instead of plotting all ten of them.

Moreover, less developed provinces like the Northwest Territories has a very low amount of electricity generated due to its lower population (one diesel power plant per small town located using google satellite), there could have been more power plants around the area.

In conclusion, precise and consistent data is lacking for all the provinces from open data source portal, creating a potential for future similar studies carried out if more data is allowed. A time line perspective could also be added to this interactive map as well, so as users drag along the bar they can see the change in different types of powerplants that were being built in different locations.

A Glimpse of Short Term Rentals in Calgary Using Tableau

by Bryan Willis
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2020

Project linkhttps://thebryanwillis.github.io/CalgaryShortTermRentals.html

Background

Over the years, many homeowners have decided to turn their place of residence into short term rentals, allowing their place of residence to be rented out for short periods of time. Short term rentals have also seen an increase in popularity due to their better pricing when compared with hotels and the unique neighbourhood characteristics it provides. Although Calgary has not seen the increase of short term rentals as dramatics as that of Toronto and Vancouver, Calgary has continued to see growth in the short term rental supply. The City of Calgary defines a short term rental as a place of residence that provides temporary accommodation and lodging for up to 30 days and all short term rentals in Calgary must legally obtain a business license to run.

This interactive dashboard will aim to highlight some key components related to short term rentals in Calgary such as the locations, the license status, the composition of the housing type and licenses per month

Data

The data used in this dashboard is based off of the Short Term Rentals data set which was acquired through the City of Calgary’s Open Data Portal.

Methods

  1. Data Cleaning – After downloading the data from the open data portal, the data needed to be cleaned for it to properly display the attributes we want. All rows containing NULL values were removed from the data set via MS Excel.
  2. Map Production – After importing the cleaned data into Tableau, we should quickly be able to create our map that shows where the locations of the short term rentals are. To do this, drag both the auto generated into the middle of the sheet which should automatically generate a map with the location points. To differentiate LICENSED and CANCELLED points, drag the License Status column into the ‘Color’ box.
  1. Monthly Line Graph – To produce the line graph that shows the number of licenses produced by month, drag into the COLUMN section at the top and right click on it and select MONTH. For the ROWS section, again use but right click on it after dragging and select MEASURE and COUNT. Lastly, drag License Status into the ‘Color’ box.
Finalized monthly line graph
  1. City Quadrant Table – To create this table, we first need to create a new column value for the city quadrant. Right click the white space under ‘Tables’ and click on ‘Create Calculated Field’ which will bring up a new window. In the new window input RIGHT([Address],2) into the blank space. This code will create a new field with the last two letters in the Address field which is the quadrant. Once this field is created, drag it into the ROW section and drag it again into the ROW but this time right clicking it and clicking on Measure and then Count. Finish off by dragging License Status to the ‘Color’ box.
Finalized City Quadrant Table
  1. Dwelling Type Pie Chart – For the pie chart, first right click on the ROW section and click ‘New Calculation’. In the box, type in avg(0) to create a new ‘Mark’. There should now be an AGG(avg(0)) section under “Marks’, make sure the dropdown is selected at ‘Pie’. Then drag the Type of Residence column into the ‘Angle’ and ‘Color’ boxes. To further compute the percentage for each dwelling type, right click on the angle tab with the Type of Residence column in it then go the ‘Quick Table calculation’ and finally ‘Percent of Total’ .
Finalized pie chart
  1. Dashboard Creation – Once the above steps are complete, a dashboard can be made with the pieces by combining all 4 sheets in the Dashboard tab.
Finalized dashboard with the 4 created components

Limitations

The main limitations in this project comes from the data. Older licensing data is removed from the data set when the data set is updated daily by city staff. This presents the problem of not being able to compare full year to date data. As seen in the data set used in the dashboard, majority of the January data has already been removed from the data set with the except of January 26, 2020. Additionally, there were also quite a few entries in the data set that had null addresses which made it impossible to pinpoint where those addresses were. Lastly, as this data set is for 2020, the COVID-19 pandemic might have disrupted the amount of short term rentals being licensed due to both the city shifting priorities as well as more people staying home resulting in less vacant homes available for short term rentals.

Building Visualizations Using D3

By Jessica Whitehead, Geovis Course Assignment, SA8905, Fall 2015 (Rinner)


“D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.” 

d3js.org


OVERVIEW: D3 has a steep learning curve and for someone who has only dabbled in html and css, it did not come easy. Fortunately there is a growing community of D3 and javascript geniuses online, allowing relatively inexperienced programmers, like myself, to piece together chunks of code and create something (surprisingly) visually-pleasing and informative.


THE DATA

I decided to stick with a simple dataset. The World Food Programme (WFP) maintains an online database of international food aid deliveries that can generate reports and tables based on the variables chosen by the user. For this project I looked at food aid deliveries in the year 2012 and produced 3 separate tables that would translate well into data visualizations.

  1. The first table was an overview of international food aid deliveries. It provided the total amount delivered for the the year, as well as breaking it down by food aid types and delivery modes.
  2. The second table summarized all recipient countries, the metric tons received, and for which food aid type. I reduced the dataset by focusing on the top 15 recipient countries.
  3. The third table summarized all donor countries, the metric tons donated, and to which countries it was delivered. I reduced the dataset by focusing on the top 15 donor countries and amalgamating the recipient countries into regions using categories specified on the WFP website.*

*As this project had a geospatial focus, I did not include donors that were not countries, such as the UN or private organizations.


THE CREATIVE PROCESS

So, back to D3. Looking at my data tables, I started exploring the wide array of examples available on the D3.org and GitHub websites. It was important that I found codes that could incorporate my data, either within the code or through .csv file.

Dancing BubblesEventually I found the “dancing bubbles” example and thought this would be an interesting way to show the different types of food aid and delivery modes. I was able to download the code off GitHub, however, it included hundreds of additional files that were unnecessary. As a D3 novice, I did not realize most of the files were irrelevant for a long time.
Source code: http://vallandingham.me/bubble_charts_in_d3.html

To show dashboardthe top 15 recipients I liked the idea of an interactive dashboard. This would allow the user to hover over a country and see a breakdown by food category. For example, North Korea received 372,555 mt of food in 2012 and all deliveries were for emergency purposes.
Source code: http://bl.ocks.org/NPashaP/96447623ef4d342ee09b

mapitTo show the top 15 donors I wanted to create a choropleth map that would produce a donut graph of receiving regions when hovering over each donor country. This proved to be very difficult, so for this project I ended up creating  the map and donut infographic separately.
Source code: http://bl.ocks.org/mbostock/3888852


THE CODING

interactivedatacoverA very useful resource I found was a book called Interactive Data Visualization for the Web written by Scott Murray and is available online for free at Interactive Data Visualization Text

It provides you with all the information required to get started with D3, explaining everything from web fundamentals to D3 setup and creating a web server. Most browsers have issues when interpreting D3 on your local computer, so it is necessary to set up a local web server to view your output.

A very brief look at how D3 works

Essentially you have to download the D3 library and store in a “js” javascript folder in the home directory of your website. Screen Shot 2015-11-18 at 4.34.46 AM Here you will also have folders for css (the style code that makes your visualizations look cool), data (the csv and GeoJson files that give meaning to your visualizations and shape your maps), and index html file (home page of your website).Screen Shot 2015-11-18 at 4.43.24 AM

You start off with a simple index html file and reference the D3 library in the head of your html. Your actual script will go in the body so that it can append items into the Document Object Model (DOM). The DOM is essentially the structure of your html document. D3 uses javascript to then bind your csv and Json files to SVG elements in the DOM. These SVG objects can range from simple rectangles forming bar charts to extremely complicated interactive visualizations.


TOP 3 THINGS ABOUT D3

  1. Web-based – so people can easily access and view the visualizations you spend so long creating.
  2. You are not limited by pre-built charts – endless room for creativity.
  3. D3 programmers seem to be pretty generous when uploading their codes to the web. There is wide variety of open source codes available online to manipulate.

END PRODUCT

If you would like to see the final product please see below
http://www.jwdataviz.ca/sa8905-geovis/


HexBinning Ontario

By Andrew Thompson – Geovis course project, SA8905 (Dr. Rinner)

The power of data visualization is becoming increasingly more robust and intricate in nature. The demand to deliver a variety of complex information has lead to the development of highly responsive visual platforms. Libraries such as d3 are providing increased flexibility to work along multiple web technology stacks (HTML, CSS, SVG) allowing for nearly unlimited customization and capacity to handle large datatypes.

hexbin

In this development, a combination of d3 and Leaflet is used to provide a data-driven visualization within an easy to use mapping engine framework; made possible through the developments of Asymmetrik.  This collection of plugins, has allowed the creation of dynamic hexbin-based heatmaps and dynamically update/visualize transitions.

The web mapping application is avaiable at: HexBinning Ontario

Discussion of data & techniques follows below…

Continue reading HexBinning Ontario