Please read on below or use the search function, categories list, or tag cloud to find posts of interest. Keep in mind that most posts reflect student work summarizing one of two projects that had to be completed within a 12-week term. Happy reading!
Geovisual Project Assignment @RyersonGeo, SA8905, Fall 2022
Introduction
3D visualization is an essential and popular category in geovisualization. After a period of development, 3D printing technology has become readily available in people’s daily lives. As a result, 3D printable geovisualization project was relatively easy to implement at the individual level. Also, compared to electronic 3D models, the advantages of explaining physical 3D printed models are obvious when targeting non-professional users.
DEM Data to a 3D Surface: AccuTrans 3D – which provides translation of 3D geometry between the formats used by many 3D modeling programs.
Converting a 3D Surface to a Solid: Materialise Magics – Converting surface to a solid with thickness and the model is cut according to the boundaries of the 5 Transitional Regions of Ontario. Using different thicknesses representing the differences in total population between Transitional Regions. (e.g. The central region has a population of 5 million, and the thickness is 10 mm; the west region has a population of 4 million the thickness is 8 mm)
Slicing & Printing: This step is an indispensable step for 3D printing, but because of the wide variety of printer brands on the market, most of them have their own slicing software developed by the manufacturers, so the specific operation process varies. But there is one thing in common, after this step, the file will be transferred to the 3D printer, and what follows is a long wait.
Visualization
The 5 Transitional Regions is reorganized by the 14 Local Health Integration Network (LHIN), and the corresponding population and model heights (thicknesses) for each of the five regions of Ontario are:
West, clustering of: Erie-St. Clair, South West, Hamilton Niagara Haldimand Brant, Waterloo Wellington, has a total population of about 4 million, the thickness is 8mm.
Central, clustering of: Mississauga Halton, Central West, Central, North Simcoe Muskoka, has a total population of about 5 million, the thickness is 10mm.
Toronto, clustering of: Toronto Central, has a total population of about 1.4 million, the thickness is 2.8mm.
East, clustering of: Central East, South East, Champlain, has a total population of about 3.7 million, the thickness is 7.4mm.
North, clustering of: North West, North East, has a total population of about 1.6 million, the thickness is 3.2mm.
Limitations
The most unavoidable limitation of 3D printing is the accuracy of the printer itself. It is not only about the mechanical performance of the printer, but also about the materials used, the operating environment (temperature, UV intensity) and other external factors. The result of these factors is that the printed models do not match exactly, even though they are accurate on the computer. On the other hand, the 3D printed terrain can only represent variables that can be presented by unique values, such as the total population of my choice.
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2022
Background
Toronto’s rapid transit system has been constantly growing throughout the decades. This transit system is managed by the Toronto Transit Commission (TTC) which has been operating since the 1920s. Since then, the TTC has reached several milestones in rapid transit development such as the creation of Toronto’s heavy rail subway system. Today, the TTC continues to grow through several new transit projects such as the planned extension of one of their existing subway lines as well as by partnering with Metrolinx for the implementation of two new light rail systems. With this addition, Toronto’s rapid transit system will have a wider network that spans all across the city.
Based on this, a geovisualization product will be created which will animate the history of Toronto’s rapid transit system and its development throughout the years. This post will provide a step-by-step tutorial on how the product was created as well as showing the final result at the end.
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.
Peak flow hydrographs for selected flow events. Flow in cubic meters a second reflects average daily 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 flowFinal model showing 1976 peak flowFinal model showing 1975 peak flowFinal 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.
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
Anastasiia Smirnova SA8905 Geovis project, Fall 2022
Introduction
Through this project I wanted to gain and advance my skills in both storytelling and visualizing spatial data. Here you can learn more about my attempt of using ArcGIS StoryMaps to highlight the importance of including children in the urban planning agenda and to show the World- and Canada-wide spatial patterns of urban areas’ commitment to creating inclusive urban environments with children in mind.
I used ESRI’s ArcGIS Pro, Online Map Viewer and StoryMaps for my project. First, I used the desktop app (ArcGIS Pro) to import my data and create my initial maps. After that I uploaded the layers that I wanted to use as web layers to my ArcGIS account, and then I finalized them using ArcGIS online applications. I used the online map viewer to adjust symbology as necessary as was trying to figure out what worked better for each part of my story. It was easy to go back and forth between the Map Viewer and StoryMaps – to make the necessary changes, then to see how the updated maps work with the story, and then repeat these steps as needed. The Map viewer generally had the functionality I needed to change my map symbology and I did not have to go back to ArcGIS Pro too often to make modifications after I uploaded my layers online.
I liked the functionality of StoryMaps. I used the sidecar option to introduce my story, and for showing most of my maps. I find that this block type provides some of the most immersive experience while scrolling, so I used it for the parts of the story that I wanted to keep the reader’s attention on.
I found that the swipe option worked well for showing comparisons. In a regular map, it is often difficult to show all information you want without cluttering the map with too many layers and making the map unreadable. The swipe option can help solve this problem. As such, I used this function to show how many children did (not) live within the municipalities that were part of CFCI and therefore could (not) benefit from the initiative.
the map shows distribution of children and youth residences (on the left, yellow and red) and municipalities involved in CFCI (on the right, blue)
For inserting your maps to any blocks of StoryMaps, you can choose to either use your maps uploaded as images or insert the actual interactive online maps. While the image option has some benefits, such as more flexibility in styling the map and faster loading, the main benefit of inserting the actual online maps is interactivity. You can zoom in and out, search for a specific location, show/hide legend, learn more about each unit on the map and so on (as the creator of the story, you can edit and set restrictions of what readers can and cannot do with your online maps).
Since I wanted to keep my maps as simple visually as possible, I went with the second option. This way, if the reader wanted to learn more about my maps and the information they displayed, they could do so by using the interactive map functions.
Interesting findings
In addition to the main message of the project (the need to promote child friendly cities), the maps showed how the choice of data, scale and mapping methodology can influence the results and representation. On the CFCI website, the main map was showing all countries that were involved in the CFCI. The map did not consider how many municipalities in each country were actually involved in the initiatives.
The main map from the UNICEF CFCI website – CFCI countries
This way of displaying data may be misleading, since the level involvement of each country varied greatly. In some countries, most of the territory was part of CFCI, but some other countries only had a couple municipalities each with UNICEF’s child friendly initiatives.
For this story, in addition to the world CFCI country map similar to the one from the website, a proportional symbol map was created to show how many municipalities from each country were actually involved in the CFCI and I put these two maps in one sidecar block so that the reader could swipe back and forth to see how the distribution of CFCI changed with the change of the variable, and what the actual level of involvement if each country was.
A map from my StoryMap – Municipalities involved in CFCI
When zoomed in, even more information about the unevenness and clustering in the spatial distribution of the CFCI municipalities can be discovered.
The sidecar block (I used the float side by side option for my maps), and the smooth transitions it provided, worked well for showing the differences between the maps, as well as for zooming in into a smaller scale map.
Challenges
Some of the main challenges for me were associated with updating the maps if I wanted to change something. It took some time for me to figure out what could be done at which step of the process (with different apps) and how far back I had to go to modify something. As such I had trouble updating and modifying the legends for the maps.
Unfortunately, the options for adjusting the legends using the ArcStory editor or the online map viewer were limited. For instance, it was impossible to hide or edit the name of the column which contained data used in the map while using the online apps. Since I was creating my original layers in ArcGIS Pro, then uploading them as web layers, and then adjusting my maps further in the online map viewer, it was difficult to go back to change the original data in the end, just to modify one little line on the map legend. Only some parts of the legend could be modified using the online apps. So, one of the lessons I took from this experience is that you need to make sure all the column names are appropriate before making all the edits online if you are using a similar process as I did. It is also helpful to think about the legends right from the start.
Conclusion and results
In general, I am satisfied with the ArcGIS StoryMap platform. It was easy to use, and it did a good job of assisting me in creating a map-based story that looks clean and flows smoothly. I am planning on further exploring the StoryMap functionality in the future.
If you are interested in learning more about child friendly cities and seeing my StoryMap result, you can follow this link:
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2021
Introduction/ background
Every city has zoning bylaws that dictate land use. Most cities, including the City of Toronto, have zoning bylaws that set building height limits for different zoning areas. Sometimes, buildings are built above the height limit, either due to development agreements or grandfathering of buildings (when a new zoning by-law doesn’t apply to existing buildings). The aim of this project is to provide a visualization tool for assessing which buildings in Toronto are within the zoning height limits and which are not.
Data and Processing
3D Buildings
The 3D building data was retrieved from Toronto Open Data and derived using the following methods:
LiDAR (2015)
Site Plans – building permit site plan drawings
Oblique Aerials – oblique aerial photos and “street view” photos accessible in Pictometry, Google Earth, and Google Maps.
3DMode – digital 3D model provided by the developer
Zoning Bylaws
Two zoning Bylaw shapefiles were used (retrieved from Toronto Open Data as well):
Building Heights Limits – spatially joined (buildings within zoning area) to the 3D buildings to create the symbology shown on the map. Categories were calculated using the max average building height (3D data) and zoning height limit (zoning bylaws).
Zoning Categories – used to gain additional information and investigate how or why buildings went over the zoning height limit.
Geovisualization
ArcGIS experience builder was used to visualize the data. A local scene with the relevant data was uploaded as a web scene and chosen as the data source for the interactive map in the “Experience”. The map includes the following aspects: Legend showing the zoning and height categories, a layer list allowing users to toggle the zoning category layer on to for further exploration of the data, and a “Filter by Height Category” tool that allows users to view buildings within a selected height category. Pop-ups are enabled for individual buildings and zones for additional information. Some zones include bylaw expectations which may explain why some of the buildings within them are allowed to be above the zoning height limit (only an exception code is provided, a google search is required to gain a better understanding). instructions and details about the map are provided to the user as well.
Limitations
The main limitation of this project is insufficient data – a lack of either building height or zoning height results in a category of “No data” which are displayed as grey buildings. Another limitation is possibly the accuracy of the data, as LiDAR data can sometimes be off and provide wrong estimates of building height. Inaccuracies within 1m were solved by adding an additional category, but there may be some inaccuracies beyond
This index seeks to delineate areas within the Greater Toronto Area that are characterized as being in close proximity to greenery and wellness entities.
From Green Trees With Red Line, by Justin, June 28th 2021. https://www.pexels.com/photo/food-wood-landscape-nature-8771130/
In this model, greenery and wellness entities are considered as those that are wooded, in some cases recreational, and offer potentially efficient transportation opportunities. Here, distance metrics are created and joined to census geography to create a novel planning tool for planners and interested researchers.
ArcGIS Dashboard – Toronto Greenery & Transit Wellness Index
Data Sources
The variables chosen for this model are spatial statistics that are available for an area the size of the Greater Toronto Area. More nuanced spatial databases are available at the city level, though, anecdotally, it can prove difficult to find similar data sets across the municipalities’ open data portals.
Greater Toronto Area (GTA)
created by DMTI Spatial Inc. on August 15th, 2012.
Federal Electoral Districts (FEDs)
created by Statistics Canada on November 16th, 2016.
clipped to the GTA boundary
Land Use Cover
created by DMTI Spatial Inc. on September 15th, 2020.
‘Park’s and Recreation’ vectors selected and exported.
Transit Line
created by DMTI Spatial Inc. on September 15th, 2020.
detailed polylines of all available transit options in the GTA.
Wooded Area
created by the Ontario Ministry of Natural Resources on September 1st, 2006.
a woodland data set.
Trails Line
created by DMTI Spatial Inc. on April 1st, 2015.
polylines of walking, hiking, and biking trails.
Methodology
The methodology for this analysis is quite straightforward. Firstly, Distance Accumulation is used in ArcGIS’s toolbox – an improved version of Euclidean Distance that is now found in ArcGIS Pro.
A Distance Accumulation raster is created for each of the spatial entities.
The resulting Distance Accumulation raster.
After the process, the cells of each raster are converted into points so that they may be normalized to a range of 0 to 1.
Raster to Point Geoprocessing tool.
The resulting Raster to Points layer.
Lastly, the FED cartographic boundary file is clipped to the GTA boundary file, and then the values of these points are spatially joined to the vectors. Ultimately, the mean values of the points contained within each polygon are retained.
Proximity to wooded areas is weighted 50%,
parks and recreational areas – 25%,
trails – 15%,
and public transit lines – 10%.
The variables are weighted and combined linearly in the final Greenery and Transit Wellness Index. The dashboard allows the user to select and view the Greenery and Transit wellness statistics of any FED within the GTA. On the left side of the window one can see a graph of each factor grouped by FED.
Zooming into, or selecting any FED on the map, or list on the right side of the screen changes the features of the graph. Finally, on the bottom right of the dashboard, a legend with the choropleth’s colour classification scheme can be found in the first tab . The second tab details the statistics of user selected FED’s, while the third lists this project’s data sources.
Literature
The methodology of this assignment is based off the following literature where links between access to green space and health outcomes are explored.
Markevych, I., Schoierer, J., Hartig, T., Chudnovsky, A., Hystad, P., Dzhambov, A. M., de Vries, S., Triguero-Mas, M., Brauer, M., Nieuwenhuijsen, M. J., Lupp, G., Richardson, E. A., Astell-Burt, T., Dimitrova, D., Feng, X., Sadeh, M., Standl, M., Heinrich, J., & Fuertes, E. (2017). Exploring pathways linking greenspace to health: Theoretical and methodological guidance. Environmental Research, 158, 301-317. https://doi.org/10.1016/j.envres.2017.06.028
Twohig-Bennett, C., & Jones, A. (2018). The health benefits of the great outdoors: A systematic review and meta-analysis of greenspace exposure and health outcomes. Environmental Research, 166, 628-637. https://doi.org/10.1016/j.envres.2018.06.030
O’Regan, A. C., Hunter, R. F., & Nyhan, M. M. (2021). “Biophilic cities”: Quantifying the impact of google street view-derived greenspace exposures on socioeconomic factors and self-reported health. Environmental Science & Technology, 55(13), 9063-9073. https://doi.org/10.1021/acs.est.1c01326
Roberts, M., Irvine, K. N., & McVittie, A. (2021). Associations between greenspace and mental health prescription rates in urban areas. Urban Forestry & Urban Greening, 64, 127301. https://doi.org/10.1016/j.ufug.2021.127301
Data Bibliography
Greater Toronto Area (GTA) Boundary
DMTI Spatial Inc. (2012, Aug 15). Greater Toronto Area (GTA) Boundary. Scholar’s Geoportal. http://geo.scholarsportal.info.ezproxy.lib.ryerson.ca/#r/details/_uri@=41643035
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2021
Data referenced contains information licensed under the Open Government Licence – City of Ottawa.
Initial Concept
Early on, when thinking about the project, I decided I wanted to choose a technology I had little to no exposure to and really dive deep into how it worked and what it was capable of. I looked through several different technologies and eventually decided on Mapbox as a result of William Davis’ site and the vast array of cool interactive projects using it as their platform. Mapbox is a platform specifically for web or application maps that gives the user an incredible degree of control over the appearance of all aspects of a map. It does this by providing a studio interface (GUI) where a user can customise a basemap by importing shape files, geojson files, image files, etc. Once you’ve edited this basemap to your satisfaction you can export the map as a url and link it directly into an html document.
My initial idea was to use time series data with a slider to visualize bike accidents in my home city (Ottawa) over a number of years. However, because of how Mapbox methods and functions work (more on this later) I chose to use a slider to run through the numbers of accidents by intersection from a particular year. With this in mind I began the construction of my website (and more tutorials on Mapbox methods than I care to remember)…
Webmap Construction
I will admit quite frankly that I know absolutely nothing about html and CSS, both essential components in website design. However, I do have some javascript experience and since mapbox methods are built on node.js this proved invaluable. The first step in the map construction thankfully involved only graphical tweaking of the openstreetmap basemap that Mapbox provides as an editable style. Keeping in mind those important cartographic principles, I chose to change all the major components on this map into shades of navy blue. I also gave the labels a larger white halo to allow them to stand out and hid those I didn’t think would be very useful.
The finished basemap in Mapbox Studio
The next step was to upload a shapefile of the accident points from 2013, obtained from the City of Ottawa open data portal, to Mapbox. Mapbox acts as a host for shape files, geojson, etc. that you upload to it, and converts all these formats into tilesets that you can call in your map by referencing a url. You can also add these tilesets directly into your basemap, however this makes them harder to work with when you eventually switch over to code. For this map, I chose to add a shapefile of the City of Ottawa neighbourhoods directly to my basemap since I had no interest in making this layer interactive. I also uploaded a shapefile containing the cycling network for the City to my basemap just out of personal interest. The file containing the accident points and information was left as a tileset and not added to the basemap so we could easily call it when developing our interactive elements.
The tileset and all of its fields referenced in the final map
Now that I had my data uploaded and my basemap complete it was time to move into a code editor and put together my webmap.
A Daunting Amount of Code
Now, when you first look at the code for this webmap it can appear quite daunting, I certainly felt that way when I first tried to figure it out. You’ll need a few things to actually start editing your html page: 1. You need to go download the node.js repository, this is what Mapbox methods and fuctions run on. 2. You’ll need a good editor/compiler and a live server of some sort so you can see your changes in real time. I used Atom as my editor and then a free live server called “atom-live-server” which is available through atoms tools library. I also played around with creating a python local server – hosted from my PC, but this is quite complicated and it’s much easier to use the available tools.
Once you’ve got all this together it’s time to start putting together your webpage. You can either code it entirely from scratch or base it on a pre-existing project. Since I had little to no experience with html and CSS I chose to take one of Mapbox’s example projects and edit it using my own maps and functions. What this means is that the basics of the page itself were already set up, however none of the information was present. So, for example, the slider element was in the webpage, but none of the information you could scroll through was present, nor was there a method linking the slider to a filter for that information.
Some of the basic HTML and CSS that I edited
So, on to Mapbox and it’s various methods and functions. First off was to add the basemap as the “map element” on our webpage. This was done by plugging the url into the “style” field of the map element. This essentially imports the full style that you’ve created in the GUI. When doing this it’s also important to set your starting zoom and centre point. If you don’t do this, Mapbox will default to a full world zoomout and place you at the projection centre. Here I chose a starting zoom of 9.1, which gives a good overview of the City of Ottawa and a centre sitting smack in the middle of the City.
Next, we call the tileset containing the collision points. I have to admit it took me a full week of work to get this part right. Mapbox has a ton of different ways of styling these layers that you can play with directly in the code. However, ashamed as I am to admit it, my major issue here was not adding the “mapbox://” before my tileset id. This is very important, without this your map will just appear blank, as you are adding a layer that for all intents and purposes does not exist to Mapbox. Once I had eventually figured this out I went ahead and added the layer with a few style options worked out. The three major things I chose to style with the layer were: 1. I set the circle radius to grow with the number of cyclist collisions per point. This was done using a “get” function on the “2013_CYCLI” field that was part of the collisions shapefile. 2. Next, I interpolated the colour of the points, again on the number per intersection, just to give a little more distinction. 3. Finally, and this is a very important step, I set a filter on the “2013_CYCLI” field that would ensure only points with cyclist collisions would be added to the map.
The basic building blocks of my webmap, including the layer calls and styling options
Let’s Add Some Interactivity
Our next step was to link the slider element of our html page to a function that would allow it to filter data. I used a very simple setup for this that would run through the “2013_CYCLI” field and filter the intersections by position on the slider. To do this, I created a variable that stored the slider position as an integer. I then used a “filter” function to go through the layer and pull all accidents with that value or higher. So now the slider would let you go through all the accidents in 2013 and look at all collisions involving cyclists, locations with 2 or more cyclist collisions, and locations with 3 or more cyclist collisions. Essentially, you can see which intersections in Ottawa are the most dangerous for cyclists.
The slider function with the final layer call to re-add the streets to the map
The final touch was to call another layer from openstreetmap and overlay it so you were able to see the road network. With this done, the webmap was complete and ready to be shared.
Oh Github
To share the map I chose to use Github pages. The process is relatively simple once you get going. The first thing to do is to ensure that your html file is called “index” – this is the root file for a github pages site as you are able to add several different pages to any site you create. As we were just sharing the single page, calling it index ensures that it’s always displayed when you load the site. Next you upload the html file to Github, or you link the folder on your machine to github through the github desktop app, I found this super useful as Atom (the code editor I was using) has github desktop integration. And voila, once you’ve enable the pages option in your github repository settings, you can share the link with whomever you’d like!
I do think it would be remiss not to mention a few of the issues I had: 1. The major one was the lack of tutorials for Mapbox. While there is a lot of examples and their API and style reference is exhaustive, a lot of the issues I ran into could have been solved very easily if a solid online tutorial library focused on the basics (they do have one but it’s not that helpful for beginners) existed. The second major issue was my complete lack of knowledge when it came to html and CSS. I was able to learn a fair bit as I went but in the end there are a few portions that I wish I could polish up. Specifically, adding tickmarks and a legend to the slider would have been a very useful feature and I spent hours trying to figure that one out. Unluckily not every browser supports tickmarks and/or legends so I ended up just giving the range by the title. Finally, I do wish that the data I was dealing with had been limited to cycling incidents, as the inclusion of all collisions forced me to filter by cyclist collision rather than year.
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2021
Introduction
The crime rate for the city of Chicago is significantly higher than the US average. In 2016, Chicago was responsible for nearly half of the homicides increase in the US.
A time series interactive dashboard will be used to visualize and analyze the distribution of homicides across Chicago for the last two decades. We will create this dashboard using Tableau Desktop, which is an interactive data visualization and analytical tool. In addition to the dashboard, we will create two visualizations: treemap and line chart. Treemap will be used to visualize aggregated homicides across police districts. The line chart will visualize the number of homicides per month.
Data
The data used to produce the Interactive Dashboard was obtained from the Chicago Data Portal. The dataset consists of 7,424,694 crimes between 2001 to 2021. However, since our crime is focused on homicides, the data was filtered by setting the field Prime Type to be equal to HOMICIDE and then the data was downloaded as a CSV file.
I will go through the step-by-step process of creating the time-series interactive dashboard, the dashboard can be viewed here for reference.
Creating the Interactive Dashboard
To get started on creating the interactive dashboard and the visualizations. We will first import the data, since our dataset is in a CSV format we will select the Text File under the To a File Option. After opening the data, you will see a screen showing all the fields in the CSV file and on the bottom left beside Data Source, you will see a tab called Sheet 1 (highlighted in orange), we will click on it to begin the process of creating the dashboard. The Worksheet tabs will be used to create the map and visualizations and the Dashboard tab will be used to create the dashboard.
In order to create a dot density map showing homicides across Chicago, we need to plot the latitude and longitude coordinates for each homicide. We do this by dragging the Longitude field into the Columns tab and the Latitude field into the Rows tab. We then set both fields to Dimension, by right-clicking on the fields. A map will automatically be created however, there are two minor issues with the map, shown below.
Our map shows 1 null point (displayed on the bottom right of the map) and there is a random point in Missouri.
In order to fix these issues, we will first remove the null point by clicking on 1 null and selecting the Filter Data. To remove the random point located in Missouri, we will right-click on the point and select Exclude. This will remove the point from the map, and our map extent will automatically zoom to the Chicago area.
Creating Time-series Map
To create the time-series map, we will drag the Year field into the Pages card. This will create a time slider that will allow you to view the dot density map for any chosen year. The time slider also allows the user to animate the map, by clicking on the loop button and the animation can be paused at any time.
For our dot density map, we will show specific attributes for each homicide location on the map. This can be accomplished by dragging the fields into the Marks card. For our map, we will show the following fields: Block, Description, District, Location Description, and Date.
To make our map look aesthetic, we will change the theme of our map to Dark. This can be done by going to the header Map, hovering over to Background Map, and selecting Dark. To better visualize the locations of the data points, we will add zip code boundaries to the map. To do this, we will go to the header Map and from there we will choose Map Layers and then select the Zip Code Boundaries under the Map Layers pane (this will appear on the left side of the sheet). Lastly, we are going to change the colour and size of the data points. This can be done by going to the Marks card and selecting the Color and Size option.
Visualizations
Treemap
We will now create the visualizations to better understand the distribution of homicides in Chicago. To begin the process, we will create a new Worksheet and we will name it Treemap. To create a treemap, we will first drag the Year field into the Page card, as we are creating a time-series interactive map. Since we want to see how homicides vary across police districts, we will drag the District field into the Marks card. To show the homicides, we will drag the Primary Type field onto both the Color and Size options in the Marks card. We will then set the Primary Type field to Measure and choose Count, as we want to show aggregated homicides. The final step is to make our worksheet transparent, so we could add it to our interactive map. This is done by going to the header Format and selecting Shading. In the Formatting pane, we will set the Worksheet and Pane background colour to None.
Line Chart
We will create a new Worksheet and name it chart. Our data does not contain the month the incident occurred, but we have the Date when the incident occurred. So, in order to extract just the month, we will need to create a new field. This can be done by going to the Analysis header and choosing Create Calculated Field. We will give the field an appropriate name, change the name Calculation1 to MonthOfIncident. To extract the month we first need to truncate the Date field, as it contains both the date and time. We will use the LEFT function which allows us to truncate a string type specified by the length. The date consists of 10 characters (dd/mm/yyyy), so our query would be LEFT([Date], 10). Next, we need to extract the month from the truncated string, so we will use the built-in function, called MONTH, which returns a number representing the month. However, the MONTH function requires its parameter data type to be a date. So we need to convert our truncated string date to date, we can do this by applying the DATE function on the LEFT function and finally applying the MONTH function on the entire expression. Thus our expression for finding the month is:
Now, we can finally begin the process of creating the line chart. As we are making a time-series interactive map, we will also need to make a time-series line chart. So, we will drag the Year field into the Pages card, as this will be part of our time-series interactive map. Next, we will drag the MonthOfIncident field into the Columns tab and Primary Type into the Rows tab. Since we want to show the total number of homicides, we will set the Primary Type field to Measure and select Count. We will make this worksheet transparent as well, so we will go to the header Format and select Shading. In the Formatting pane, we will set the Worksheet and Pane background colour to None.
Creating the Dashboard
To create our dashboard, we will click on the Dashboard tab, right beside the Worksheet tab. In the dashboard, we can add all the worksheets we have created. We will first add the interactive map followed by the visualizations. To display the visualizations on top of the map, we need to make them float. So, we will select one of the visualizations and hover over to More Options (shown as a downward arrow) and click on Floating, repeat this process for the other visualization. You can also change the size of the dashboard by going to the Size pane, the default size is Desktop Browser (1000 x 800), we will change it to Generic Desktop (1366 x 788). Last but not least, we will publish this dashboard, by going to the Server -> Tableau Public -> Save to Tableau Public As. Tableau Public allows anyone to view the dashboard and allow anyone to download it and specific permissions for the dashboard can be applied.
Limitations and Future Goals
One of the main limitations that occurred during the process of creating the dashboard was gathering the data. First, I had downloaded the entire CSV file containing all different types of crimes. However, when I filtered the Primary Type to HOMICIDE in the Filters card, a huge amount of data for homicides was missing. So, I then decided to directly connect the dataset to Tableau using ODATA Server. It took me a couple hours to connect to the server, just to run into the same issue. I then tried exporting the data through SODA API from the portal, I was able to find raw data for homicides however, it contained partial data. After a while, I figured out I had to directly filter the table in the Chicago Data Portal in order to download the entire data for Chicago homicides.
Another limitation I faced with the data was creating the visualizations. Originally I intended on creating a highlight table to show how homicides varied across police districts and community areas. However, due to the data having null values for community areas, the visualization couldn’t be created. Furthermore, I was only able to create basic visualizations, as the data did not have any interesting variables to help analyze the homicide distribution. For instance, if each homicide incident included a Zip Code, it could have been used to explain the spatial pattern much better rather than using police districts to show how homicides vary across it.
If I was to expand on this project, I would try to incorporate all different crime incidents from 2001-2021 to see Chicago’s overall crime history. In addition to this, I would find demographic data for Chicago such as population, education, and average family income to help understand the spatial pattern for the distribution of crimes.
Natural disasters are major events that result from natural processes of the planet. With global warming and the changing of our climate, it’s rare to go through a week without mention of a flood, earthquake, or a bad storm happening somewhere in the world. I chose to make my web map on natural disasters, because it is at the front of lot of people’s minds lately, as well as there is reliable and historical public data available on disasters around the world. My main goal is to make an informational and easy to use web page, that is accessible to anyone from any educational level or background. The web page will display all of the recorded natural disasters around the world over the past 68 years, and will allow you to see what parts of the world are more prone to certain types of disasters in a clear and understandable format.
Figure 1. Map displaying natural disaster data points, zoomed into Africa.
In order to make my web map I used:
Javascript – programming language
HTML/CSS – front-end programming language and stylesheets
Leaflet – a javascript library or interactive maps
JQuery – a javascript framework
JSCharting – a javascript charting library that creates charts using SVG (Scalable Vector Graphics)
Data & Map Creation
The data for this web map was taken from: Geocoded Disasters (GDIS) Dataset, v1 (1960-2018) from NASA’s Socioeconomic Data and Applications Centre (SEDAC). The data was originally downloaded as a Comma-separated values (CSV) file. CSV files are simple text files that allow for you to easily share data, and generally take up less space.
A major hurdle in preparing this map was adding the data file onto the map. Because the CSV file was so large (30, 000+). I originally added the csv file onto mapbox studio as a dataset, and then as tiles, but I ended up switching to Leaflet, and locally accessing the csv file instead. Because the file was so large, I decided to use QGIS to sort the data by disaster type, and then uploaded them in my javascript file, using JQuery.
Data can come in different data types and formats, so it is important to convert data into format that is useful for whatever it is you hope to extract or use it for. In order to display this data, first the markers data is read from the csv file, and then I used Papa Parse to convert the string file, to an array of objects. Papa Parse is a csv library for javascript, that allows you to parse through large files on the local system or download them from the internet. Data in an array and/or object, allows you to loop through the data, making it easier to access particular information. For example, when including text in the popup for the markers (Figure 2), I had to access to particular information from the disaster data, which was very easy to do as it was an object.
Code snippet for extracting csv and creating marker and popup (I bolded the comments. Comments are just notes, they are not actually part of the code):
// Read markers data from extreme_temp.csv
$.get('./extreme_temp.csv', function (csvString) {
// Use PapaParse to convert string to array of objects
var data = Papa.parse(csvString, { header: true, dynamicTyping: true }).data;
// For each row in data, create a marker and add it to the map
for (var i in data) {
var row = data[i];
// create popup contents
var customPopup = "<h1>" + row.year + " " + row.location + "<b> Extreme Temperature Event<b></h1><h2><br>Disaster Level: " + row.level + "<br>Country: " + row.country + ".</h2>"
// specify popup options
var customOptions =
{
'maxWidth': '500',
'className': 'custom'
}
var marker = L.circleMarker([row.latitude, row.longitude], {
opacity: 50
}).bindPopup(customPopup, customOptions);
// show popup on hover
marker.on('mouseover', function (e) {
this.openPopup();
});
marker.on('mouseout', function (e) {
this.closePopup();
});
// style marker and add to map
marker.setStyle({ fillColor: 'transparent', color: 'red' }).addTo(map);
}
});
Figure 2. Marker Popup
I used L.Circlemarker ( a leaflet vector layer) to assign a standard circular marker to each point. As you can see in Figure 1 and 3, the markers appear all over the map, and are very clustered in certain areas. However, when you zoom in as seen in Figure 3, the size of the markers adjusts, and they become easier to see, as you zoom into the more clustered areas. The top left corner of the map contains a zoom component, as well these 4 empty square buttons vertically aligned, which are each assigned a continent (just 4 continents for now), and will navigate over to that continent when clicked.
Figure 3. Map zoomed in to display, marker size
The bottom left corner of the map contains the legend and toggle buttons to change between the theme of the map, from light to dark. Changing the theme of the map doesn’t alter any of the data on the map, it just changes the style of the basemap. Nowadays almost every browser and web page seems to have a dark mode option, so I thought it would be neat include. The title, legend and the theme toggles, are all static and their positions on the web page remain the same.
Another component on the web page is the ‘Disaster Fact’ box on the bottom right corner of the page. This textbook is meant display random facts about natural disaster over a specified time interval. Ideally, i have variable that contains an array of facts in a list, in string form. Then use the setInterval(); function, and a function that generates a random number, that is the length of the array – 1, and use that as an index to select one of the list items from the array. However, for the moment the map will display the first fact after the specific time interval, when the page loads, but then it remains on the page. But refreshing the page, will cause for the function to generate another random fact.
Figure 4. Pie Chart displaying Distribution of Natural Disasters
One of the component of my web map page, that I will expand on, is the chart. For now I added a simple pie chart using JSCharts to display the total number of disasters per disaster type, for the last 68 years. Using JSCharts as fairly simple, as you can see if you take a look at the code for it in my GitHub. I calculated the total number of disasters for each disaster type by looking at the number of lines in each of my already divided csv files, and manually entered them as the y values. However, normally in order to calculate this data, especially if it was in one large csv file, I would use RStudio.
Something to keep in mind:
People view websites on different platform nowadays, from laptops, to tables and iPhones. A problem with creating web pages is to keep in mind that different platform for viewing web pages, have different screen sizes. So webpages need to be optimized to look good in differ screen sizes, and this is largely done using CSS.
Looking Ahead
Overall my web map is still in progress, and there are many components I need to improve upon, and would like to add to. I would also like to add a bar chart that shows the total number of disasters for each year, for each disaster type , along the bottom of the map, with options to toggle between each disaster type. Also I would like to add a swipe bar that allows you to see the markers on the map based on the year. A component of the map I had trouble adding was an option to hide/view marker layers on the map. I was able to get it to work for just one marker for each disaster type, but it wouldn’t work for the entire layer, so looking ahead I will figure out how to fix that as well.
There was no major research question in making this web page, my goal was to simply make a web map that was appealing, interesting, and easy to use. I hope to expand on this map and add the components that I’ve mentioned, and fix the issues I wasn’t able to figure out. Overall, making a web page can be frustrating, and there is a lot of googling and watching youtube videos involved, but making a dynamic web app is a useful skill to learn as it can allow you to convey information as specifically and creatively as you want.
Geovis Project Assignment @RyersonGeo, SA8905, Fall 2021
By: Katrina Chandler
For my GeoVisualization Project, I chose to map locations of music videos by the Reggaeton artist, Daddy Yankee, using ArcGIS Story Map. Daddy Yankee has been producing music and making music videos for more than 20 years. I got the idea for this project when watching his music video ‘Limbo’.
Data Aggregation
Official music videos were selected from Daddy Yankee’s YouTube channel. Behind the scenes videos on Daddy Yankee’s YouTube channel and articles from various sources were used to locate cities where these videos were filmed. Out of the 56 official videos, excluding remixes and extended versions, I was able find the locations for 27 of the Daddy Yankee’s music videos. It should be noted that this project has minimal information about Daddy Yankee as the focus of it was the locations where the music videos were filmed.
Making the Story Map
To display my project, I decided to use story map tour as it allows multimedia content and text to be displayed side by side with a map. I started by logging into ArcGIS story map, selected new story then selected guided map tour.
I entered a title for my project then looked into changing the base map. I also wanted to change the zoom to a level appropriate for the music video locations. To do this I selected map options (in the top right corner), changed my base map into imagery hybrid and changed my initial zoom level to city. I chose imagery hybrid as it will help me locate the cities better and I prefer the look of it.
I added my multimedia content, i.e. YouTube links, by selecting ‘add image or video’. I selected ‘link’ and pasted the video link in to the appropriate box. I added text stating where the video was filmed, when it was released (uploaded) on Daddy Yankee’s YouTube channel and any additional information I found.
After entering the multimedia content and text, I added the location on the map that corresponds with the slide. To do this, I selected add location, zoomed into the city and then clicked to drop the location point. Another way to add a location point to the map is to ‘search by location’.
While dropping location points on the map, I did not get all as precise as I would have liked the points to be so I edited them. I selected ‘edit location’ then either clicked and dragged the point or deleted it completely and dropped a new point. In the figure below, there are red edges around the 22nd point. This signifies that the point has been selected and can be dragged to its new location. It can also be deleted by clicking on garbage bin icon (at the bottom centre of the picture). If deleted a new point was reselected.
Dependent on what the user wants, the level of zoom can be different on each slide. To change the zoom level, simply zoom in or out of the current map then select ‘use current zoom level’. This worked well for me when I wanted to show exact locations of where a video was filmed. Slides 6, 11, 14, 18, 19, 22 and 26 in the story map show pin point locations of the following respectively: the Faena Hotel, Hôtel de Glace, Comprehensive Cancer Centre of Puerto Rico, Escuela Dr. Antonio S. Pedrerira, Puerto Rico Memorial Cemetery, Centro, Ceremonial Otomi and La Bombonera Stadium. Pinpoint locations were compared to google maps to ensure the correct placement of the location point. These pinpoint locations are where the music videos were partially or fully filmed.
To change the design of my story map, I clicked ‘design’ at the top of the page and selected the Obsidian theme. To change the colour of my text, I highlighted it, clicked the colour palette and selected the colour I wanted.
There is an option to add multiple media to one slide. To do this, click the ‘+’ icon at the top of slide and upload a file or add a link. To play the music video, select play (like how it is on YouTube) and select full screen if you like. To open the YouTube link in a new window, click the title of the music video. If the user wants to reorder the multimedia content, they have to click the icon with three horizontal lines and a new window will open. There the user can reorder the content by dragging it to the where they like it to be seen. In order to see the multimedia content in one slide, the user clicks the right (and left) arrow as seen below. To see the credited information, hover over the information icon (i) at the top left of the page.
To add a slide, select ‘+’ at the bottom right of the story map. To change the layout, select the ‘…’ at the bottom left of the story map and customize. The first option is Guided where you can select if you want the story to be map focused or media focused. The second option is Explorer where you can select if you want the slides to be listed or in a grid format. To rearrange a slide, select it and drag to the new position.
Although this project is based on media content, I decided to use guided map focus as it is best suited for this GeoVisualization project. The order of this project was based on the dates the music videos were released on Daddy Yankee’s YouTube channel. It is in chronological order starting with the newest upload to the oldest upload. Below is a picture to visualize the locations of the music videos from this project.
Issues
A few of the music videos were filmed in multiple locations. I was only able to add one location point per slide so I select the point based on interest or where the majority of the video was filmed. The song Con Calma had 2 filming locations, however Daddy Yankee filmed his part in Los Angeles so Los Angeles was selected for the location point. Another issue was that eight of the music videos were filmed in Miami, Florida and no precise locations were found for these videos. To allow the viewer to read the name of the city clearly, at the selected zoom level, point locations were placed around the name of the city instead of directly on top of it. This was taken into consideration for all locations. Unfortunately, one of the precise locations (Puerto Rico Memorial Cemetery – slide 19) had a fair amount of cloud cover so the full location could not be seen clearly. I also had an issue changing the story map title and slide titles text colour. Data collection was the most difficult part of this project. The sources of this data (articles) are not scholarly peer reviewed and can be considered a limitation as the accuracy of their data is unknown.