OrganizationView
A case study of our work with Salt
USING R TO AUTOMATE REPORTING
From a presentation that the CHRO of Salt (then Orange) gave in 2014
What we have achieved
Measurement / KPI 2013 Target Achieved
Faster report
production
1 week 1 day 1 hour
Reduced error rate 10 2 / 3 1
Reduced number of
manager enquiries
10 5 2
R is the core of what we do
Our process
Workometry
Collect data Clean & create
numbers / graphics
file organizationlayout
We view the organization as a graph (tree). Graph metrics can then be used to identify groups for analysis / reporting purposes. The
graph visualisation can be scaled / coloured to show various data such as demographics (age, gender, performance) and survey scores.
Using igraph to determine relevant teams
Survey can be used on mobile or desktop devices
Capturing the data
High-level approach to the code
>> Build a tree of the organization (client provides a CSV before survey
starts)
>> Download survey data from BigQuery
>> Do any data cleaning / transformation
>> Loop {
>> 	 Identify manager where n=1 neighbourhood >= minimum reporting level
>> 	 Identify from igraph object the employees in his / her team
(neighbourhood)
>> 	 filter survey data on these employees
>> 	 Create graphs / numbers needed for report (a function with embedded
functions)
>> 	 write line to csv with the numbers / filename
>> }
Process within R
We have a reduced set of chart types, each defined within a funtion. We use dplyr to create the relevant summary table and then
send this table to the relevant plotting function. The function returns the ggplot graphic which is then saved.
12%
42%
35%
0%
8%
4%
0%
25%
50%
75%
100%
2014H1
2014H2
2015H1
2015H2
Question
I am always told about things that might affect me.
I feel my manager cares about me.
I get regular coaching and development from my manager.
I have the material and equipment to do my job.
I would recommend Salt as a great place to work.
Our values give me guidance on how to do my work.
LOTS of graphs produced, but only a few types
AVERAGE
Our values give me guidance on how to do my work.
I have the material and equipment to do my job.
I feel my manager cares about me.
I am always told about things that might affect me.
I get regular coaching and development from my manager.
I would recommend Salt as a great place to work.
0%
25%
50%
75%
100%
Our values give me guidance on how to do my work.
I would recommend Salt as a great place to work.
I am always told about things that might affect me.
I have the material and equipment to do my job.
I feel my manager cares about me.
I get regular coaching and development from my manager.
0%
25%
50%
75%
100%
DSF/PAM
East n=9
DSF/PAM
West n=6
SoHo/
Small
n=11
I am always told about
things that might affect
me.
I feel my manager cares
about me.
I get regular coaching
and development from my
manager.
I have the material and
equipment to do my job.
I would recommend Salt
as a great place to
work.
Our values give me
guidance on how to do my
work.
−20%
−10%
0%
10%
20%
−20%
−10%
0%
10%
20%
−20%
−10%
0%
10%
20%
Funnel plots for comparing institutional performance
David Spiegelhalter, Statistics in Medicine, Statist. Med.
2005; 24:1185–1202
We wanted to use a funnel plot to show where action was needed - client didn’t understand this!
Clients don’t always agree
Region 4
Region 1
Region 3
Region 2
Department 3
Department1
Department2
Small & Unhappy
Small & happy
Something Finance
0%
25%
50%
75%
100%
0
100
200
300
Input is a csv. Image filename is used, image stored locally.
Indesign used to ‘mailmerge’ data into documents
Manager reports are based on a standard template. We use Salt’s branded design theme (used for external presentations)
We typically need to produce ~100 reports
Chord diagram of topic co-occurence in a question
created using package chorddiag.
We believe that understanding text is the key to employee feedback. We prototype in R. Code can be the best way to share
specifications with programmers using other languages.
A focus on text - building out Workometry
See the event report.
We’ve learnt a lot by doing this
•	 Getting a process production-ready using R is harder than you think
•	 Data quality is key - always collect data with analysis in mind
•	 Functions greatly improve the code length but can be harder to debug
•	 Use styles in ggplot. Consider developing a house style
•	 R evolves - there is probably a time when you want to re-write code
•	 Never assume that what you think is intuitive & easy to understand is what your audience will find intuitive & easy
Lessons learnt
OrganizationView
Questions?
Twitter: 		 AndrewMarritt
LinkedIn:		 https://ch.linkedin.com/in/andrewmarritt
Website: 		 www.organizationview.com

