Giter Club home page Giter Club logo

slack_export_parsing's Introduction

Team Cohesion and Team Performance

This repository contains tools that were used to extract and transform data needed for the dissertation Local and remote team cohesion effect on performance in the software industry by Grahn and Martins (2021).

The Slack exports are used to calculate LSM (Language Style Matching) scores to estimate the team cohesion.

There is also a script for getting GitLab merge requests as part of estimating team performance.

Team Cohesion

Team cohesion is measured through LSM score based on Slack content.

Sample Manual Slack Export

KarlJohan_Slack_export_Feb_23_2021-Mar_24_2021 contains the result from a manual export of messages from two channels general and test from a private Slack instance, and is made available only for test purposes. Similar exports can easily be done from any Slack instance.

A manual export cannot necessarily be restricted to certain channels, so for that reason a script is needed.

Team File

The Slack export script takes a comma separated team file as input, containing the users whose messages should be included in the export. The file should have this structure:

user,real_name
<slack user id>,Name of person 1
U.........,Name of person 2

See before_team1.txt for an example team file.

Slack Export

To export content from a Slack channel:

  1. Create a Slack Bot

  2. Create a token for the bot

  3. Invite the bot to the channel that you want to export content from

  4. Set the bot token as an environment variable SLACK_BOT_TOKEN

  5. Run the script slack_export.py to export messages from the Slack channel:

    python slack_export.py [team_file] [channel_name] [channel_id]

The output will be a folder for each team containing a JSON file with all the messages and threads from the specified channel from the specified team members for two time periods.

Merge JSON Files

If multiple JSON output files are created, you need to merge them to a single file using the script merge.py:

python merge.py [dir_to_parse]

For example:

python merge.py KarlJohan_Slack_export_Feb_23_2021-Mar_24_2021/general

Remove User Mentions

To remove Slack user mentions from JSON output, run the script parse.py:

python parse.py [dir_to_parse] [team_members_file]

LSM (Language Style Matching) Score

To extract the content to calculate the LSM score for each team:

  1. Run the lsm.py script:

    python lsm.py [dir_to_parse] [team_members_file]

    For example:

    python lsm.py KarlJohan_Slack_export_Feb_23_2021-Mar_24_2021/general before_team1.txt
  2. The script iterates over the JSON files in the input folder KarlJohan_Slack_export_Feb_23_2021-Mar_24_2021/general and exports the messages from the members specified in the input team file before_team1.txt to a folder with the same name as the input folder with _lsm appended: general_lsm. It removes user mentions to anonymize the text, and removes colons from emojis to retain the emoji text and their meaning.

  3. The output in this folder can be processed with a dictionary such as LIWC to get:

    • The total word count
    • The percentage of total words in the text that match each of the dictionary categories that are relevant for calculating the LSM score

The KarlJohan_Slack_export_Feb_23_2021-Mar_24_2021/general_lsm folder is an example output with a spreadsheet that can be used as a template to calculate the LSM score.

Team Performance

Team performance is based on team efficiency comparisons using DEA (Data Envelopment Analysis).

Git Contributions

To get git contributions during two time periods, use the gitlab.sh script:

gitlab.sh [metadata_file]

Team Efficiency via DEA

The team_efficiency repository contains R code for doing DEA calculations.

slack_export_parsing's People

Contributors

karl-johan-grahn avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

slack_export_parsing's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/pull_request.yaml
  • stakater/.github v0.0.85
  • actions/checkout v4
  • actions/setup-python v5
  • julianwachholz/flake8-action v2

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.