Giter VIP home page Giter VIP logo

cnx-eats's Introduction

Chiang Mai Restaurants for Students Analysis

GIS Analyse Steps

  1. Buffer universities to create students distribution model.
  • Make 3 buffer to simulate bell-curve at sd=[1,2,3].
  • Each buffer distance is increased by 0.0085 (~1km), set seg-approx=9.
  1. Each universities buffer do minus to obstacles polygon.
  2. Also each universities buffer do minus its campus area.
  3. Fill points into each buffer by rates of distributed students.
  • Set CRS of their layers to 4326 to view them correctly.
  1. Merge points layer into one layer, a student-model-distribution layer.
  2. Buffer restaurants distance of 0.001, fill with check-ins, count in grid.
  3. Create polygon vector grid that cover student points, set width=0.005.
  • Also make attr weight of type decimal precision=5, will use later.
  1. Count student/restaurant points in grid, compute its weight.
  2. Compute student weight minus restaurant weight (database script).

Requirement

  • Apache 2.4
  • PHP 5.4
  • PostgreSQL 9.3 with contrib package
  • PostGIS 2.1

Setup Steps

  1. Prepare PostgreSQL Database
  2. Create Empty PostGIS Database
  3. Populate Database with Provided Data

Prepare PostgreSQL Database

Create new database and user in psql by this spec:

CREATE DATABASE gis;
CREATE USER gman PASSWORD 'whatawonderfulworld!?';
ALTER DATABASE gis OWNER TO gman;

Grant access to database with database's password (not by using linux user). Edit file /etc/postgresql/9.3/main/pg_hba.conf and add this spec:

local   all             gman                                    md5

Restart database server.

Create Empty PostGIS Database

Reconnect into postgresql w/ new db by command psql gis:

CREATE EXTENSION postgis;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION postgis_tiger_geocoder;

Populate Database with Provided Data

Load data tables from dump database:

psql -U gman gis -f gis-data-dump.sql

cnx-eats's People

Contributors

neizod avatar

Watchers

 avatar  avatar  avatar

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.