Difference between revisions of "Visualizing Multi-Temporal Data with Time Manager"

From CUOSGwiki
Jump to navigationJump to search
m (Page is out of date, linking up to date wiki page)
 
(103 intermediate revisions by 6 users not shown)
Line 1: Line 1:
  +
==Notice==
  +
This tool is now out of date refer to [[Visualizing Multi-Temporal Data with Temporal Controller]] for up to date Multi-Temporal Visualization tool
  +
  +
  +
==Introduction==
  +
  +
In a distant universe, 500 milliseconds ago, you embarked on a mission of temporal exploration and spatial pattern analysis. Your task is to map and visualize the occurrences of emergencies in the City of Seattle within your selected timeframe from the year 2020. You will learn to use Time Manager, a plugin for QGIS, so you may conduct spatial analysis at any point in time. Your analyses will be an option of the following: weekly, bi-weekly, or monthly emergency calls. The analyses you will conduct are:
  +
::1. "points in polygon" to probe the amount of incidents in a given neighbourhood
  +
::2. "near neighbourhood analysis" to gauge the average of the distance between incidents
  +
::3. "basic statistics" such as the mean, median, min, max and the range of incidents in a given time.
  +
  +
  +
===Introduction to Time Manager===
  +
  +
Time Manager is a plugin of QGIS that allows for surfing through temporal geospatial data. It allows for visualization and spatial analysis simultaneously.
  +
  +
===Introduction to City of Seattle Real-Time 911 Emergency Calls===
  +
As per the title, the data you will be using are close to real time, as they are updated every 10 minutes; they comprise all the emergency calls made to the city's various emergency departments and were taken from the 01-01-2020 to 06-10-2020.
  +
  +
===Estimated Time to Complete===
  +
20 minutes at minimum and 40 to 60 minutes at maximum (dependent on your hardware, software, internet connection/speed and distractions).
  +
 
==Requirements==
 
==Requirements==
 
Windows/Macintosh/Linux Compatible
 
Windows/Macintosh/Linux Compatible
 
<br/>
 
<br/>
  +
*[https://qgis.org/en/site/forusers/download.html QGIS (3.10 was the latest stable release when this document was last updated)]
*A [http://www.screenr.com/ Screenr] account.
 
*[http://download.documentfoundation.org/libreoffice/stable/3.6.4/win/x86/LibO_3.6.4_Win_x86_install_multi.msi Libreoffice 3.6.4] or [http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_en-US.exe/download Openoffice 3.4.1]
 
*[http://qgis.org/downloads/QGIS-OSGeo4W-1.8.0-1-Setup.exe QGIS 1.8]
 
*[http://plugins.qgis.org/plugins/timemanager/ Time Manager] plugin for QGIS
 
*[https://evernote.com/skitch/ Skitch] or [http://gyazo.com/en Gyazo]
 
   
 
==Installing Time Manager==
 
==Installing Time Manager==
===Setting Repository===
 
* Start QGIS
 
* Click "Plugins" on the toolbar. A drop down menu will appear.
 
* Click "Fetch Python Plugins"
 
* Click "Repositories"
 
* Click "Add"
 
* Name your plugin "Time Manager"
 
* Type in "https://github.com/anitagraser/TimeManager" in the URL field
 
* Click "OK" to exit.
 
 
===Installing Plugin===
 
===Installing Plugin===
* Click "Plugins"
+
* Click "Plugins" a drop down menu should show up
  +
* Click "Manage and Install Plugins..." a menu should pop up
* Search "Time Manager"
 
  +
* Click "Install from zip"
  +
* Download zip plugin from [https://plugins.qgis.org/plugins/timemanager/ here]
 
* Click "Install Plugin" and wait for confirmation of install.
 
* Click "Install Plugin" and wait for confirmation of install.
* Click "Close" to exit.
+
* Click "Close" to exit.
  +
 
===Enabling Plugin===
 
===Enabling Plugin===
 
* Click "Plugins" on the toolbar. A drop down menu will appear.
 
* Click "Plugins" on the toolbar. A drop down menu will appear.
* Click "Manage Plugins"
+
* Click "Manage and Install Plugins..."
* Search "Time Manager"
+
* Search "TimeManager"
* Enable "Time Manager"
+
* Enable "TimeManager"
* Click "OK" to exit.
+
* Click "OK" to exit.
=== Enabling User Interface===
 
* Time Manager should appear under "Plugins" drop down menu.
 
* If not, right click on the toolbar, drop down menu will appear; scroll down to Time Manager and check.
 
* Time Manger should now be at the bottom of your screen.
 
   
==Getting Data==
+
==Getting the data==
  +
===Getting emergency calls data===
  +
* Proceed to [https://github.com/YussufY/SeattleCalls/blob/main/2020%20Emergency%20Calls.zip this Github link] which includes a zip containing all 911 calls for the first 10 months of 2020 in Seattle
  +
* Press download and save the zip file in an appropriate location
   
===Getting CSV data===
+
===Getting Seattle neighbourhood data===
  +
* Proceed to [https://data-seattlecitygis.opendata.arcgis.com/datasets/city-clerk-neighborhoods?geometry=-122.588%2C47.477%2C-121.994%2C47.558 the Seattle geoData website] and download the City Clerk neighbourhood Shapefile
* Proceed to [https://data.seattle.gov/ data.seattle.gov]
 
  +
* Save the file in the same location as the emergency calls file
* Search & open [https://data.seattle.gov/Public-Safety/Seattle-Real-Time-Fire-911-Calls/kzjm-xkqj Seattle Real Time Fire 911 Calls]
 
* Click "Export", A drop down menu will appear.
 
* Scroll down to "Download As"
 
* Download a copy of this dataset in [https://data.seattle.gov/api/views/kzjm-xkqj/rows.xlsx?accessType=DOWNLOAD XLSX] format
 
 
===Getting Vector data===
 
* Proceed to [https://data.seattle.gov/ data.seattle.gov]
 
* Search & open [https://data.seattle.gov/download/afip-2mzr/application/zip Street Network Database]
 
* Download a copy of this polyline shapefile in [https://data.seattle.gov/download/afip-2mzr/application/zip ZIP] format
 
* Search & open [https://data.seattle.gov/dataset/Neighborhoods/2mbt-aqqx Neighbourhoods]
 
* Download a copy of this polygon shapefile in [https://data.seattle.gov/download/2mbt-aqqx/application/zip ZIP] format
 
 
==Preparation of Data==
 
 
===Spreadsheet===
 
* Import to Libreoffice or Openoffice or Microsoft Excel
 
 
====LibreOffice Calc/OpenOffice Calc====
 
* Right click on "datetime" column and proceed to "Format Cells".
 
* Find and click "User defined" in "Numbers" tab.
 
* Change format to the following: YYYY-MM-DD HH:MM:SS
 
* Save file in CSV format.
 
 
====Microsoft Excel====
 
* Right click on "datetime" column and proceed to "Format Cells".
 
* Find and click "Custom" in "Numbers" tab.
 
* Change format to the following: YYYY-MM-DD HH:MM:SS
 
* Save file in CSV format.
 
   
 
==Importing Data==
 
==Importing Data==
 
===Importing a Spreadsheet to QGIS===
 
* Start QGIS and click "Layer" on the toolbar. A drop down menu will appear.
 
* Click "Add Delimited Text Layer".
 
* Browse to location of Seattle_Real_Time_Fire_911_Calls.csv file.
 
* Click on the "OK" button.
 
 
* Right click on the imported spreadsheet on the Layers panel. A drop down menu will appear.
 
* Click "Save As"
 
* Format should be "ESRI shapefile"
 
* CRS should be "WGS84"
 
* Name of file is "Seattle.shp"
 
* "Add saved file to map" should be enabled.
 
* Save file to a desired location.
 
* Click on the "OK" button.
 
   
 
===Importing a Vector Polyline/Polygon to QGIS===
 
===Importing a Vector Polyline/Polygon to QGIS===
   
* Start QGIS and click "Layer" on the toolbar. A dropdown menu will appear.
+
* Start QGIS and click "Layer" on the toolbar A dropdown menu will appear.
 
* Click "Add Vector Layer".
 
* Click "Add Vector Layer".
* Browse to location of your "Seattle.shp" file.
+
* Browse to the location of the files that you downloaded and select the "2020 Emergency Calls Seattle.shp" and press add
  +
* Repeat the same step for the "City_Clerk_Neighborhoods.shp" to add it
* Click on the "Open" button to import.
 
  +
* Ensure that they are in your Layers subsection on the main page of QGIS
  +
  +
==Time Manager==
  +
=== Enabling User Interface===
  +
* Time Manager should appear under "Plugins" drop down menu.
  +
* If not, right click on the toolbar, drop down menu will appear; scroll down to Time Manager and check.
  +
* Time Manger should now be at the bottom of your screen.
   
 
===Importing a Single Dataset to Time Manager===
 
===Importing a Single Dataset to Time Manager===
   
  +
* Follow the following steps look at the image for reference
* Click on the "Settings" button.
 
  +
* 1: Press Plugin and ensure that visibility is enabled for the Time Manager plugin
* Click "Add Layer".
 
  +
* 2: The Manager should now be visible at the bottom of the page, press on the settings button
* Choose "Seattle.shp" as the Layer.
 
  +
* 3: Press on add layer on the popup menu
* Choose "Datetime" column as the Start Time.
 
  +
* 4: Make sure the layer is "2020 Emergency Calls Seattle" and the start time is set to "date_datet" and press "Ok" to finish
* Click "OK" to confirm and exit.
 
  +
*[[File:How to get time Manager.png]]
  +
::[[File:UX.png|center]]
  +
  +
::[[File:TM3.png|center]]
   
 
==Visualizing the Distribution of the Type of Emergency==
 
==Visualizing the Distribution of the Type of Emergency==
Line 107: Line 87:
 
* Click on the "Classify" button.
 
* Click on the "Classify" button.
   
===Result===
+
===Result: Categorized Symbology===
[[File:TXT.png]]
 
   
 
==Points in Polygon Spatial Analysis==
 
==Points in Polygon Spatial Analysis==
Line 121: Line 100:
 
* Click "Close" afterwards to exit.
 
* Click "Close" afterwards to exit.
   
===Result:Bi-Weekly===
+
===Results:Bi-Weekly===
 
*[[File:OCT1&22.PNG]]
 
*[[File:OCT1&22.PNG]]
 
*[[File:OCT3&445.PNG]]
 
*[[File:OCT3&445.PNG]]
Line 127: Line 106:
 
*[[File:NOV3&44.PNG]]
 
*[[File:NOV3&44.PNG]]
   
===Result:Monthly===
+
===Results:Monthly===
*[[File:OCT20122.PNG]]
+
:[[File:OCT20122.PNG]]
*[[File:NOV20122.PNG]]
+
:[[File:NOV20122.PNG]]
   
  +
==Visualization==
==Animation with Time Manager==
 
  +
* [https://gfycat.com/inexperienceduniformambushbug Here is an example of the location of day to day 911 Emergency Calls]
   
  +
==Conclusion==
===Importing multiple datasets===
 
* Click on the "Settings" button.
 
* Click "Add Layer".
 
* Choose "Seattle_Start.shp" as the Layer.
 
* Choose "Datetime" column as the Start Time.
 
* Click "OK" to confirm and exit.
 
   
  +
At this point in time, you have learned to utilize the following to conduct spatial pattern analysis:
* Repeat process with "Seattle_End.shp" as the Layer.
 
  +
* Time Manager plugin for QGIS
* Change the offset to -20
 
  +
* Visualize data with Time Manager
* Click "OK"
 
  +
* Animate/Simulate with Time Manager
  +
* Point in Polygon Analysis
  +
* Nearest Neighbour Analysis
  +
* Basic Statistics such as min, max, median and range.
  +
<br/>
  +
Feel free to share your results in this wiki and/or make this tutorial more effective.
   
===Result===
+
==User Guides==
  +
[http://manual.linfiniti.com/en/foreword/index.html QGIS]
[https://www.youtube.com/watch?v=9e48i5MworQ Screencast of Visualization]
 
   
==Conclusion==
+
==References==
  +
[http://planet.qgis.org/planet/user/4/tag/time%20manager/ Time Manager How-to]

Latest revision as of 09:55, 20 September 2023

Notice

This tool is now out of date refer to Visualizing Multi-Temporal Data with Temporal Controller for up to date Multi-Temporal Visualization tool


Introduction

In a distant universe, 500 milliseconds ago, you embarked on a mission of temporal exploration and spatial pattern analysis. Your task is to map and visualize the occurrences of emergencies in the City of Seattle within your selected timeframe from the year 2020. You will learn to use Time Manager, a plugin for QGIS, so you may conduct spatial analysis at any point in time. Your analyses will be an option of the following: weekly, bi-weekly, or monthly emergency calls. The analyses you will conduct are:

1. "points in polygon" to probe the amount of incidents in a given neighbourhood
2. "near neighbourhood analysis" to gauge the average of the distance between incidents
3. "basic statistics" such as the mean, median, min, max and the range of incidents in a given time.


Introduction to Time Manager

Time Manager is a plugin of QGIS that allows for surfing through temporal geospatial data. It allows for visualization and spatial analysis simultaneously.

Introduction to City of Seattle Real-Time 911 Emergency Calls

As per the title, the data you will be using are close to real time, as they are updated every 10 minutes; they comprise all the emergency calls made to the city's various emergency departments and were taken from the 01-01-2020 to 06-10-2020.

Estimated Time to Complete

20 minutes at minimum and 40 to 60 minutes at maximum (dependent on your hardware, software, internet connection/speed and distractions).

Requirements

Windows/Macintosh/Linux Compatible

Installing Time Manager

Installing Plugin

  • Click "Plugins" a drop down menu should show up
  • Click "Manage and Install Plugins..." a menu should pop up
  • Click "Install from zip"
  • Download zip plugin from here
  • Click "Install Plugin" and wait for confirmation of install.
  • Click "Close" to exit.

Enabling Plugin

  • Click "Plugins" on the toolbar. A drop down menu will appear.
  • Click "Manage and Install Plugins..."
  • Search "TimeManager"
  • Enable "TimeManager"
  • Click "OK" to exit.

Getting the data

Getting emergency calls data

  • Proceed to this Github link which includes a zip containing all 911 calls for the first 10 months of 2020 in Seattle
  • Press download and save the zip file in an appropriate location

Getting Seattle neighbourhood data

  • Proceed to the Seattle geoData website and download the City Clerk neighbourhood Shapefile
  • Save the file in the same location as the emergency calls file

Importing Data

Importing a Vector Polyline/Polygon to QGIS

  • Start QGIS and click "Layer" on the toolbar A dropdown menu will appear.
  • Click "Add Vector Layer".
  • Browse to the location of the files that you downloaded and select the "2020 Emergency Calls Seattle.shp" and press add
  • Repeat the same step for the "City_Clerk_Neighborhoods.shp" to add it
  • Ensure that they are in your Layers subsection on the main page of QGIS

Time Manager

Enabling User Interface

  • Time Manager should appear under "Plugins" drop down menu.
  • If not, right click on the toolbar, drop down menu will appear; scroll down to Time Manager and check.
  • Time Manger should now be at the bottom of your screen.

Importing a Single Dataset to Time Manager

  • Follow the following steps look at the image for reference
  • 1: Press Plugin and ensure that visibility is enabled for the Time Manager plugin
  • 2: The Manager should now be visible at the bottom of the page, press on the settings button
  • 3: Press on add layer on the popup menu
  • 4: Make sure the layer is "2020 Emergency Calls Seattle" and the start time is set to "date_datet" and press "Ok" to finish
  • How to get time Manager.png
UX.png
TM3.png

Visualizing the Distribution of the Type of Emergency

  • Right click on seattle.shp, click "properties" from the drop down menu.
  • Browse to the "Style" tab.
  • Change symbology from "Single Symbol" to "Categorized"
  • Choose "Type" as the column.
  • Pick a gradient color ramp.
  • Click on the "Classify" button.

Result: Categorized Symbology

Points in Polygon Spatial Analysis

  • Click "Vector" on the toolbar. A drop down menu will appear.
  • Click "Analysis" from the drop down menu. Another drop down menu will appear.
  • Click "Points in Polygon"
  • Choose "Neighbourhoods.shp" as the input polygon vector layer.
  • Choose "Seattle.shp" as the input point vector layer.
  • Choose a output shapefile name, for this tutorial I chose "area.shp".
  • Click "OK" to process.
  • Click "Close" afterwards to exit.

Results:Bi-Weekly

  • OCT1&22.PNG
  • OCT3&445.PNG
  • NOV1&22.PNG
  • NOV3&44.PNG

Results:Monthly

OCT20122.PNG
NOV20122.PNG

Visualization

Conclusion

At this point in time, you have learned to utilize the following to conduct spatial pattern analysis:

  • Time Manager plugin for QGIS
  • Visualize data with Time Manager
  • Animate/Simulate with Time Manager
  • Point in Polygon Analysis
  • Nearest Neighbour Analysis
  • Basic Statistics such as min, max, median and range.


Feel free to share your results in this wiki and/or make this tutorial more effective.

User Guides

QGIS

References

Time Manager How-to