Skip to content

EmpSwarup/recent-earthquake-nepal

Repository files navigation

Recent Earthquake in Nepal Tracker

Project Screenshot

A real-time earthquake monitoring application focused on Nepal, visualizing seismic activity with interactive maps and detailed information.

Features

  • 🗺️ Interactive map with earthquake locations
  • 🔴 Magnitude-based visualization (size and color)
  • 📅 Filter earthquakes by time period (day, week, month, year)
  • ℹ️ Detailed earthquake information popups
  • 📊 Statistics dashboard showing:
    • Total earthquakes
    • Strongest magnitude
    • Most recent event
    • Average depth

Technologies Used

  • React
  • TypeScript
  • Vite
  • MapLibre GL
  • Tailwind CSS
  • USGS API

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/nepal-earthquake-tracker.git
    cd nepal-earthquake-tracker
  2. Install dependencies:

    npm install
  3. Create a .env file:

    VITE_MAPTILER_API_KEY=your_maptiler_key_here
  4. Run the development server:

    npm run dev

API Usage

This project uses the USGS Earthquake API with the following parameters:

  `https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&starttime=${date}&minlatitude=26&maxlatitude=30&minlongitude=80&maxlongitude=89`

Project Structure

src/
├── components/
│   ├── EarthquakeDetails.tsx  # Earthquake info card
│   ├── EarthquakeMap.tsx      # Main component
│   ├── FilterTabs.tsx         # Time period filters
│   ├── Footer.tsx             # App footer
│   ├── MapComponent.tsx       # Map visualization
│   ├── StatisticsCards.tsx    # Stats dashboard
│   └── popup-content.ts       # Map popup generator
├── types/
│   └── earthquake.ts          # Type definitions
├── App.tsx
├── main.tsx
└── styles.css

Contributing

  • Fork the project

  • Create your feature branch (git checkout -b feature/AmazingFeature)

  • Commit your changes (git commit -m 'Add some amazing feature')

  • Push to the branch (git push origin feature/AmazingFeature)

  • Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Data provided by USGS Earthquake Hazards Program

Map tiles by MapTiler

Icons by Lucide

About

A real-time earthquake monitoring application focused on Nepal, visualizing seismic activity with interactive maps and detailed information.

Resources

Stars

Watchers

Forks

Contributors