Visualizing Spatial Data

Statistics 4868/6610 Data Visualization

Prof. Eric A. Suess

03/07/2015

Introduction

Today Chapter 8.

What to look for in data presented on maps.

“When you look at specific lcoations on a map, you still look for clustering in specific regions.”

Latitude and Longitude replace x- and y-coordinates.

“With maps, the data can become instantly personal.”

Some online maps you have most likely interacted with

Some mapping software

Software to make maps

ArcGIS Open Data

ArcGIS online

Next, online software for making maps on the web.

Google Maps API

See google developers website.

Check out the google maps API

Watch the video about bread crumbs.

There are many many things you can do with google maps API.

Microsoft Maps API

See Microsoft developers website.

Check out bing maps

bing Maps Dev Center note the use of javascript.

Yahoo! Maps

Open Steet Maps

geocoding

Services that take addresses and zip code and turn them into latitude and longitude.

tableau does this automatically and give you the ability to change or fix what it finds.

The author of the book suggests using Geocoder.us (which does not seem to be available anymore) This website seems to work well for single addresses.

The author also suggests Pierre Gorissen's Google Maps Popup

How to work with lots of address

When working with a large number of address that need to be geocoded, it is easier to work with software.

In tableau geocoding is done automatically.

See the dataset in the Libraries > Documents > My Tableau Repository > Datasourses > Archive

  • Sample - Coffee Chain (Access).tds
  • Sample - Coffee Chain.mdb

Video Tableau Mapping - Create a Filled Map with Filters

An aside, two database software programs

Microsoft Access

firebird

A Graph Database

Neo4js

Another aside

Very interesting blog to read about Spatial Data and R.

spatial.ly

Working with python geopy

There is a new version of geopy and a new google API process (best I can tell).

geopy is now on github.

geopy documentation

See my github for an updated program.

geocode-locations3.py

Working with python smopy

There is also smopy which can be used with Open Street Maps.

smopy

maps in R

library(maps)

map(database="state")

plot of chunk unnamed-chunk-1

maps in R

library(maps)

map(database="world")

plot of chunk unnamed-chunk-2

maps in R

library(maps)

map(database="state", region=c("California", 
     "Nevada", "Oregon","Washington"))

plot of chunk unnamed-chunk-3

maps in R

When working with maps, there is a first layer with the outline of the map, then there is a second layer with the points or cirles plotted on top.

Regions

“Counties, states, countries, and continents are entire regions with boundaries, and grographic data is usually aggregated in this way.”

“It is much easier to find health data for a states or a country than it is for individual patients or hospitals.”

Choropleth maps

Regions

Try the BLS dataset in tableau.

While you can use python and the SVG files, you can make a similar plot using tableau.

I have updated the python program solorize_svg1.py

python graphs

To install python libraries in linux

sudo pip install numpy

for example.

python graphs

python graphs

Over Space and Time

Small Multiples - a sequence of maps in time.

In this section, all of this uses python and other software.

Try the BLS dataset in tableau.

To make similar plots you can use pages.

Excellent books for Spatial Data in R

Big Data

If you are interested in Big Data. Check out this video.

Microsoft HDInsight From Zero to Data Insights Using HDInsight on Microsoft Azure