Giter Site home page Giter Site logo

topo's Introduction

Topo

Installation and Running:

N.B. This installation guide assumes you have Angular CLI, Node and MySQL already installed on your machine. If not, please follow the following guides respectively:

Note these installation and setup instructions are based on Linux experience only.

Environment Setup:

(1) Run the following commands on Terminal:

git clone https://github.com/mk4111/topo.git` on command line.
cd topo
npm install

(2) Check that a MySQL database instance is running with:

sudo service mysql status

If 'off', run:

sudo service mysql start

(3) Log into your mysql instance wit the following command:

mysql --user=root --password

This will prompt you for your password to in as 'root' user. If it doesn't exist already (check with the command show databases), create a database called 'topo' with the following command:

create database topo

If a database with that name already exists, 'drop' the database with the command: drop database topo. Once the database has been created, you now must 'choose' to use it with the following command: use topo; Create a new file and name it .env. Save this file to the root of this application. Set 'SQL_PASSWORD=' to the password you just entered.

(4) Import Data. The contents of the CSV files which have been generated into .sql commands using http://www.convertcsv.com/csv-to-sql.htm).

  • Open server/db/lib/init.sql; copy and paste the text into your mysql command line to create an instance of a table called 'road'. If run correctly, you should get a response that says:
Query OK, 0 rows affected (0.04 sec)

(5) Now open another terminal, and run npm run start to get the app running. Once you see server running on localhost:3000, open a browser and go to localhost:3000. The app is now ready.

Task Objectives:

(1) Graph each ROAD. (2 roads)

  • Setup graphing library
  • For each road, extract segment length and elevation data from .CSV into arrays.
  • Display graph where x=road length (incorporates segment data), y=elevation at beginning and end of each segment.
  • Once graph for one road displays, move data into mySQL database.
    • Setup Express and mySQL --> how to architect data?
    • Make simple HTTP requests.
    • Create methods library for each SQL command to withdraw required data.

(2) Display the gradients for each of the SEGMENTS over the length of each ROAD.

  • Current idea: onhover over a segment, display gradient for that segment.

(3) Display the average elevation for each segment.

Extra:

(4) Graph the delta of the two road gradients.

(5) Graph additional, interesting comparative info between the two roads.

(6) Plot a polyline of the two Roads on a Google Map via Google Maps API.

Stack Choice:


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.