Mission to Mars is a web application that scrapes various websites for data related to Mars and displays the information in a single HTML web page.
The folder Missions_to_Mars contains all of the files used to create the web page:
The jupyter notebook file mission_to_mars.ipynb is used to scrape the following URLs using BeautifulSoup, Pandas, and Requests/Splinter:
- https://mars.nasa.gov/news/
- https://data-class-jpl-space.s3.amazonaws.com/JPL_Space/index.html
- https://astrogeology.usgs.gov/search/results?q=hemisphere+enhanced&k1=target&v1=Mars
The data is then stored as a dictionary and hosted in MongoDB.
The python scriptscrape_mars.py creates the scrape() function that executes the scraping code created in the jupyter notebook file. The scrape function is called in the app.py file.
The Flask app app.py contains two routes one of which calls the scrape function from the previous code when executed via the "Scrape New Data" button on the home page. The root route queries the Mongo database and passes the executed Mars Data into an HTML page for rendering of the data dictionary for display.
The folder templates contains the index.html file that displays the data using Bootstrap page elements.
The folder Screenshots contains two screenshots of the final webpage display.