This repository showcases a project that leverages Beautiful Soup, Splinter, and Pandas for data scraping, analysis, and visualization of Mars news and weather data.
This project comprises two main components: the first part involves news scraping, while the second part focuses on collecting Mars weather data as a data frame and performing analysis on it.
In this part, we'll gather the Mars news titles and summaries with Python, Splinter, and Beautiful Soup, saving them in a user-friendly JSON file for easy access. The news data will be sourced from the website: Mars News
We'll explore the Mars climate using Python, Splinter, Beautiful Soup, and Pandas visualizations. Highlights include:
-
First, we'll scrape Mars weather data Mars weather and transform it into a convenient data frame.
-
After analyzing the data frame turns out that Mars, like Earth, has approximately 12 months in a Martian year.
-
There is 1867 Martian (not Earth) days' worth of data in the scraped dataset.
-
Monthly weather on Mars: On Mars, on average, the months of the Martian calendar equivalent to the 8th and 9th months are the coldest.
-
Coldest and hottest months at Curiosity's location.: On Mars, the 8th month of the Martian calendar is typically the coldest, while the 3rd month tends to be the hottest on average.
-
Average Martian monthly pressure: Average atmospheric pressure is lowest in the sixth month and highest in the ninth.
-
Estimating Earth days in a Martian year using peak-to-peak daily minimum temperatures: Mars' year is approximately 675 days based on the plot's peak-to-peak distance of around 1425-750, which is 675 days.
-
Exporting the scraped Mars weather dataframe to a CSV file.
Contributions to this project are welcome. If you find any issues or have suggestions for improvement, please submit a pull request or open an issue on the GitHub repository.
- https://www.geeksforgeeks.org/python-encode-unicode-and-non-ascii-characters-into-json/
- https://matplotlib.org/2.0.2/examples/color/colormaps_reference.html
- https://stackoverflow.com/questions/25146121/extracting-just-month-and-year-separately-from-pandas-datetime-column
- https://stackoverflow.com/questions/23357798/how-to-draw-grid-lines-behind-matplotlib-bar-graph