Giter VIP home page Giter VIP logo

jamesdesantiago / seismicai Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 661 KB

SeismicAI is a Streamlit-based web application for visualizing and analyzing earthquake data from the USGS Earthquake Hazards Program API. It features interactive data fetching, analysis, and visualization tools, along with a chat interface for insights into seismic activities.

License: Apache License 2.0

Python 100.00%
data-visualization earthquake-visualization earthquakes educational-tool natural-language-processing openai pandas plotly python streamlit

seismicai's Introduction

SeismicAI: Earthquake Data Visualization & Analysis App

SeismicAI is an interactive web application built with Streamlit, designed to fetch, analyze, and visualize seismic data from the U.S. Geological Survey (USGS) Earthquake Hazards Program API. It provides users with insights into earthquake data, allowing them to visualize seismic events on a map and interact with the data through a simple chat interface. The app is intended for educational and informational purposes and does not forecast earthquakes.

Features

  • Fetch seismic data from the USGS API based on user-selected date ranges.
  • Data analysis and insights, including statistical summaries and trend analysis.
  • Visualization of earthquake data on a map, highlighting events with a magnitude greater than 4.0.
  • A chat interface that allows users to ask questions about the seismic data, with examples provided.
  • Customizable date input for data fetching, enabling users to explore seismic events within specific time frames.

How to Use

  1. Select Date Range: Use the sidebar to input the start and end dates for fetching seismic data. The default range is the past seven days.
  2. View Map Visualization: The main area displays a map visualization of earthquakes with a magnitude greater than 4.0, based on the selected date range.
  3. Read General Summary: Expand the "General Summary" section to view statistical insights into the fetched seismic data.
  4. Ask Questions: Use the "Seismic Chat" section in the sidebar to ask specific questions about the seismic data. You can select an example query or type your own question and press "Ask" to submit.

Technical Details

  • Python Libraries: The app utilizes requests for API requests, pandas and pandasai for data manipulation, plotly.express for data visualization, and datetime and numpy for handling dates and numerical operations.
  • Data Source: Seismic data is fetched from the USGS Earthquake Hazards Program API.
  • Chat Interface: Implemented using the pandasai library's SmartDataframe class and OpenAI's API for natural language processing and interaction.

Installation and Setup

To run SeismicAI locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/jamesdesantiago/SeismicAI.git
    cd SeismicAI
  2. Install the required Python packages:

    pip install -r requirements.txt
  3. Set up your OpenAI API key:

    • Obtain an API key from OpenAI.
    • Create a file named .streamlit/secrets.toml and add your OpenAI API key:
      openai_api_key = "your_api_key_here"
  4. Run the app:

    streamlit run app.py
  5. The app will start running locally. Open the provided URL in a web browser to use SeismicAI.

Contribution Guidelines

Contributions to SeismicAI are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Implement your changes.
  4. Submit a pull request with a clear description of your changes.

License

SeismicAI is released under the Apache-2.0 License. See the LICENSE file for more details.

Credits

SeismicAI was created by James De Santiago. Data is sourced from the U.S. Geological Survey (USGS) Earthquake Hazards Program.

Please note that this documentation is a generic template and should be customized to fit the specific features and functionalities of your version of SeismicAI.

seismicai's People

Contributors

jamesdesantiago avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.