We studied the communication network among members of the course within the Telegram group. Using Telegram’s MTProto API and telethon
library, we collected data on users and message interactions. The gathered data was saved in a database for further analysis. We analyzed the degree distribution of individuals interacting, revealing power-law behavior akin to real social networks.
The network was constructed in networkx
based on interactions such as replies, reactions, and pinned messages.
- Utilizes Telegram's MTProto API and Telethon library for data collection.
- Captures and stores user profiles and various message interactions in a database.
- Analyzes the degree distribution of participants engaging in interactions, revealing power-law behavior akin to real social networks.
- Constructs a network framework incorporating interactions such as replies, reactions, and pinned messages, offering insights into network dynamics and participant engagement patterns.
The dataset is not included in the repository to protect the privacy of the participants. We may release an anonymized version of the dataset in the future.
-
Clone the repository.
-
Install dependencies:
pip install -r requirements.txt
- Create and fill
credentials.py
:
api_id = your_api_id
api_hash = 'your_api_hash'
phone_number = '+989xxxxxxxxx'
- Obtain a personal Telegram client code to access the Telegram API.
- Configure the Telegram API credentials in the project.
- Run the data collection script to gather user profiles and message interactions.
- Analyze the collected data using the provided analysis tools.
- Visualize the network structure.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to Prof. Saman Moghimi-Araghi for guiding us in this project.
- Thanks to the creators of Telegram and Telethon for providing robust APIs and libraries for data collection.
- Hat tip to the course participants of the course Network Analysis Fall Semester 2023 whose interactions formed the basis of this analysis.