Zurich R user group presentation May 2016

  • 1.
    OrganizationView A case studyof our work with Salt USING R TO AUTOMATE REPORTING
  • 2.
    From a presentationthat the CHRO of Salt (then Orange) gave in 2014 What we have achieved Measurement / KPI 2013 Target Achieved Faster report production 1 week 1 day 1 hour Reduced error rate 10 2 / 3 1 Reduced number of manager enquiries 10 5 2
  • 3.
    R is thecore of what we do Our process Workometry Collect data Clean & create numbers / graphics file organizationlayout
  • 4.
    We view theorganization as a graph (tree). Graph metrics can then be used to identify groups for analysis / reporting purposes. The graph visualisation can be scaled / coloured to show various data such as demographics (age, gender, performance) and survey scores. Using igraph to determine relevant teams
  • 5.
    Survey can beused on mobile or desktop devices Capturing the data
  • 6.
    High-level approach tothe code >> Build a tree of the organization (client provides a CSV before survey starts) >> Download survey data from BigQuery >> Do any data cleaning / transformation >> Loop { >> Identify manager where n=1 neighbourhood >= minimum reporting level >> Identify from igraph object the employees in his / her team (neighbourhood) >> filter survey data on these employees >> Create graphs / numbers needed for report (a function with embedded functions) >> write line to csv with the numbers / filename >> } Process within R
  • 7.
    We have areduced set of chart types, each defined within a funtion. We use dplyr to create the relevant summary table and then send this table to the relevant plotting function. The function returns the ggplot graphic which is then saved. 12% 42% 35% 0% 8% 4% 0% 25% 50% 75% 100% 2014H1 2014H2 2015H1 2015H2 Question I am always told about things that might affect me. I feel my manager cares about me. I get regular coaching and development from my manager. I have the material and equipment to do my job. I would recommend Salt as a great place to work. Our values give me guidance on how to do my work. LOTS of graphs produced, but only a few types AVERAGE Our values give me guidance on how to do my work. I have the material and equipment to do my job. I feel my manager cares about me. I am always told about things that might affect me. I get regular coaching and development from my manager. I would recommend Salt as a great place to work. 0% 25% 50% 75% 100% Our values give me guidance on how to do my work. I would recommend Salt as a great place to work. I am always told about things that might affect me. I have the material and equipment to do my job. I feel my manager cares about me. I get regular coaching and development from my manager. 0% 25% 50% 75% 100% DSF/PAM East n=9 DSF/PAM West n=6 SoHo/ Small n=11 I am always told about things that might affect me. I feel my manager cares about me. I get regular coaching and development from my manager. I have the material and equipment to do my job. I would recommend Salt as a great place to work. Our values give me guidance on how to do my work. −20% −10% 0% 10% 20% −20% −10% 0% 10% 20% −20% −10% 0% 10% 20%
  • 8.
    Funnel plots forcomparing institutional performance David Spiegelhalter, Statistics in Medicine, Statist. Med. 2005; 24:1185–1202 We wanted to use a funnel plot to show where action was needed - client didn’t understand this! Clients don’t always agree Region 4 Region 1 Region 3 Region 2 Department 3 Department1 Department2 Small & Unhappy Small & happy Something Finance 0% 25% 50% 75% 100% 0 100 200 300
  • 9.
    Input is acsv. Image filename is used, image stored locally. Indesign used to ‘mailmerge’ data into documents
  • 10.
    Manager reports arebased on a standard template. We use Salt’s branded design theme (used for external presentations) We typically need to produce ~100 reports
  • 11.
    Chord diagram oftopic co-occurence in a question created using package chorddiag. We believe that understanding text is the key to employee feedback. We prototype in R. Code can be the best way to share specifications with programmers using other languages. A focus on text - building out Workometry
  • 12.
  • 13.
    We’ve learnt alot by doing this • Getting a process production-ready using R is harder than you think • Data quality is key - always collect data with analysis in mind • Functions greatly improve the code length but can be harder to debug • Use styles in ggplot. Consider developing a house style • R evolves - there is probably a time when you want to re-write code • Never assume that what you think is intuitive & easy to understand is what your audience will find intuitive & easy Lessons learnt
  • 14.
    OrganizationView Questions? Twitter: AndrewMarritt LinkedIn: https://ch.linkedin.com/in/andrewmarritt Website: www.organizationview.com