Development of the project is moving along on occupyPOPS. In this post I will note some of the critical transformations that have been made, note resources that I’m drawing upon, and identify some of the challenges that is still ahead.
Process + Critical Transformations
The City’s dataset on privately-owned public spaces (POPS) were transformed from a MS Access database. I added geographic coordinates for the locations using a Google Docs Spreadsheet “lookup” script. And then uploaded the dataset into a table on a web accessible MYSQL database. The structure for the table is as follows:
Each POPS is assigned an entry in this table. All the fields retain the same name as they did on the City’s dataset with the exception of “id”, “Lat”, and “Lng”. “Lat” and “Lng” are the geographic coordinates I added to make the entries faster to map. The unique identifier – “id” – was added to the structure to allow for relational construction in the database. This way I can link to each POPS additional details stored in a separate table. This is to help maintain integrity of the City provided data, so that if the size of the public space or the building address is updated by the City or corrected by a participant, we can keep track of where and when the updates occurred.
As I’m working on linking foursquare reported usage for each POPS, I’ve added a table titled “nyc_partipops”.
So far, this table only maintains the unique identifier that foursquare assigns each “venue” in its database. At this point I have gone through half of the dataset of POPS adding their corresponding venue ID. These IDs I get by doing a search on foursquare.com and copying the portion of the URL that contains the ID. This is a rather cumbersome way of going about it, but many POPS locations either are missing from foursquare’s database, may be identified as a venue unique from the building that it is located at, or the street names aren’t suited to fuzzy searches (6th Ave versus Avenue of the Americas).
For the interace, I’ve linked up the dataset with API requests from Foursquare for current list of users at the site of POPS nearby. There’s always someone checked-in at Zuccotti, so the api calls it in addition to 4 or 5 of the closest POPS to the user.
Although the interface is mainly to help me now complete the link between foursquare and twitter, the interface will be deployed as a web app that shows users the closest privately-owned public space to them – something that is not usually readily identified on Google Maps as a public space. In addition to identifying nearby, often-hidden public spaces, the web app can facilitate field work. Further developed, the interface can be used to input missing details or correct mistakes on the City’s dataset.
apigee.com for development of JSON scripts to access Foursquare API
Foursquare API for reference
Foursquare-async library for php
Still choosing a Twitter library for php from here.
jQuery Mobile for interface design
Greatest challenges right now is adding Foursquare venue data, but of course I don’t need to be complete on that. Then it will be to develop a rudimentary interface for inputting data on the web app. After that, writing a script to send a tweet to users that are checked-in at a POPS and following the account @occupyPOPS on twitter (once a day at this point).
And what exactly will the twitter bot tweet? The object of the bot is to invite twitter users to answer questions about the space they’re are in or near, but also to promote the use of POPS. Any ideas for a 140 character tweet?