Skip to content

schuyler/django-simplegeo-context

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a simple Django application that will load up a number of geo-tagged Flickr photos from the Wang Wang Panda API. It then runs all of those photos through the SimpleGeo Context API, which allows us to further tag the data with relevant geographic information. The photos are then presented in a simple, searchable interface.

Setup

  1. Change into the context directory.

  2. Create overrides.m4 in the context directory and add the following variables to it:

     define(`__FLICKR_API_KEY__', `YOUR_FLICKR_API_KEY_HERE')
     define(`__SIMPLEGEO_TOKEN__', `YOUR_SIMPLEGEO_OAUTH_TOKEN_HERE')
     define(`__SIMPLEGEO_SECRET__', `YOUR_SIMPLEGEO_OAUTH_SECRET_HERE')
    
  3. Run make.

  4. Run ./manage.py syncdb and follow the instructions.

  5. Load some photos.

  6. Run ./manage.py runserver 127.0.0.1:8888.

  7. Point your browser to http://127.0.0.1:8888/photos/categories.html (See Browsing).

Loading Photos

From the context directory run the following Django command:

./manage.py loadphotos --limit 500

Browsing

  • Go to /photos/types.html to view features by type.
  • Go to /photos/categories.html to view features by category.
  • Go to /photos/metro_score/[0-10].html to view photos by population density scores (0 = no data, 10 = heavily populated).

Once you drill down to a specific feature you'll se a list of photos. Click on a photo and it will show all of the geographic features that the photo was taken within.

About

A demo Django application showing how to use SimpleGeo Context with Flickr's Panda API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%