We have made a twin map and chatbot application that is able to track weather events in real time, and help assist users in being able to craft protection plans for themselves, as well as customised protection plans for precious heritage sights during extreme weather events. We utilise the text generative power of ChatGPT to create custom, user specific action plans based on the context the user gives to the bot, as well as weather information that we feed as context into the bot as well.
Our action plans are built to be tailored to your specific situation. We inform the chatbot of your specific weather emergency, and any associated data that has been posted by the government relevant to the emergency. The chatbot then figures out precisely what questions it needs to be answered by you to create the optimal evacuation / protection plan, and once you answer them, the custom action plan is created.
Please note that this project is only a demo, and thus the GPS location tracker is locked into place in our demo location in Queensland and Moreton Bay. We currently are only pulling data from Queensland local governments, so there is no data available for other regions.
After judging is completed, we will be revoking the API access keys used for both our mapbox API key and openAI key. To use the project, please create your own mapbox API key.
1. Create an account on https://account.mapbox.com/auth/signup/
2. Create an access token at https://account.mapbox.com/access-tokens/
1. Create an account at https://platform.openai.com/
2. Create an api key at https://platform.openai.com/account/api-keys
Once you have your keys, continue with the following:
You should see a .envtemplate in your repository once its forked. Please make a copy of the file, and rename it to ‘.env’. Once this is done, your keys will now be private to you, and you may replace with your actual API keys.
We use the OpenAI model gpt-4, which is not available for all users. If you do not have access, please replace all instances of ‘gpt-4’ with ‘gpt-3.5-turbo’ in the code base.
You should now be able to run the code as normal.
The foundation of our application lies in the real-time emergency data sourced from Queensland's official incident data - https://www.data.qld.gov.au/dataset/qfes-incident-data. This data acts as the backbone of our system, allowing the system to know about various weather emergencies.
We use this data in a two ways:
Visualisation: Leveraging the comprehensive emergency dataset, we visually represent weather emergencies on a user-friendly map. This gives users an instant overview of the emergencies around them, enhancing their situational awareness.
Chatbot Contextualisation: Beyond visualisation, the data plays a pivotal role in informing our chatbot. By feeding the chatbot specifics about the user's nearby weather emergency and any associated information posted by the government, we empower the bot with a rich context.
Achievements Through Data: The chatbot, armed with this tailored context, intelligently determines the set of questions it needs to ask users. This is a significant leap from generic queries. By understanding the user's unique circumstances and surrounding emergencies, the chatbot crafts an optimal evacuation or protection plan. The result is a personalised action plan that is not just based on standard protocols but is tailored to the individual's specific situation.
Transparency and Accessibility: Our commitment to transparency and public good is unwavering. The data we rely upon is publicly accessible and is fetched in real-time from this (https://services1.arcgis.com/vkTwD8kHw2woKBqV/arcgis/rest/services/ESCAD_Current_Incidents_Public/FeatureServer/0/query?outFields=*&where=1%3D1&f=geojson). Additionally, the data uses the creative commons licensing terms as outlined by Queensland Fire and Emergency Services (https://www.qfes.qld.gov.au/copyright), ensuring that our use of this data is in line with public permissions and rights.