A real-time astronomical dashboard demonstrating the capabilities of Moon-API.com. This interactive dashboard visualizes lunar and solar data, providing a comprehensive view of celestial positions, phases, and astronomical events.
- Real-time Data Updates: Automatically refreshes every 5 minutes
- Interactive Charts:
- Moon Position (Altitude & Azimuth)
- Sun Position (Altitude & Azimuth)
- Celestial Distances
- Detailed Information:
- Current Moon Phase & Illumination
- Sun Rise/Set Times
- Zodiac Information
- Equipment Recommendations
- Optimal Viewing Periods
- Data Explorer: Click any value to see its location in the API response
- Historical Data: Tracks and displays 7 days of data
- Demo Mode: Try the dashboard without an API key
-
Clone this repository:
git clone https://github.com/HairyDuck/MoonAPI_Demo-Astronomical_Dashboard.git
-
Open
index.html
in your browser or serve via a web server. -
Either:
- Enter your Moon-API key (get one at Moon-API.com or RapidAPI)
- Or click "View Demo with Sample Data" to try the dashboard
The dashboard includes three main charts:
- Moon Position: Shows altitude (-90° to +90°) and azimuth (0° to 360°)
- Sun Position: Displays current solar position and movement
- Celestial Distances: Tracks distances of both bodies over time
This demo uses the Moon-API Advanced endpoint which provides:
- Detailed moon phase information
- Precise positional data
- Visibility conditions
- Equipment recommendations
- Astronomical events
Built with:
- Pure JavaScript (ES6+)
- Chart.js for data visualization
- Bootstrap 5 for UI components
- Local Storage for data persistence
- Real-time data updates every 5 minutes
- Interactive data explorer
- Historical data tracking
- Change detection and logging
- Responsive design for all screen sizes
- Local storage for historical data
- Demo mode with simulated updates
- API key management
- Error handling and validation
- Dynamic charts with Chart.js
- Custom tooltips
- Interactive data points
- Responsive layouts
The dashboard uses the following default settings:
- Update interval: 5 minutes
- Historical data retention: 7 days
- Data points per hour: 12 (one every 5 minutes)
- Default location: London (51.4768, -0.0004)
This demo code is available under the MIT License. Feel free to use it as a starting point for your own projects.
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- For API-related questions, visit Moon-API.com
- For demo-specific issues, open a GitHub issue
- For general queries, contact support@moon-api.com
The demo mode uses simulated data that demonstrates:
- Moon phase transitions
- Daily celestial movements
- Distance variations
- Viewing conditions
- Equipment recommendations
Note: Demo data is for illustration purposes and may not reflect actual astronomical conditions.