This program is a SI 507 final project designed to facilitate trip to national sites. After implementing the interactive command line tool, the users can enter a state of interest and obtain useful information about the national sites in that state, including site name, site category (national site, national historical site etc.), phone, email, to name a few. Users can also obtain some visualizations showing the biodiversity information of that national site.
Main Tools: Python, SQLite
The program relied on:
- National Park Service Data API
- National Park Service Website
- Biodiversity in National Parks csv files
for data gathering
These instructions will get you a copy of the project up and running on your local machine for development (or grading :) ) purposes.
Python3, Plotly, some knowledge about command line tool (e.g. terminal)
In order to configure this project, please follow these steps:
- Clone the repository onto your local system.
$ git clone https://github.com/zhuoqunw/SI507-Final-Project.git
-
Obtain (or create) the secret.py file with the necessary API keys. (For the purpose of SI 507, this was turned in to Canvas with my submission.) For other purpoes, please request a free API key from https://www.nps.gov/subjects/digital/nps-data-api.htm
-
Place secret.py at the root level in the final project directory.
The "FinProj.py" file will initiate the program.
$ python3 FinProj.py
💡 Note: in your terminal, please change the directory to the final project directory before you run the program
- The program will ask the user to input a state of interest and will return a nicely formatted list displaying all national sites names within that state with indices associated at the beginning of each name
- The user will then input a number, and the program will display more detailed information of the selected national site, including name, category, address, phone, email, activities, description, website url, map url, the area of the site in acres and if applicable, the number of species in that site
💡 To get access to the website or map, hit cmd+click - If applicable, the user will also be presented with plots showing the biodiversity in the selected national park. More specifically:
- A bar chart showing the number of species under each category (mammal, bird, fish, Vascular Plant etc.), sorted by the number of species
- A bar chart showing the number of species under each occurrence category (Present, Not Confirmed, Not Present (Historical Report)), sorted by the number of species
- A pie chart showing the percentage of species under each nativeness category (native, not native, or unknown)
- A bar chart showing the number of species under each conservation status (species of concern, endangered etc.), sorted by the number of species
⚠️ Not all national sites have biodiversity data, if there is no plot, it means there is a lack of data
- Python3 - The programming language on the back end
Packages:- BeautifulSoup - scrape webpage
- requests - fetch data from API
- Plotly - visualize data
- SQLite3 - The database backing the project
- Lea Wei - Initial work - zhuoqunw
- Professor Bobby Madamanchi and the instruction team of SI 507 in fall 2020, whose code examples helped form the basis of this project, especially the web scraping part
- Nigel, my roommate's dog, was a great company and comfort for me while I was designing this program. Isn't he a cutie?!:dog: :dog: