Coder Social home page Coder Social logo

streetscore's Introduction

What makes a beautiful street, or a pleasant neighborhood? Maybe that's hard to define, but can you tell a beautiful place from somewhere that’s not so hot?

Beautiful Streets is a project from OpenPlans. It’s an experiment: we’re trying out a different way to evaluate places, called pairwise surveys, as popularized by the fantastic All Our Ideas. We’re also testing out some neat interface ideas, and learning about the use of Street View in evaluating places for urban planning projects.

With your help, we’ll compare 200 randomly-selected streets in Philly and ask which one in each pair is more beautiful. We expect this experiment will produce some neat data, which you’ll be able to download here soon.

Try it out, and let us know what you think via @OpenPlans or here.

Installation

Development

For local development, from the command line, install the requirements:

$ pip install -r requirements.txt

Fill in the settings:

$ # From street_score/project/settings/ ...
$ cp local.py.template local.py
$ <editor> local.py

Initialize the database:

$ # From street_score/ ...
$ python manage.py syncdb --all  # Create a superuser too

Start the server:

$ python manage.py runserver

Deployment

Deployment to DotCloud and Heroku are straightforward. First, follow the respective platform's instructions for setting up the project (all of the required) files should already be available in the repository).

Add the following environment variables to the system:

STREETSCORE_DB_NAME
STREETSCORE_DB_USER
STREETSCORE_DB_PASS
STREETSCORE_DB_HOST
STREETSCORE_DB_PORT

On Heroku you would use heroku config:add STREETSCORE_DB_...=..., and on DotCloud, dotcloud var set <application> STREETSCORE_DB_...=.... For other services, refer to the documentation.

Initializing Data

Before you can run surveys, you need points and a question in the database. You can add places one at a time or in bulk. In your browser, go to the admin page for Places (e.g.: http://localhost:8000/admin/project/place/ ). In the top right of the page there are buttons for adding data.

The application currently has support for one question at a time. To set the question, browse to the admin for Criteria (e.g.: http://localhost:8000/admin/project/criterion/ ). By default the model will expect something to finish the statement "Which street is more _____?". To change the format of the prompt, you will have to edit the index.html template.

Now you should be able to start submitting surveys!

Site Settings

Through the admin interface, you can set the title of the site, the Google analytics key, and the AddThis credentials so that visitors can easily share the site.

streetscore's People

Contributors

atogle avatar fkh avatar mjumbewu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streetscore's Issues

http://www.beautiful.st/ example website is not working.

Seeing the following error when trying to view the example website.

DatabaseError at /
permission denied for relation django_session
Request Method: GET
Request URL:    http://www.beautiful.st/
Django Version: 1.4
Exception Type: DatabaseError
Exception Value:    
permission denied for relation django_session
Exception Location: /app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py in execute, line 52
Python Executable:  /app/.heroku/python/bin/python
Python Version: 2.7.3
Python Path:    
['/app/street_score',
 '/app/.heroku/python/lib/python2.7/site-packages/distribute-0.6.34-py2.7.egg',
 '/app/.heroku/python/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
 '/app',
 '/app/.heroku/python/lib/python27.zip',
 '/app/.heroku/python/lib/python2.7',
 '/app/.heroku/python/lib/python2.7/plat-linux2',
 '/app/.heroku/python/lib/python2.7/lib-tk',
 '/app/.heroku/python/lib/python2.7/lib-old',
 '/app/.heroku/python/lib/python2.7/lib-dynload',
 '/app/.heroku/python/lib/python2.7/site-packages',
 '/app/.heroku/python/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
Server time:    Wed, 4 Dec 2013 09:44:17 -0600

Add description of the format of the data dump

Can you explain the data output? I see two sets of coordinates and a score per row. Guessing the coords are each map in a match-up, but what is the score? Not sure how to interpret -1 vs 1.

Normalize data export format

It would be nice if you we could (optionally) normalize the data export format to have a single location per row - would make it much easier to map.

For example, instead of

lat1,lon1,lat2,lon2,score
39.654479,-104.89376,39.730754,-104.940689,1

we could have

lat,lon,score,user_lat,user_lon
39.654479,-104.89376,-1
39.730754,-104.940689,1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.