Visualizing Flow Regulation at the Shand Dam

Hannah Gordon

GeovisProject Assignment @RyersonGeo, SA8905, Fall 2022

Concept

When presented with this geovisualization opportunity I knew I wanted my final deliverable to be interactive and novel. The idea I decided on was a 3D printed topographic map with interactive elements that would allow the visualization of flow regulation from the Shand Dam by placing wooden dowels in holes of the 3D model above and below the dam to see how the dam regulated flow. This concept visualizes flow (cubic meters of water a second) in a way similar to a hydrograph, but brings in 3D elements and is novel and fun as opposed to a traditional chart.   Shand Dam on the Grand River was chosen as the site to visualize flow regulation as the Grand River is the largest river system in Southern Ontario, Shand Dam is a Dam of Significance, and  there are hydrometric stations that record river discharge above and below the dam for the same time periods (~1970-2022). 

About Shand Dam

Dams and reservoirs like the Shand Dam are designed to provide maximum flood storage following peak flows. During high flows (often associated with spring snow melt) water is held in the reservoir to reduce the amount of flow downstream, lowering flood peak flows (Grand River Conservation Authority, 2014). Shand Dam (constructed in 1942 as Grand Valley Dam) is located just south of Belwood Lake (an artificial reservoir) in Southern Ontario, and provides significant flow regulation and low flow augmentation that prevents flooding south of the dam (Baine, 2009). Shand Dam proved a valuable investment in 1954 after Hurricane Hazel when no lives were lost in the Grand River Watershed from the hurricane.

Shand Dam (at the time Grand Valley Dam) in 1942. Photographer: Walker, A., 1942

Today, the dam continues to prevent  and lessen the devastation from flooding (especially spring high-flows) through the use of four large gates and three ‘low-flow discharge tubes’ (Baine, 2009).   Dam discharge from dams on the Grand River may continue for some time after the storm is over to regain reservoir storage space and prepare for the next storm  (Grand River Conservation Authority, 2014). This is illustrated in the below hydrographs where the flow above and below the dam is plotted over a time series of one week prior to the peak flow and one week post the peak flow, and the dam delays and ‘flattens’ the peak discharge flow.

Data & Process

This project required two data sources – the hydrometric data for river discharge and a DEM (digital elevation model) from which a 3D printed model will be created. Hydrometric data for the two stations (02GA014 and 02GA016) was downloaded from the Government of Canada, Environment and Natural resources in the format of a .csv (comma separated value) table. Two datasets for hydrometric data were downloaded – the annual extreme peak data for both stations and the daily discharge data for both stations  in date-data format.  The hydrometric data provided river discharge as daily averages in cubic meters a second.   The DEM was downloaded from the Government of Canada’s Geospatial Data Extraction Tool. This website makes it simple and easy to download a DEM for a specific region of canada at a variety of spatial resolutions. I chose to extract my data for the area around Shand Dam that included the hydrometric stations, at a 20 meter resolution (finest resolution available).

3D Printing the DEM

The first step in creating the interactive 3D model was becoming 3D printer certified at Toronto Metropolitan University’s  Digital Media Experience Lab (DME). While I already knew how to 3D print this step was crucial as it allowed me to have access to the 3D printers in the DME for free. Becoming certified with the DME was a simple process of watching some videos, taking an online test, then booking an in person test. Once I had passed I was able to book my prints. The DME has two PRUSA brand printers. These 3D printers require a .gcode file to print models. Initially my data was in a .tiff file, and creating a .gcode file would first involve creating an STL (standard triangle language), then creating a gcode file from the STL. The gcode file acts as a set of ‘instructions’ for the 3D printer.

Exporting the STL with QGIS

First the plugin ‘DEM to 3D print’ had to be installed for QGIS. This plugin creates an STL file from the DEM (tiff). When exporting the digital elevation model to an STL (standard triangle language) file a few constraints had to be enforced.

  • The final size of the STL had to be under 25 mb so it could be uploaded and edited in tinkercad to add holes for the dowels.
  • The final size of the STL file had to be less than ~20cm by ~20cm to fit on the 3D printers bed. 
  • The final .gcode file created from the STL would have to print in under 6 hours to be printed at  the DME. This created a size constraint on the model I would be able to 3D print.

It took multiple experimentations of the QGIS DEM to 3D plugin to create the two STL files that would each print in under 6 hours, and be smaller than 25mb. The DEM was exported as an STL using the plugin and the following settings;

  • The spacing was 0.6mm. Spacing reflects the amount of detail in the STL, and while a spacing of 0.2 mm would have been more suitable for the project it would have created too large of a file to be imported to tinkercad. 
  • The final model size is 6 cm by 25cm and divided into two parts of 6 by 12.5cm. 
  • The model height of the STL was set to 400m, as the lowest elevation to be printed was 401m. This ensured an unnecessarily thick model would not be created. A thick model was to be avoided as it would waste precious 3D printing time.
  • The base height of the model was 2mm. This means that below the lowest elevation an additional 2 mm of model will be created.
  • The final scale of the model is approximately 1:90,000 (1:89,575), with a vertical exaggeration of 15 times. 

