getInsight is a collection of Jupyter notebooks that allows you to retrieve and analyze the latest Mars Weather data from NASA's Insight Weather Service API using a demo key.
- Python 3.10 or higher
- pip (Python package manager)
- Git
git clone https://github.com/yourusername/getInsight.git
cd getInsight
# For macOS/Linux
python3 -m venv marsenv
# Activate the virtual environment
source marsenv/bin/activate
pip install -r requirements.txt
python -m ipykernel install --user --name=marsenv --display-name "Python (marsenv)"
- Purpose: Retrieve and display the latest Mars Weather API response
- Features:
- Fetches data using NASA's demo key
- Prints raw API response
- No data export
- Purpose: Retrieve Mars Weather data and export to Excel
- Features:
- Fetches data using NASA's demo key
- Exports data to an Excel spreadsheet
- Filename includes current date
The exported Excel file contains multiple sheets to help you understand the Mars Weather data:
- Purpose: Provides an overview of the dataset
- Columns:
Total Sols Recorded
: Number of Martian days in the datasetAverage Temperature (°F)
: Mean temperature across recorded solsAverage Wind Speed (mph)
: Mean wind speedMost Common Wind Direction
: Predominant wind direction
- Purpose: Detailed information for each Martian day (sol)
- Key Columns:
Sol
: Martian day numberEarth Date
: Corresponding Earth dateTemperature High (°F)
: Maximum temperature for the solTemperature Low (°F)
: Minimum temperature for the solWind Speed (mph)
: Average wind speedWind Direction
: Predominant wind directionPressure (Pa)
: Atmospheric pressure
- Sol: A Martian day, slightly longer than an Earth day (24 hours, 39 minutes)
- Temperature: Recorded in Fahrenheit
- Wind Speed: Measured in miles per hour
- Pressure: Measured in Pascals (Pa)
- Martian temperatures can vary dramatically between day and night
- Wind directions can change frequently
- Atmospheric pressure is much lower than on Earth
- Use Excel's built-in charting tools to create:
- Temperature trends over time
- Wind speed variations
- Pressure changes
- Data is based on NASA's Insight Lander location
- Represents local conditions at the landing site
- May not reflect global Martian weather patterns
- Start Jupyter Notebook
jupyter notebook
- In the Jupyter interface:
- Select the notebook you want to run
- Ensure the kernel is set to "Python (marsenv)"
- Run cells sequentially using Shift+Enter
- Module Not Found Errors: Ensure you've activated the virtual environment and installed all dependencies
- Kernel Issues: Verify the marsenv kernel is installed and selected
- API Limitations: NASA's demo key has request rate limits
Contributions are welcome! Please submit a pull request or open an issue.
This project uses NASA's Mars Weather API demo key. For extensive use, consider obtaining a personal API key from NASA.