- Mars news data from Mars Website is scraped using Splinter and BeautifulSoup.
- The title and preview of news data is saved to a Pandas DataFrame and then saved to a csv file - Mars News
- Mars weather data is scraped from Mars Temperature Data Site using Splinter and BeautifulSoup.
- The data collected is saved to a Pandas DataFrame.
- How many months exist on Mars?
- 12
- How many Martian (and not Earth) days worth of data exist in the scraped dataset?
- 1867
- What are the coldest and the warmest months on Mars (at the location of Curiosity)? The coldest temperature on Mars were reported for third month, and the eighth month is the warmest.
- Which months have the lowest and the highest atmospheric pressure on Mars? Lowest Atmospheric pressure is reported for the sixth month and highest in the ninth.
- About how many terrestrial (Earth) days exist in a Martian year? The number of days in a martian year can be estimated by looking at the peak to peak displayed in the graph, which is roughly 1380-702, or 678 days. So the plot tells us that a year in Mars is about 678 days. It was confirmed from the internet that a Mars year is equivalent to 687 earth days.
- Source Code:
- Mars/part_1_mars_news.ipynb
- Mars/part_2_mars_weather.ipynb
- Datasets: Mars Website Mars Temperature Data Site
- Output:
- Mars/Output/mars_news.csv - CSV files that contains data scraped from Mars Website
- Mars/Output/mars_temparature.csv - CSV files that contains data scraped from Mars Temperature Data Site
- Mars/Output/average_temp_by_month.png
- Mars/Output/coldest_hottest_months.png
- Mars/Output/average_pressure_by_month.png
- Marts/Output/terrestrial_days.png
- Open a terminal
- Confirm condo version
conda --version - Confirm jupyter version
jupyter --version - Activate conda environment
conda activate dev - Install chromeDriver
Win - Download and install from Selenium project
Mac - brew install chromedriver - Install packages
pip install "splinter[selenium]"
pip install bs4
pip install html5lib
pip install lxml - Launch Jupyter Notebook
jupyter notebook - Jupyter Notebook is opened in a browser
- Open "Mars/part_1_mars_news.ipynb" file using Jupyter Notebook
- Click on 'Cell > Run All' to run
- Open "Mars/part_2_mars_weather.ipynb" file using Jupyter Notebook
- Click on 'Cell > Run All' to run
This repo was published for educational purpose only. Copyright 2024 edX Boot Camps LLC. All rights reserved.