Turbo Vs Snail

by Jazba Munir

The highways in Canada including the Trans Canada Highway (TCH) and the National Highways System (NHS), fall within provincial or territorial jurisdiction (Downs, 2004). The Greater Toronto Area (GTA) is surrounded by many of the 400 series highways. Some of the segments or between interchanges experience higher traffic volume than others (Downs, 2004). The traffic volume during certain hours such as morning rush hours (6:30 – 9:30) and evening rush hours (4:30- 6:30) results in traffic congestion. This traffic congestion is experienced on highway (Hwy) 401 that is the most “busiest” highway of North America. In 2016, City of Toronto Council approved the road tolls for Gardiner Express and Don Valley Parkway (DVP) to decrease the traffic volume and congestion on these two highways (Fraser, 2016). This proposal was not implemented; nonetheless, it can be visualized using Tableau that whether the speed improves by using the dataset to compare the toll route with non-toll route. The steps on the Tableau: The dataset used for visualization can be organized and clean using Microsoft Excel or Tableau. The speed data is retrieved in points form. For instance, each point has a x and y coordinates. The first step is to create field ID in order to connect each point (x, y) to next point (x, y); in order, to create the line of Hwy 401.The street , highways, routes layer provided by Tableau was used as a guideline to make sure that all the points are connected in a correct order (See Figure 1) .

Figure 1: The layer added into the map sheet

The x and y are converted from measures to dimensions since, the x and y default setting is measures. This change can be made by dragging and dropping x and y from measures to dimensions. Another way is putting longitude into columns and latitude in to rows (See Figure 2).

Figure 2: Columns and Rows for Longitude and Latitude.

The difference between the two is that dimensions are tools that are used to slice and describe data record whereas measures are values of those records that are aggregated. For further assistance please refer to: https://www.tableau.com/learn/training Once all the points appear on the map in tableau use the mark first selection to select line to connect the points (See Figure 3).

Figure 3: The option to connect the dots.

The speed data for any of the selected hwy can be placed in the colors and graduated color scheme from red to green is selected. In this color scheme red indicates minimum speed of 80km whereas green indicates maximum speed 120 km. These speeds were selected as standard to compare toll route with non-toll routes. These are some of the basics steps that are required for any spatial tableau project. The color, size, label and detail options can be selected to create the visualization much clearer (See Figure 4).

Figure 4: The option to add color, size and labels of the variables.

This shows the options for creating the comparison between the turbo vs snail. For further assistance please refer to: https://www.tableau.com/learn/training Once this is set up another sheet was added to include a graph component. The speeds can be organized by hour, minute, year, road (toll vs non-toll). The speed can be represented by using the color option. The speed on the map is represented with the red to green color gradient. The underneath map is layer map available through tableau (See Figure 5).

Figure 5: Showing the speed in color red to green.

This will indicate the difference between the speed at the different part of the hwy. All the other hwy’s appear in yellow to show insects of each hwy. The sheet 1 for map and sheet 2 with a graph are combined to create a dashboard. This dash board helps to visualize the graph and map at once. The filter for each sheet is combined to make space organized more space for the sheets (See Figure 6 and 7).

Figure 6: Showing the filters added into the dashboard.

For further assistance please refer to: https://www.tableau.com/learn/training The dashboard helps to know the speed and compare it based on the time and location. Based on the visualization, it can be concluded that toll routes have no congestion as the line is green. This indication is drawn based on the visualization. In contrast, the non-toll route appears red and light green for some sections. The color helps to know where the congestion occurs. Image 1:

Dashboard combining the two sheets In conclusion, the tableau visualization helps to compare between toll route vs non-toll route. Based on the dashboard, the toll route is turbo speed whereas the non-toll route are snails.

References https://www.brookings.edu/research/traffic-why-its-getting-worse-what-government-can-do/ https://www.cbc.ca/news/canada/toronto/city-council-meeting-road-tolls-1.3893884

