Skip to content

Simon-Blamo/Spring-2023-CAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Solar Panels CAB Project

What is it?

Our database is meant to be used by submitting queries for different questions one may have about solar panels in New Jersey. Questions such as: In Bergen County, what type of customer has the highest use of solar panels? can be answered by choosing Bergen County in Municipality and selecting the Customer Type you want to look at.

Our Schema

Customer
app_id (PK) | zip_code | complete_date | contractor | cust_type | municipality | acceptance_date

Program
app_id (FK) | zip_code | complete_date | contractor | cust_type | municipality | acceptance_date

Cost
app_id (FK) | third_ownership | Interconnection

Power
app_id (FK) | third_ownership | Interconnection

Install

  1. Clone the GitHub Repo into the Terminal.
    image
  2. Go to path cd cab-project-2/src/SQL using the terminal.
    image
  3. Use the command unzip EXTRACT_ME.zip in terminal to extract the zip file containing the files setup.sh, flask_install.sh,webapp.sh, and drop.sh.
    image
  4. Run command sh setup.sh in terminal. This will create the tables and insert the data. image

The inserts will take a few minutes. Be patient, there are close to 1 million inserts! 😼

  1. If you already don't have flask installed, while remaining in the same directory ([lion@roscoe SQL]$), run command sh flask_install.sh to install flask.

Using the Database

Starting the Web App

Run command sh webapp.sh to open the web app (Yes, you must stay in the same directory for this one as well).

image

You will be greeted wtih our home page. Hit "Get Started" to move on the query selection.

image image

Dropdown Selectors

When selecting from dropdowns, you are only able to use one at a time.

Municipality Selector

The Municipality Selector allows the user to select up to 579 Municipalities recorded from SNJ! After making your desired selection, click submit, and tables will be produced.

There are four tables produced for this selector.

  1. Average KW used for each Municipality Selected.
  2. The most prominent Electric Utility in the selected Municipalities.
  3. The most prominent customer type in the selected Municipalities.
  4. Every row with that has the selected municipalities present.
Example

image image

Electric Utility Selector

The Electric Utility Selector allows the user to select any recorded Electric Utility Company from SNJ. After making your desired selection, click submit, and tables will be produced.

There are four tables produced for this selector.

  1. Average KW used for each Eletric Utility Company Selected.
  2. The most prominent customer type that hired the selected Eletric Utility Company.
  3. The Municipality that contains the most projects from the selected Electric Utility Company.
  4. Every row with that has the selected Electric Utility Company present.
Example

image image

Customer Type Selector

The Customer Type Selector allows the user to select any of the Categorized Customer Types Recorded from SNJ. After making your desired selection, click submit, and tables will be produced.

  1. Average KW used for each Customer Type Selected.
  2. The Municipality that contains the highest amount of the selected customer types.
  3. The most popular Eletric Utility with the selected customer type.
  4. Every row with that has the selected Customer Type Present Company present.
Example

image image

Have Fun Filtering!

Deleting the Databse

  • In your terminal, run the code sh drop.sh

About

Database CAB Project. Developed with @claire-eng and @JoePetrecca.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published