NeoFeed is a web application designed to retrieve and visualize data about near-Earth objects (NEOs) from NASA's NEO API. The application allows users to select a date range, fetch information about NEOs that passed by Earth during that time, and visualize their orbits.
- Technologies Used
- Project Structure
- Features
- Setup Instructions
- API Endpoints
- Usage
- Development Notes
- Future Improvements
NeoFeed/
├── app.py
├── requirements.txt
├── backend/
│ ├── utils/
│ │ ├── neoFeed.py
│ │ └── neoObjectApproach.py
...(rest of backend files)
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ... (rest of frontend files)
│ ├── static/
│ │ └── neo.css
├── templates/
│ └── index.html
├── README.md
-
Frontend:
- React (JavaScript)
- Axios (HTTP requests)
- Plotly.js (Orbit visualizations)
- MUI (Date pickers)
- CSS (Custom styling)
-
Backend:
- Python (Flask)
- NASA NEO API (for fetching NEO data)
- Skyfield (Planetary positions for orbit plots)
- Plotly (Python plotting for orbits)
-
Date Range Picker: Users can select a start and end date to filter NEO data.
-
NEO Data Fetching: The app sends a request to NASA’s NEO API and retrieves data about near-Earth objects that passed Earth during the selected date range.
-
Dynamic Visualization: Users can click on a NEO to view its details and orbit plotted with Plotly.js.
-
Orbit Animation: NEOs' orbits are plotted with respect to Earth or other celestial bodies using accurate data from Skyfield.
-
Hazardous Object Highlighting: Potentially hazardous NEOs are highlighted in orange for easy identification.
- Python 3.8+
- Node.js 14+
- Flask
- React
- Clone the repository:
git clone https://github.com/yourusername/neofeed.git
- Install dependencies:
cd neofeed pip install -r requirements.txt
- Run the Flask server
export FLASK_APP=app.py flask run
- Navigate to the frontend directory
cd frontend
- Install dependencies:
npm install
- Run the React app
npm start
- GET
/api/neo
- Fetches NEO data for the current day.
- POST
/api/neo
- Accepts a date range and retrieves NEO data for that range from the NASA NEO API.
- Request Body Example:
{ "start_date": "2024-01-01", "end_date": "2024-01-07" }
- GET
/api/neoObject
- Fetches details for a specific NEO object using its identifier.
- Response includes details like its orbit, size, and hazardous status.