Albuquerque Public Art

10 Dec

Albuquerque has released a bunch of data as part of their transparency initiative. The best of the data is in KML, which I am not thrilled about. Wish that open initiatives would use formats like CSV or JSON instead of SHP and KML.

Oh well, I have moved on. Their public art file is cool. It is a KML of points where you can find art in ABQ with a table of information and an image. I scrubbed the KML through some python scripts I wrote and got the Long, Lat, and a URL to an image. Let me add, they have a website with this map already, but it is an embedded ArcGIS Online map.   I am giving away the data in a python script that creates a MongoDB with geospatial indexing enabled(GEO2D).

The code is a lot of insert statements:

from pymongo import Connection
from pymongo import GEO2D

db=Connection().albuquerque
#db.drop_collection(“publicart”) you shouldn’t need this.
db.publicart.create_index([(“loc”,GEO2D)])

db.publicart.insert({“loc”:[35.1555,-106.591838],”name”:”Almond Blossom/Astronomy”,”popup”:”http://farm8.staticflickr.com/7153/6831137393_fa38634fd7_m.jpg”})
db.publicart.insert({“loc”:[35.0931,-106.664177],”name”:”Formas Esperando Palabra de Otros Mundos”,”popup”:”http://farm3.staticflickr.com/2167/2479129916_0d861b2600.jpg”})
db.publicart.insert({“loc”:[35.1143,-106.577991],”name”:”Sumer #24″,”popup”:”http://farm2.staticflickr.com/1416/908720823_e390a242f4.jpg”})
db.publicart.insert({“loc”:[35.0682,-106.570886],”name”:”Images”,”popup”:”http://farm8.staticflickr.com/7012/6831253349_52c0a680ba.jpg”})
……….

The full python file is on my website.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: