Skip to content

RomaPatel7/Project-2-Interactive-Dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cost of American College Visualization Project

Description

The purpose of this project is to display working knowledge in the areas of data collection, database design, and data visualization

Tools used in this project:

  1. Python
    • Libraries:
      1. Pandas
      2. Numpy
      3. Requests
      4. SQLAlchemy
      5. Flask
      6. Flask_SQLAlchemy
      7. SQLAlchemy
      8. SQLAlchemy_utils
      9. OS
      10. Math
      11. Psycopg2
  2. PostgreSQL
  3. Javascript
    • Libraries:
      1. D3.js
      2. Plotly.js
      3. Google Charts
      4. Leaflet.js
      5. FusionCharts.js

Instructions

To run this code, ensure that all the above libraries are installed in your environment

Steps

    • Enter your Mapbox API in config.js located in the static folder.
const API_KEY = 'ENTER YOUR API';
    • Enter your data.gov API key AND PostgreSQL info in config.py
api_key = " ENTER YOUR API"
UserName = "YOUR POSTGRESQL USERNAME"
Password = "YOUR POSTGRESQL PASSWORD"
    • Run the RUNME.ipynb Python Notebook.
    • Run the Flask server by running the app.py file.
    • Run the IP address created by the Flask server which should look like http://127.0.0.1:5000/ or similar. This renders the index.html file containing the visualizations.

File Description

API Python

Important Note: It is only necessary to run the RUNME.ipynb Python Notebook. This folder contains files that:

  1. Create the Postgres Database and the Tables that will store the information from the queries.
  2. Query API from the Department of Education: College Scorecard
  3. Upload the API's queried information to the tables created in step 1.
  4. Upload auxiliar tables created as CSV files (from the API's documentation) to the database and tables created in step 1.

Files in Folder

  1. 0_RUN_ME.ipynb is the master notebook that runs all the other notebooks.
  2. 1_ Entity Relation Diagram.png shows the Diagram used to create the database and tables.
  3. 1_create_tables.ipynb contains the necessary code to create the Database and Tables.
  4. 2_education_api.ipynb contains the necessary code to query the Department of Education API: College Scorecard.
  5. 3_upload_to_db_main_tables.ipynb contains the necessary code to upload the information obtained in the API to the database.
  6. 4_upload_to_db_auxiliar_tables.ipynb contains the necessary code to load the CSV files in the data folder to the database.
  7. 5_query_db.ipynb contains the necessary code to query the database and creates test outputs to the output folder, in CSV, JSON, and TXT formats.
  8. data This folder contains the auxiliar information collected using the API's documentation. These additional tables are used to add descriptions to the codes extracted through the API.
  9. Output This folder contains files in CSV, JSON, and TXT formats obtained in the query to the database described in file 5.
  10. queries This folder contains files with SQL code used to create the database and tables described in files 1. It also contains the SQL code used to query the database as described in files 5.
  11. CollegeScorecardDataDictionary.xlsx This is a file downloaded the Department-of-Education API's Documentation: College Scorecard. This contains the metadata explanation used in the visualizations and the information used to create the CSV files int the data folder.

SQL Schema created by running Run_Me.ipynb

app.py

This file contains the Python code necessary to create a Flask development server to deploy the visualizations created using Javascript libraries.

static

This folder contains all the Javascript code used to create the visualizations displayed through the HTMl files.

Contents of Static

  1. CSS Folder containing CSS for html files.
  2. dashboard.js file that populates metrics on index.html.
  3. metrics.js loads data for College Financial Info visualization.
  4. state_centers.js contains coordinates for the center of each state and US territory.
  5. slidingmap.js loads data for in-state tuition average by state for sliding scale map.
  6. slidingmap_out_of_state.js loads data for out-of-state tuition average by state for sliding scale map.
  7. fusioncharts-suite-xt contains FusionCharts.js library documentation.
  8. fusioncharts-xt-definition contains FusionCharts.js maps definitions.

templates

This folder contains all the HTMl code used to display all the visualizations generated by using the Javascript code and libraries.

Contents of templates

  1. template.html Flask template file that provides framework for all other HTML files.
  2. index.html landing page of website
  3. metrics.html webpage to display College Financial Info.
  4. school_state.html webpage to display school locations by state.
  5. references.html webpage displaying libraries used in this project.
  6. sliding_scale.html webpage to display schools by sliding scale.

Authored by: Roma Patel, Duyen Nguyen, Cesar Mosquera, Bill Bastan

About

Rutgers Data Science Bootcamp - Project 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published