This Python package, network_analysis
, is designed for conducting network analysis task. It provides tools and utilities to analyze network data, with a focus on handling Slack messages from a previous 10 Academy training program.
Several code snippets have been provided to serve as a starting point for your project. However, it's essential to note that the code has not undergone thorough testing, and errors are expected. Your task is to identify and rectify errors, remove unnecessary components, and incorporate any missing elements.
Consider this initial code as a foundation for your solution, but do not rely on it in its current state. It's provided to give you a starting point, but you should be prepared to modify and enhance it to meet the specific requirements of your system.
As you commence your work, focus on exploring the dataset to gain a deep understanding of its structure and contents. Attempt to answer various intriguing questions that arise during your exploration.
For guidance on the specific questions to address, refer to the notebooks/parse_slack_data.ipynb notebook, where you'll find empty cells designed for your responses. Utilize these cells to document your findings, insights, and any challenges encountered.
Remember, this is an iterative process, and refining your code and analyses is a crucial part of the learning experience. Regularly post question on slack, and don't hesitate to reach out to tutors if you encounter difficulties. Best of luck with your exploration and analysis!
If you prefer Conda as your package manager:
-
Open your terminal or command prompt.
-
Navigate to your project directory.
-
Run the following command to create a new Conda environment:
conda create --name your_env_name python=3.12
Replace
your_env_name
with the desired name for your environment e.g. week0 and3.12
with your preferred Python version. -
Activate the environment:
conda activate your_env_name
If you prefer using venv
, Python's built-in virtual environment module:
-
Open your terminal or command prompt.
-
Navigate to your project directory.
-
Run the following command to create a new virtual environment:
python -m venv your_env_name
Replace
your_env_name
with the desired name for your environment. -
Activate the environment:
- On Windows:
.\your_env_name\scripts\activate
- On macOS/Linux:
source your_env_name/bin/activate
Now, your virtual environment is created and activated. You can install packages and run your Python scripts within this isolated environment. Don't forget to install required packages using pip
or conda
once the environment is activated.
To install the network_analysis
package, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/network_analysis.git
-
Navigate to the project directory:
cd network_analysis
-
Install the required dependencies:
pip install -r requirements.txt
Please be aware that the existing requirements.txt file includes only a limited set of packages at the moment, and it might not encompass all the necessary packages for your analysis. Make sure to supplement it with any additional packages you plan to install.
Configure the package by modifying the src/config.py
file. Adjust parameters such as file paths, API keys, or any other configuration settings relevant to your use case.
The package provides a data loader module (loader.py
) in the src directory. Use this module to load your network data into a format suitable for analysis.
Example:
from src.loader import DataLoader
# Initialize DataLoader
data_loader = DataLoader()
# Load data from a Slack channel
slack_data = data_loader.load_slack_data("path/to/slack_channel_data")
Explore the various utilities available in the src/utils.py
module. This module contains functions for common tasks such as data cleaning, preprocessing, and analysis.
Example:
from src.utils import clean_data, visualize_network
# Clean the loaded data
cleaned_data = clean_data(slack_data)
# Visualize the network
visualize_network(cleaned_data)
Run tests using the following command:
make test
This will execute the unit tests located in the tests directory.
Visit the docs directory for additional documentation and resources. The documentation covers important aspects such as code structure, best practices, and additional usage examples.
The notebooks directory contains Jupyter notebooks that demonstrate specific use cases and analyses. Refer to these notebooks for hands-on examples.
Contributions are welcome! Before contributing, please review our contribution guidelines.
This project is licensed under the MIT License.
This is a starter python package to analze the slack data to learn about
- Patter of users messaging behaviour
- Patter of replies and reactions of users to messages posted both by peers and admins
- Discover sub-communities by building network graphs of message senders and those who reply or react to those messages