Open Data + Open Source: Mapping electoral districts &MP voting records – Mapping electoral districts &MP voting records – Putting it together



Open Data + Open Source: Mapping electoral districts &MP voting records – Mapping electoral districts &MP voting records – Putting it together

0 0


open-access-week-2015

Presentation for Open Access Week 2015. Uses reveal.js.

On Github cu-library / open-access-week-2015

Open Data + Open Source:

Mapping electoral districts &MP voting records

Open Access Week 2015, Carleton University Library

Rebecca Bartlett

GIS & Digital Resources Librarian / @bec_bart

Jen Whitney

Systems Librarian, Integration & Emerging Technologies / @toastncheez

Open Data Book Club

Monthly meetup hosted by Open Data Ottawa / @OpenDataOttawa

Open data enthusiasts get together to explore datasets and tools for mining, analyzing, visualizing data

Our goals? Learn about open data, explore Leaflet, provide technical support

Parliamentary Data

OpenParliament.ca

Not an official government site ("not even sort of")

Aggregates data from Parliament of Canada pages

PARLINFO, Hansard, LegisINFO

For developers: a JSON API, bulk data download

GIS Data

GeoGratis.ca

"Find free maps, data, and publications to use without restriction" from Natural Resources Canada

Dataset used: Federal Electoral Districts 2011

Electoral district shapefile also available from Statistics Canada but GeoGratis specifically cites Open Government License - Canada

Putting it together

PostgreSQL

Load bulk data download into Postgres.app

Query MP details (name, photo, riding, party) & associate with federal electoral district identifier

Aggregate vote activity in second session of 41st Parliament

QGIS

Simplified geometry of electoral district shapefile to speed up data loading in final map

Joined queried MP data to shapefile using electoral district identifier

Exported as GeoJSON file for mapping with Leaflet

Leaflet

Leaflet is an open-source JavaScript libraryfor mobile-friendly interactive maps

Initialized with CartoDB basemap

Loaded GeoJSON data file

Electoral districts styled according to party, with pop-ups showing MP details

Slider control filters MPs by vote participation

Mapping MP Vote Activity

http://cu-library.github.io/mp-activity

The big picture

It's fun to work with new technologies in a collaborative environment

Outreach & collaboration across disciplines

Technical skills development

Software, etc.

Postgres.app, a Mac app for PostgreSQL databases

QGIS geographic information system

Leaflet JavaScript library for online mapmaking

Atom source code editor

git version control system

Github, a platform for code sharing & and collaboratve development

Open Data Websites

Municipal, regional, provincial, and territorial open data websites in Canada

http://bartlettr.github.io/opendatawebsites/

Thanks!

rebecca.bartlett@carleton.ca / jennifer.whitney@carleton.ca

Open Data + Open Source: Mapping electoral districts &MP voting records Open Access Week 2015, Carleton University Library