Traffic.me: Mapping live traffic with ArcGIS Runtime SDK and HERE Technologies using Android App Developer

by Nicholas Pulsone
Geovis Class Project @RyersonGeo, SA8905, Fall 2018

Topic & Background

Driving through congested parts of Toronto is a tedious and troubling problem that many people would like to avoid. The goal was to create a mobile application using android app developer that can use traffic data as a live input to map traffic patterns across North America. Many companies such as HERE Technologies record traffic information that updates regularly and can be used to map and observe traffic patterns across the entire world. Using android app developer, it is easy to add software developer packages such as ArcGIS Runtime SDK to develop new tools that can be used on a day-to-day basis.

Data

The first problem when creating an app for a purpose or goal is where to find the data. As previously mentioned, HERE technologies is a company owned by NOKIA and currently has its headquarters in Amsterdam. HERE technologies records live weather, routing and traffic information using a combination of both geolocation and intelligence algorithms. Geolocation services that HERE tracks include:

  • Devices with location or GPS tracking
  • Tables or other devices with WIFI and signal strength
  • Phones while measuring varying strength of reception via cell tower signals

HERE technologies contains a global database of over 93 million cellular towers and over 2.3 billion Wi-Fi hotspots which record and store data. The data needed to be able to map varying levels of traffic or traffic density as well as potential collisions or other disruptions affecting driving conditions. The data would need to be able to be displayed visually on a mapping platform and accessible by android app developer software.

Methods

There are multiple ways a live traffic application can be created using data from HERE technologies:

  1. Creating a live traffic app using HERE API and map creator
  2. Creating a live traffic app using HERE data in ArcGIS Runtime SDK (requires ArcGIS developer license)

The methods in this blog will be describing how to create an application using the data from HERE technologies with ArcGIS Runtime SDK.

The first step is to download the needed requirements. First, is to download the newest version of android app developer studio. Currently, the newest version of Android App developer studio is 3.2.1 and available online for Windows, Mac and Linux. Once android app developer is downloaded, the next step is download the second part of the software that will be used in this creation, which is the ArcGIS Runtime SDK for Android 4.0.

The second step is to set the back-end of the application. After specifying the operating system the application will work on, and inputting the name of the application, the first thing to set up is include the ESRI bintray for ArcGIS.

As ESRI’s repository is not open source, the url must be specified to manually add the url for the ESRI bintray. Then the app dependencies need to updated to include the ArcGIS Runtime SDK.

Once the Gradle scripts were synced, the next step was to add a map view for the app. By default, we can remove the text view element and manually create a map view with the following syntax:

After adding the map view for the data, the next step was to specify a basemap then access the data:

The above syntax is a sample of how a basemap and starting location can be specified upon opening. The final step was to be able to access the data. HERE technologies has collaborated with ESRI to develop a world traffic service that can be accessed from mobile and desktop services using the url:

http://traffic.arcgis.com/arcgis/rest/services/World/Traffic/MapServer

Additionally, ESRI and HERE technologies have also created a layer available on the ArcGIS developer portal to users with an ArcGIS developer license. Once the layer is accessible, it is important to open and save the layer in ArcGIS online and enable sharing and public access permissions. As layers used in ArcGIS require a login to be viewed, the next step is to setup a proxy to bypass the login error that would prevent the data from being used, even if permissions are set to public.

To setup a proxy using the ArcGIS developer server proxy, the application must be authenticated and registered in the ArcGIS developer platform. Once registered, the user has access to many services such as a proxy service which will be used along with the traffic layer.

To enable this proxy under services, we must specify what type of proxy service and request limit the proxy will use. Once the requirements are specified, the service outputs a URL which contains a proxy service from ArcGIS.

To use the proxy, simply add the link as a layer from web in ArcGIS online, and the proxy should be active.

Figure 1: Adding Services to ArcGIS Online Map

The final step was to add in the url for the ArcGIS online webmap which contains the traffic data, into android app developer.

Once the url was added into the Android App developer; just click Sync & Run and the app will appear on your device similar to the picture below!

Figure 2: Example of Traffic App

Limitations

A limitation that was experienced while coding the application was ease of use. Without using a legend or slider, it is very hard to distinguish which areas of Toronto are being affected by what kind of problem. The symbology can be changed, however integrating a legend as a button feature in android app developer was more useful and ultimately was included in the final iteration of the app shown in Figure 3.

Figure 3: Final Iteration of Traffic.me

 

New York City Automobile Collisions

Creating An Interactive Web Map

By: Joshua Ali

Geovis project Assignment @RyersonGeo, SA8905, Fall 2018

Data

The data used for this map was retrieved from New York City Open Data (https://opendata.cityofnewyork.us/) and automobile collisions data set, it has information on collision from 2011 to present.  This will have all information needed for the map.

Using Mapbox

The interactive map will be using map box GeoLibrary JavaScript, so an account must be created with map box.  This is a free sign up and a pay as you go account (pretty much if you use it a lot you have to pay) (https://www.mapbox.com/signup).

Creating the Base Map

The next step is to create the base map that was used to display my data.  To write the code I used a text writing software.  The two I switched between using is Sublime (https://www.sublimetext.com) and Codepen, (https://codepen.io) they are both free software’s that can be used.  Now you will need to write a html doc that will be used to display your map.  The doc was written below for optimal settings and will be built upon with more code later to customize the map.

Now that the setting style for the map functions have been in place, the map needs to be linked with a mapbox access token that is created from my account.  By doing this the html doc will be linked to my account.

A script was created using the var function to create a new map that will use as style option that is linked to your account.  In my case I decided to use the dark map background as my style for the map.  Also, in the script below the latitude and longitude was selected so when the map is opened it will be looking at New York City.

With all the current script within the text editor this document can be opened with chrome browser to show the base map.  The image below shows what would come up.

Customizing the Base Map

Now that the base map of the map is created, I can begin adding and customizing NYC automobile collisions to the map.  To connect the data downloaded to the map created they first need to be in the same project folder as the base map html doc made above.

To do this a local server has to be made on the computer so the base map made can draw information from the NYC database to be projected. The api also needs this to continuously update the projected data to the interactive tool that will be added later.  This was done by downloading python and running Python’s SimpleHTTPServer. Using the command control panel, the local server was run on my laptop.  This is useful because changes made in the coding on the text editor of the map can be seen immediately on the html map doc since the local host is constantly updating the files.

To connect the collision data to the base map, a map load function was used to link the id called collisions along with the data file url and the settings to display the collisions on the map as circles. Also the circle radius based on 0 to 5 was linked with their own selected colours and circle-opacity to 0.8 so depending on how many casualties occur they will have their own colour and partially transparent so they will not bock each other.

With the data now linked to the base map, a legend was created in the code by making a div section inside of the console.  Additionally, to this some CSS was added to style the colour gradient so it matches the colours of the circles.

This is what the map will look like with the data and legend.

Adding Time Slider and Interactivity

To add a time slider the slide bar function was added as a div to the body of the html document.  This will pull information of the time of accidents and display them on the map. To add the interactive a filter was added to obtain the time of collisions from the database.  The coding will be shown below along with a screen shot of the functional map.

Final Touches

The map is almost complete, the last function that was added to it was a filter that looks at the automobile collisions that occurred during the week compared to during the weekend.  To create this an if function was added to the text editor so that if a collision occurred on a Saturday it would be false, true.  This allows the data to show for week days compared to weekends. This is seen in the coding below. To add the function that allows you to decide on what part of the data to look at another div class session was added to filter the days.

The below script shows the div class session that created the slider bar and button selection for the final map legend.

Final Map

Below is screen shots different settings selected for the interactive map.