Using Exports from the Telegram Channels "WarArchive_ua" and "military_u_geo", this map was produced. This tool is agnostic to context, source accuracy, and bias. All results should be provisional and only used as a starting point.
This Python script automates the extraction of geographic coordinates from a Telegram channel's exported chat history. The extracted data is saved as a CSV file, including additional details like the post's ID, date, message content, and media type.
- Python 3.x
- Tkinter (usually comes pre-installed with Python)
- pandas library
- Ensure that you have Python installed. If not, download and install it from python.org.
- Install pandas by running
pip install pandas
in your command line or terminal.
- Open the Telegram desktop application.
- Navigate to the channel whose data you wish to export.
- Click on the three vertical dots (⋮) at the top-right corner to reveal a dropdown menu.
- Choose
Export chat history
. - In the dialogue box that appears:
- Under 'Format', select
JSON
. - Disable all media downloads by unchecking the boxes next to each media type.
- Under 'Format', select
- Click
Export
to save the JSON file on your computer.
- Save the Python script in a location of your choice.
- Open your command line or terminal and navigate to the directory where the script is saved.
- Run the script by typing
python script_name.py
(replacescript_name
with the actual name of the script). - Follow the on-screen prompts to:
- Name the output CSV file.
- Select the JSON file to process.
- Specify the directory to save the CSV file.
- Enter the base URL for post links.
- Open Google Earth on your computer.
- Navigate to
File
>Import
. - In the dialogue box, select the CSV file that you generated with this script.
- Google Earth will automatically read the latitude and longitude columns, plotting the coordinates on the map.
By following these steps, you can visualise the geographic locations mentioned in the Telegram posts directly on Google Earth.