13
EAlGIS Grahame Bowland @angrygoat http://ealgis.org/ Can anyone guess what this map shows?

EAlGIS - Interactive Geospatial Data Analysis

Embed Size (px)

DESCRIPTION

Presentation given to GeoRabble Perth on Tuesday 11 March 2014.

Citation preview

Page 1: EAlGIS - Interactive Geospatial Data Analysis

EAlGIS Grahame Bowland

@angrygoathttp://ealgis.org/

Can anyone guess!what this map shows?

Page 2: EAlGIS - Interactive Geospatial Data Analysis

Public Transport Use! !

(did you spot the train lines?)

Page 3: EAlGIS - Interactive Geospatial Data Analysis

EAlGIS

• Build a reproducible database of geospatial information

• Interactive visualisation and analysis through a web interface

• Infrastructure for offline analysis, data-mashups…

Page 4: EAlGIS - Interactive Geospatial Data Analysis

Developed for…

Page 5: EAlGIS - Interactive Geospatial Data Analysis

Buzzwords!• Backend: Python / Flask / SQLAlchemy /

MapServer

• Database: PostGIS

• Frontend: jQuery, OpenLayers, Bootstrap

• Mozilla Personas for user authentication

• development: ‘vagrant up’

Page 6: EAlGIS - Interactive Geospatial Data Analysis

Reproducibility• Database built up by running ‘recipes’

• Built in loaders for Shapefile, KML, CSV attribute data

• Metadata! Database introspection & stored relationship data - attributes to geometries.

• Automatically reproject spatial data to map projection (eg. Google Mercator)

Page 7: EAlGIS - Interactive Geospatial Data Analysis

Attribute Calculations

Simple expression language, attributes looked up against current

geometry.

100 * (b7837 + b7840 + b7843 + b7846 + b7864 + b7894 + b7912 +

b7921 + b7924) / b7942

Page 8: EAlGIS - Interactive Geospatial Data Analysis

Generating this SQL!

SELECT sa1_2011_aust.geom_3857, sa1_2011_aust.gid, (100 * (b46_aust_sa1.b7837 + b46_aust_sa1.b7840 +

b46_aust_sa1.b7843 + b46_aust_sa1.b7846 + b46_aust_sa1.b7864 + b46_aust_sa1.b7894 + b46_aust_sa1.b7912 + b46_aust_sa1.b7921 +

b46_aust_sa1.b7924)) / CAST(b46_aust_sa1.b7942 AS FLOAT) + 0 AS q FROM sa1_2011_aust JOIN b46_aust_sa1

ON b46_aust_sa1.gid = sa1_2011_aust.gid JOIN b01_aust_sa1 ON b01_aust_sa1.gid = sa1_2011_aust.gid

WHERE b01_aust_sa1.b3 > 100 AND b46_aust_sa1.b7942 != 0) as subquery using unique gid using srid=3857

Page 9: EAlGIS - Interactive Geospatial Data Analysis

How that works

• Simple expression language parsed with “pyparsing”

• At parse time, look up attributes by name and resolve to SQLAlchemy column objects

• Emit into the parse tree

• Step back… and it works!

Page 10: EAlGIS - Interactive Geospatial Data Analysis

Mash All The Things!

• Electoral Analysis

• Power Grid utilisation

• Mash up data on different geometries

Page 11: EAlGIS - Interactive Geospatial Data Analysis

Demo!

Page 12: EAlGIS - Interactive Geospatial Data Analysis

Open Source

• Licensed under the GPL 3

• github.com/grahame/ealgis/

• github.com/grahame/ealgis-aus-census-2011/

Page 13: EAlGIS - Interactive Geospatial Data Analysis

Demo site

• http://census.ealgis.org/

• email [email protected] for access (public access coming soon!)

• help wanted :-)