Printing with the DME

These STL that were exported from QGIS were opened in PRUSA slicer to create gcode files. The 3D printer configuration of the DME printers were imported and the infill density was set to 10%. This is the lowest infill density the DME will permit, and helps lower the print time by printing a lattice on the interior of the print as opposed to solid fill. Both the gcode files would print in just under 6 hours. 

Part one of the 3D elevation model printing in the DME, the ‘holes’ seen in the top are the infill grid.

3D printing the files at the DME proved more challenging than initially expected. When the slots were booked on the website I made it clear that the two files were components of a larger project, however when I arrived to print my two files the 3D printers had two different colors of filament (one of which was a blue-yellow blend). As the two 3D prints would be assembled together I was not willing to create a model that was half white, half blue/yellow. Therefore the second print had to be unfortunately pushed to the following week. At this point I was glad I had been proactive and booked the slots early otherwise I would have been forced to assemble an unattractive model.  The DME staff were very understanding and found humor in the situation,  immediately moving  my second print to the following week so the two files could use the same filament color. 

Modeling Hydrometric Data with Dowels

To choose the days used to display discharge in the interactive model the csv file of annual extreme peak data was opened in excel and maximum annual discharge was sorted in descending order. The top three discharge events at station 02GA014 (above the dam), that would have had data on the same days below the dam  were:

  • 1975-04-19 (average daily discharge of 306 cubic meters a second)
  • 1976-03-21 (average daily discharge of 289 cubic meters a second)
  • 2008-12-28 (average daily discharge of 283 cubic meters a second)

I also chose 2018’s peak discharge event (average daily discharge of 244 cubic meters a second on February 21st) to be included as it was a significant more recent flow event (top 6)

Once the four peak flow events had been decided on, their corresponding data in the daily discharge data were found, and  a scaling factor of 0.05 was applied in excel so I would know the proportional length to cut the dowels. This meant that every 0.5cm of dowel would indicate 10 cubic meters a second of discharge.

As the dowels sit within the 3D print, prior to cutting the dowels I had to find out the depth of the holes in the model. The hole for station 02GA014 (above the dam) was 15mm deep and the holes for station 02GA016 (below the dam) were 75mm deep. This meant that I would have to add 15mm or 75mm to the dowel length to ensure the dowels would accurately reflect discharge when viewed above the model. The dowels were then cut to size, painted to reflect the peak discharge event they correspond to and labeled with the date the data was from. Three dowels for the legend were also cut that reflected discharge of 100, 200, and 300 cubic meters a second. Three pilot holes then three 3/16” holes were drilled into the base for the project (two finished 1 x4’s) for these dowels to sit.

Assembling the Model

Once all the parts were ready the model could be assembled. The necessary information about the project and legend was then printed and carefully transferred to the wood with acetone. Then the base of the 3D print was aggressively sanded to provide better adhesion and glued onto the wood and clamped in place. I had to be careful with this as too tight of clamps would crack the print, but too loose of clamps and the print wouldn’t stay in place as it dried.

Final model showing 2018 peak flow
Final model showing 1976 peak flow
Final model showing 1975 peak flow
Final model showing 2008 peak flow

Applications

The finished interactive model allows the visualization of flow regulation from the Shand Dam, for different peak flow events, and highlights the value of this particular dam. Broadly, this project idea was a way to visualize hydrographs, and showed the differences in discharge over a spatial and temporal scale that resulted from the dam. The top dowel shows the flow above the dam for the peak flow event, and the three dowels below the dam show the flow below the dam for the day of the peak discharge, one day after, and two days after, to show the flow regulation over a period of days and illustrate the delayed and moderated hydrograph peak. The legend dowels are easily removable to line them up with the dowels in the 3D print to get a better idea of ow much flow there was on a given day at a given place. The project idea I used in  creating this model can easily be modified for other dams (provided there is suitable hydrometric data). Beyond visualizing flow regulation the same idea and process could be used to create models that show discharge at different stations over a watershed, or over a continuous period of time – such as monthly averages over a year. These models could have a variety of uses such as showing how river discharge changed in response to urbanization, or how climate change is causing more significant spring peak flows from snowmelt. 

References

Baine, J. (2009). Shand Dam a First For Canada. Grand Actions: The Grand Strategy Newsletter. Vol. 14, Issue 2. https://www.grandriver.ca/en/learn-get-involved/resources/Documents/Grand_Actions/Publications_GA_2009_2_MarApr.pdf

Grand River Conservation Authority (2014). Grand River Watershed Water Management Plan. Prepared by the Project Team, Water Management Plan., Cambridge, ON. 137p. + appendices. Retrieved from https://www.grandriver.ca/en/our-watershed/resources/Documents/WMP/Water_WMP_Plan_Complete.pdf

Walker, A. (April 18th, 1942). The dam is 72 feet high, 300 feet wide at the base, and more than a third of a mile long [photograph]. Toronto Star Photograph Archive, Toronto Public Library Digital Archives. Retrieved from https://digitalarchive.tpl.ca/objects/228722/the-dam-is-72-feet-high-300-feet-wide-at-the-base-and-more

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