Inspiration
The inspiration for the Disaster Impact Analyzer Agent stemmed from the pressing need to transform complex global event data into actionable insights for disaster response and resilience planning. The GDELT Open Intelligence dataset, with its extensive graph of over 65,000 events, actors, locations, and sources, presented a unique opportunity to explore historical patterns—such as violence against civilians—and convert them into meaningful predictions and plans. I was driven by the potential of GraphRAG and ArangoDB to harness this data, blending graph analytics with AI to go beyond mere reporting, enabling impact prediction and real-world decision-making. The vision of visualizing thousands of disaster locations on an interactive map and supporting natural language queries further ignited my goal to build a tool that’s both powerful and user-friendly.
What it does
The Disaster Impact Analyzer Agent is a sophisticated tool that processes the entire GDELT Open Intelligence dataset in ArangoDB to provide comprehensive disaster analysis. It empowers users to:
- Retrieve Events: Query the full dataset with natural language (e.g., “Which events had fatalities in January 1997?”) to get detailed event information, including dates, fatalities, and locations.
- Predict Impact: Analyze the cascading effects of an event (e.g., “What’s the impact if event Event/ALG1 occurs?”), using graph connectivity to estimate isolated regions and affected entities, powered by NVIDIA cuGraph or NetworkX.
- Plan Responses: Generate actionable plans for specific locations (e.g., “How to respond to violence in Douaouda?”), identifying related events and optimal response paths within the graph.
- Summarize Recent Events: Fetch summaries of recent incidents (e.g., “What events happened in the last 30 days of 1997?”), tailored to the dataset’s historical scope.
- Visualize Geospatially: Display all event locations on an interactive Plotly map, highlighting disaster hotspots across the globe.
Built for scalability, it handles the full dataset without sampling, making it a robust solution for analysts, responders, and decision-makers.
How we built it
The agent was built using a multi-layered approach:
- Environment Setup: We installed key libraries—
arango-datasets,nx-arangodb,langchain,nx-cugraph-cu12,plotly, andgradio—and connected to a local ArangoDB instance hosting the GDELT dataset. - Data Exploration: An AQL query fetched all events with their
eventActor,hasLocation, andhasSourcerelationships, stored in a Pandas DataFrame for initial inspection. - Graph Construction: We constructed a
NetworkXdirected graph in memory, adding event nodes with attributes (date, fatalities, geo) and edges to actors and locations, then persisted it asDisasterGraph1in ArangoDB usingnx_arangodbwith a batch size of 10,000 for efficiency. - Agent Development: A LangChain agent powered by OpenAI’s GPT-4o was developed with four tools (
retrieve_events,predict_impact,plan_response,recent_events), integrating ArangoDB AQL and graph analytics for dynamic query handling. - Visualization & UI: Plotly’s
Scattergeomapped all event coordinates, and a Gradio interface provided an
Built With
- arrangodb
- python
Log in or sign up for Devpost to join the conversation.