21
Django in the CityOS Platform Lessons learned, «Do»s and «Don’t»s Marco Montanari – CTO CityOpenSource

Lessons Learned from CityOpenSource

Embed Size (px)

Citation preview

Django in the CityOS Platform

Lessons learned, «Do»s and «Don’t»s

Marco Montanari – CTO CityOpenSource

Hey who’s that guy??

• Marco Montanari

• Django developer, GIS developer

• Open Data «Evangelist»

What is CityOpenSource?

• A platform to create platforms

• Enable crowd mapping of transitory information

• Enable the creation of practice communities

Such meta!

It starts from Mappi-Na (http://mappi-na.it/)

• Project born in 2012 in Naples

• Aims to collect data on the street art in cities.

• Was a heavily tweaked «off the shelf» Wordpress Theme...

It starts from Mappi-Na (http://mappi-na.it/)

• Project born in 2013 in Naples during the Open Data Day

• Aims to collect data on the street art in cities.

• Was a heavily tweaked «off the shelf» Wordpress Theme...

• ... that was hacked last summer and we decided to keep the remaining files (around 75% was safe) and restart with a new platform

• Using django, AWS, «modern tech»

• Looking for a meta-level approach => CityOpenSource

Django... why Django?

• Django.contrib.gis

• Python

• Fast development needed

• Reliable infrastructures

• Easy social integration

• Pip install whatever < AMAZING

• Yet...

Caching, optimizing, stuff

Everything can be accomplished with a given amount of code => time

BUT

Accomplishing it means more points of failure.

Users expect real time updates!

• Cool, but it breaks caching archives

• Cool, but it breaks the single page with the «nearby» feature

• Enter vector-ish «tiles»• And/Or very soon GeoREDIS

What’s in a marker?

• Custom markers?

• Generic markers?

• MAKI markers? BTW: thanks Mapbox for adding forcefully the mapbox id to the request breaking ALL apps that used the markers... I still love you anyway :P

Where are we displaying the markers!?

• OpenStreetMap

• OpenStreetMap France

• OpenStreetMap Germany

• Stamen Toner

• OpenCycleMap

• OpenTransportMap

• Stamen Watercolor

• Stamen Toner

• Stamen Toner Lite

• Mapquest

• Mapquest Aerial

• Esri Aerial Open

• Mapbox... Oh, Mapbox... :D

Bing, Google, Here... But we don’t really <3 them...

Where on earth is that piece of street art?

• Non-standard APIs• Interesting wrapper for python

• Different data quality• Google, nice but tricky

• Bing, nice but limited

• Nominatim (OSM), nice API but VERY limited

Via Mascarella 34, Bologna, Italy

Hear that with the tune «Where on earth is Carmen Sandiego»

Wrapping things up...

Lesson 0Rushing Geographic Information Systems is

BAD

Lesson 1The problem is never in the Geographic data

Lesson 2The problem is almost always in the

Geographic data

Lesson 1.5There’s Geodata and Geodata

Lesson 3It’s difficult to KISS GIS

THANKS! @ingmmo

[email protected]

http://ingmmo.com