This repository contains a jupyter notebook, an index.html file and a corresponding style_sheet (in static), an app (app.py), and a python file (scrape_mars.py with the scraping function).
Information on how to scrape data from the web, connect to MongoDB, and add to the html file are what follows.
Initially, web scraping was completed using a jupyter notebook. Within the folder, "Mission_to_Mars," contains the aformentioned jupyter-notebook, and an output folder of the initial html table(s) completed on the "Mars Facts!"
Using the Jupyter notebook as a guide, using Visual Studio, a python file was created with a similar means of scraping for data from a series of sites. These include:
- NASA News Site
- Scraped to find the latest news article and corresponding paragraph.
- JPL Featured Image
- Scraped for the featured image.
- Mars Facts
- Scraped for "Mars Facts" to include in a table.
- Mars Hemispheres
- Scraped for images and names of Mars' 4 Hemispheres.
These were then inserted into a MongoDB database (which is updated every time the app runs).
Following this, an html file was created that linked to an app in order to run the scraping and add it to the database whenever the button was pressed, and present the information formatted onto the index.html.
Screenshots of the completed, final app are included in the folder, app_screenshots.