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.
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
- Clone the GitHub Repo into the Terminal.
- Go to path
cd cab-project-2/src/SQL
using the terminal.
- Use the command
unzip EXTRACT_ME.zip
in terminal to extract the zip file containing the filessetup.sh
,flask_install.sh
,webapp.sh
, anddrop.sh
.
- Run command
sh setup.sh
in terminal. This will create the tables and insert the data.
The inserts will take a few minutes. Be patient, there are close to 1 million inserts! 😼
- If you already don't have flask installed, while remaining in the same directory
([lion@roscoe SQL]$)
, run commandsh flask_install.sh
to install flask.
Run command sh webapp.sh
to open the web app (Yes, you must stay in the same directory for this one as well).
You will be greeted wtih our home page. Hit "Get Started" to move on the query selection.
When selecting from dropdowns, you are only able to use one at a time.
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.
- Average KW used for each Municipality Selected.
- The most prominent Electric Utility in the selected Municipalities.
- The most prominent customer type in the selected Municipalities.
- Every row with that has the selected municipalities present.
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.
- Average KW used for each Eletric Utility Company Selected.
- The most prominent customer type that hired the selected Eletric Utility Company.
- The Municipality that contains the most projects from the selected Electric Utility Company.
- Every row with that has the selected Electric Utility Company present.
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.
- Average KW used for each Customer Type Selected.
- The Municipality that contains the highest amount of the selected customer types.
- The most popular Eletric Utility with the selected customer type.
- Every row with that has the selected Customer Type Present Company present.
Have Fun Filtering!
- In your terminal, run the code
sh drop.sh