https://github.com/cabralpinto/wildfire-heat-map-generation
Wildfire Heat Map Generation with Twitter and BERT
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
Wildfire Heat Map Generation with Twitter and BERT
Basic Info
- Host: GitHub
- Owner: cabralpinto
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://dl.acm.org/doi/10.1007/978-3-031-48232-8_9
- Size: 7.37 MB
Statistics
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Wildfire Heat Map Generation with Twitter and BERT
This repository contains the code and resources for generating wildfire heat maps of Portugal using Twitter data and a fine-tuned BERT language model. The project was initially developed for the RECPAD 2022 conference, where it was chosen as one of the top 4 papers. It also serves as the repository for the extended version of the paper, which will be published soon. The system can easily be extended to work with other countries or languages.
Description
The goal of this project is to extract pertinent information from social media posts during fire events and create a heat map indicating the most probable fire locations. The pipeline consists of the following steps:
Data Collection: Obtain fire-related tweets from Twitter using the SNScrape API, filtering for Portuguese language and keywords like "fogo" and "incêndio" ("fire" and "wildfire").
Classification: Use a finetuned BERT instance to classify and filter out tweets that are not fire reports.
Geoparsing: Extract fire locations from tweets through Named Entity Recognition (NER), concatenating recognized location names to form a preliminary geocode, and retrieving the corresponding region geometry using the Nominatim API.
Intersection Detection: Identify intersections between extracted fire report regions and a predefined area of interest (e.g., Portugal), calculate intersection counts, and generate a heat map to visualize regions with a higher volume of fire occurences.
The resulting heat maps can be useful in allocating firefighting resources effectively. The system is easily adaptable to work with other countries or languages as long as compatible BERT and NER models are available.
Usage
To use this project, follow the instructions below:
- Install the required libraries by running the following command in the root directory of the project.
bash
python -r requirements.txt
2. Generate a heatmap for a specific date using the following command:
bash
python src/heatmap.py <date>
Replace <date> with the desired date in the format yyyy-mm-dd.
Examples
Here are a few examples of the wildfire heat maps generated using our system. These maps correspond to the dates June 18, 2017; July 3, 2019; and August 7, 2022. The first image specifically highlights the notable fires in Pedrógão Grande, Leiria, which our method was able to identify and depict on the map.

License
This project is licensed under the MIT License.
Citation
If you use this project or find it helpful for your research, please consider citing the following paper:
João Cabral Pinto, Hugo Gonçalo Oliveira, Catarina Silva, Alberto Cardoso, "Using Twitter Data and Natural Language Processing to Generate Wildfire Heat Maps", 28th Portuguese Conference on Pattern Recognition (RECPAD 2022), 2022.
Owner
- Name: João Cabral Pinto
- Login: cabralpinto
- Kind: user
- Repositories: 1
- Profile: https://github.com/cabralpinto
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Issues and Pull Requests
Last synced: 6 months ago