Git Product home page Git Product logo

mex_maps's Introduction

mex_maps

Let's map México and see what happens

Quickstart

$ export DATABASE_NAME='your_geographic_db'
$ export DATABASE_USER='your_db_user'
$ export DATABASE_PASSWORD='your_db_password'
$ export SECRET_KEY='$ecret!'
$ ./manage.py makemigrations
$ ./manage.py migrate
$ unzip world/data/TM_WORLD_BORDERS-0.3.zip
$ ./manage.py shell
>>> from world import load
>>> load.run()
$ ./manage.py createsuperuser
$ ./manage.py runserver

Intro

mex_maps is a django-based API which allows users to perform GeoSpatial analysis, and retrieve geographic data.

This is project is going to be a set of geographic APIs for general purpose, it's inspired by the beautiful maps and APIs from diegovalle, particulary from this repo

Installation

You need some tools installed in your system in order to run this application:

There's also a tutorial on installing and running GeoDjango, which is actually the base of this development.

Setting up environment

After you install everything, you need to create a virtualenv and install requirements via pip:

$ virtualenv -p python3.5 env
$ source env/bin/activate
$ pip install -r requirements.txt

Then you can edit the environ.rc file with your data and then load variables:

$ source environ.rc
Setting up database

You need to create a database with postgis support:

$ createdb mex_maps -E UTF-8
$ psql -d mex_maps
# create extension postgis

Create the database

$ cd world
$ ./manage.py makemigrations
$ ./manage.py migrate

And now you can load the example data ziped in the world/data directory:

$ ./manage.py shell
>>> from world.load import run
>>> run()

You'll see a list of the countries created in your database

And you can now browse the API at http://localhost:8000

Testing
$ ./manage.py test

mex_maps's People

Watchers

James Cloos avatar

mex_maps's Issues

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.