Coder Social home page Coder Social logo

map-tools's Introduction

#map-tools

mapper

A GeoDjango app for creating maps.

Development

Prerequisites

  • Python: The buzzfeed dev setup kickstart script should take care of your python setup. If you're having trouble setting up a virtualenv make sure the following is in ~/.bash_profile, then run ``source ~/.bash_profile`.

     export WORKON_HOME=$HOME/.virtualenvs
     export PROJECT_HOME=$HOME/Devel
     source /usr/local/bin/virtualenvwrapper.sh
  • Postgres: The django app uses a PostgreSQL database with GIS functionality. To install postgres installed and get it running(source):

     $ brew install postgresql
     $ brew install postgis
     $ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
     $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  • GeoDjango also requries GDAL and libgeoip.

     $ brew install gdal
     $ brew install libgeoip
  • Sass:

     $ sudo gem install sass

Setup

  1. Create virtualenv and install requirements.

    $ mkvirtualenv mapper
    $ pip install -U -r requirements.txt
  2. Setup PostGIS database and enable spatial functionality.

    $ createuser --superuser geo
    $ createdb geodjango --owner=geo
    $ psql geodjango
    > CREATE EXTENSION postgis;
  3. Create a secret settings file and get contents from someone working on project.

    $ cd mapper
    $ touch settings/secret.py
  4. Run initial django migrations.

    $ cd mapper
    $ python manage.py migrate
  5. Start server.

    $ cd mapper
    $ python manage.py runserver

Reference

Importing sample data

You can use the import_points management command to import map points from a csv into the database.

$ cd mapper
$ python manage.py import_points --map=bikes --file=../data/citibike-demo.csv

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.