Competition - Employee Network Analysis
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    How can the company improve collaboration?

    📖 Background

    You work in the analytics department of a multinational company, and the head of HR wants your help mapping out the company's employee network using message data.

    They plan to use the network map to understand interdepartmental dynamics better and explore how the company shares information. The ultimate goal of this project is to think of ways to improve collaboration throughout the company.

    💾 The data

    The company has six months of information on inter-employee communication. For privacy reasons, only sender, receiver, and message length information are available (source).

    Messages has information on the sender, receiver, and time.
    • "sender" - represents the employee id of the employee sending the message.
    • "receiver" - represents the employee id of the employee receiving the message.
    • "timestamp" - the date of the message.
    • "message_length" - the length in words of the message.
    Employees has information on each employee;
    • "id" - represents the employee id of the employee.
    • "department" - is the department within the company.
    • "location" - is the country where the employee lives.
    • "age" - is the age of the employee.

    Acknowledgments: Pietro Panzarasa, Tore Opsahl, and Kathleen M. Carley. "Patterns and dynamics of users' behavior and interaction: Network analysis of an online community." Journal of the American Society for Information Science and Technology 60.5 (2009): 911-932.

    Executive Summary

    • Sales, Admin and Operations departments in US and France contribute the most to interdepartmental dynamics

    • Recommended increase of contribution from support departments (Admin, Operations) located in Brazil and Germany

    • Recommended increased cooperation between well communicated US support departments (Admin, Operations) and poorly communicated support departments from Brazil and Germany in order to share best practices of how to provide more support for Sale department within their countries

    • Investigate reasons why employees working in some departments (e.g. UK IT, UK Operations, France Marketing) do not use online social network at all


    I. Explanatory data analysis

    I.1 Organization structure

    Based on the information provided on inter-employee communication, the company has 664 employees and offices located in five countries:

    • Brazil (BRA)
    • France (FRA)
    • Germany (GER)
    • United Kingdom (UK)
    • United States (US)

    As per company social network US branch employs the biggest number of people (277), whereas Brazil the smallest (66).

    The company has six departments:

    • Sales (161 network users)
    • Admin (140)
    • Operations (134)
    • Engineering (100)
    • IT (77)
    • Marketing (52)

    Considering employees located in different countries and working for different departments, company's corporate structure looks decentralized. All five offices have similar department structure with similar proportion of employees working for a particular department across different locations.

    Hidden code

    I.2 Messages

    Some initial observations regarding messages both sent and received include:

    • employees from France Sales, France Admin and US Operations send the highest number of messages per person
    • employees from UK Sales and Germany Sales receive the highest number of messages per person
    • surprisingly, employees from UK (Engineering, Marketing, Operations, IT) have not sent any messages in the period covered in the database (despite the fact that they receive some)
    • regardless of location, people from Engineering, Marketing and IT receive many more messages than they sent
    Hidden code
    Hidden code

    I.3 Messages sent

    I.3.a Location

    When a message is being sent within the organization, the most probable destination is United States followed by France and the least probable is Brazil. This phenomenon refers to each location from which massages are sent except UK, from where messages are mostly being sent either to Germany or to UK.

    Surprisingly small fraction (3%) of messages sent from Brazil goes to Brazil

    options(repr.plot.width=7, repr.plot.height=6)
    
    messagesLocations <- messages %>%
      left_join(employees, by = c('sender' = 'id')) %>%
      rename(locationSent = location) %>%
      left_join(employees, by = c('receiver' = 'id')) %>%
      rename(locationReceived = location) %>%
      select(locationSent,locationReceived)
    
    locationsPlot <- messagesLocations %>% 
      count(locationReceived, locationSent) %>%
      group_by(locationSent) %>%
      mutate(pct = round(n / sum(n),2), pct = round(pct,3)) %>% 
      ggplot(aes(y = locationSent, x = pct, fill = locationReceived, label = paste0(locationReceived,' ',pct*100,'%'))) + 
      geom_col(width = 0.5, position = position_dodge(0.7), alpha = 0.5, show.legend = FALSE) + 
      geom_text(width = 0.5, position = position_dodge(0.7),
                hjust = -0.2, vjust = 0.4, 
                size = 3) + 
      scale_x_continuous(labels = percent, limits = c(0,0.6)) + 
      theme_minimal() +
      xlab('% Messages sent to') +
      ylab('Messages sent from') +
      ggtitle('Fig_3: Proportion of messages sent by a branch to other branches') +  
      scale_fill_brewer(palette="Dark2") +
      theme(plot.title=element_text(size = 10,  hjust=0.5, color = '#333232'),
            axis.text.x = element_blank(),
            axis.ticks.x = element_blank(),
            #axis.title.x = element_blank()
      ) +
      annotate("curve", x = 0.5, y = 4.6,
               xend = 0.35, yend = 4.9,
               arrow = arrow(length = unit(0.2, "cm"), type = "closed"),
               color = "grey") +
      annotate("text", x = 0.5, y = 4.6,
               label =  " e.g. 27% of all mesages sent from \n US goes to France",
               vjust = 1, size = 3, color = "darkgrey")
    
    
    Hidden code

    I.3.b Department

    The most probable department destination of a message sent is Sales department followed by Operations and Admin.

    Interestingly none of the messages sent by Marketing department went to Marketing department.

    Hidden code