Explore your Foursquare checkins on a map with SimpleGeo
If you are a Foursquare user, have you ever wanted to visualize all of your checkins on a map? Using your Foursquare RSS feed and a simple Python script, you can import all of your checkins to SimpleGeo’s API and do spatial queries on them.
Step 1: Login to your Foursquare account and visit the Feeds page.
Take note of your RSS feed. In my case, it was http://feeds.foursquare.com/history/026d45564de36937b02de38a01095620.rss. You can add a count parameter to the end of that URL to get more items. I used count=2000 to get all of my checkins.
Step 2: Install the Python feedparser module. If you have setuptools installed, simply type sudo easy_install feedparser in your terminal.
Step 3: Create a new layer, and name it com.foursquare.[your_foursquare_username].checkins.
Step 4: Download this Python script and update your SimpleGeo OAuth token and secret, the name of the layer you want to store your checkins, and your Foursquare RSS feed. Make sure you have the SimpleGeo Python client installed.
Step 5: Once you’ve updated those custom fields in Step 3, open the Python interactive shell and type the following: import parse and then parse.main()
The script adds records to the SimpleGeo API 90 at a time, to avoid being rate-limited. If you login to our Dashboard and click on the layer you just created, you can then see all of your checkins through the data explorer.

If you have any questions about how to use this script, feel free to send me an email at andrew [at] simplegeo.com.
Update: Bill Shupp has written an excellent version of this script in PHP.
-
mixscrapbook liked this
-
blech liked this
-
bencochran liked this
-
kennethlove liked this
-
danielbru liked this
-
arkanciscan liked this
-
superfeedr liked this
-
parislemon liked this
-
simplegeo posted this



















