Difference between revisions of "Visualizing Multi-Temporal Data with Time Manager"
Line 24: | Line 24: | ||
*[http://qgis.org/downloads/QGIS-OSGeo4W-1.8.0-1-Setup.exe QGIS 1.8] |
*[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 |
*[http://plugins.qgis.org/plugins/timemanager/ Time Manager] plugin for QGIS |
||
− | *[https://evernote.com/skitch/ Skitch] or [http://gyazo.com/en Gyazo] to capture screenshots of your maps for editing |
+ | *[https://evernote.com/skitch/ Skitch] or [http://gyazo.com/en Gyazo] to capture screenshots of your maps for editing in Libre Presentation. |
==Installing Time Manager== |
==Installing Time Manager== |
Revision as of 22:15, 19 December 2012
Contents
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 the month of October and November of the year 2012. You will learn to use Time Manager, a plugin for QGIS 1.8; so you may conduct spatial analysis at any point in time. Your analysis will be of: bi-weekly; and monthly emergency occurrences. The analysis you will conduct is
- 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. "basics statistics" such as the mean, median, min, max and the range of incidents in a given time.
Last but not least you will learn to visualize and animate temporal data.
Introduction to Time Manager
Time Manager is a plugin of QGIS 1.8 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 title, the data you will be using is close to real time, as it updates every 10 minutes; comprising of all the emergency calls made to the city's various emergency departments.
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
- A Screenr account to make a video of your animation.
- Libreoffice 3.6.4 or Openoffice 3.4.1
- QGIS 1.8
- Time Manager plugin for QGIS
- Skitch or Gyazo to capture screenshots of your maps for editing in Libre Presentation.
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
- Click "Plugins"
- Search "Time Manager"
- 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 Plugins"
- Search "Time Manager"
- Enable "Time Manager"
- 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
Video Tutorial of this Section
Getting CSV data
- Proceed to data.seattle.gov
- Search & open 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 XLSX format
Getting Vector data
- Proceed to data.seattle.gov
- Search & open Street Network Database
- Download a copy of this polyline shapefile in ZIP format
- Search & open Neighbourhoods
- Download a copy of this polygon shapefile in ZIP format
Preparation of Data
Spreadsheet
- Import to Libreoffice or Openoffice
LibreOffice Calc/OpenOffice Calc
- Right click on "datetime" column and choose to "Format Cells".
- Find and click "Time" under the "Numbers" tab.
- Change format code to the following: YYYY-MM-DD HH:MM:SS (you have to click on the examples in the format box to see which code they each are)
- Save file in CSV format.
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
- Start QGIS and click "Layer" on the toolbar. A dropdown menu will appear.
- Click "Add Vector Layer".
- Browse to location of your "Seattle.shp" file.
- Click on the "Open" button to import.
Importing a Single Dataset to Time Manager
- Click on the "Settings" button.
- Click "Add Layer".
- Choose "Seattle.shp" as the Layer.
- Choose "Datetime" column as the Start Time.
- Click "OK" to confirm and exit.
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
Results:Monthly
Animation with Time Manager
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.
- Repeat process with "Seattle_End.shp" as the Layer.
- Change the offset to -20
- Click "OK"
Result: Visualization
- Screencast of Visualization
- Screenr was used to make a video of the animation.
Conclusion
- Mission Accomplished! (All maps were post-edited in Libre Presentation with Skitch to take screenshots of maps.)
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.