zurich r user group presentation may 2016

14
OrganizationView A case study of our work with Salt USING R TO AUTOMATE REPORTING

Upload: andrew-marritt

Post on 11-Feb-2017

276 views

Category:

Business


2 download

TRANSCRIPT

Page 1: Zurich R user group presentation May 2016

OrganizationView

A case study of our work with Salt

USING R TO AUTOMATE REPORTING

Page 2: Zurich R user group presentation May 2016

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

Page 3: Zurich R user group presentation May 2016

R is the core of what we do

Our process

Workometry

Collect data Clean & create numbers / graphics

file organizationlayout

Page 4: Zurich R user group presentation May 2016

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

Page 5: Zurich R user group presentation May 2016

Survey can be used on mobile or desktop devices

Capturing the data

Page 6: Zurich R user group presentation May 2016

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) > filtersurveydataontheseemployees > Create graphs / numbers needed for report (a function with embedded functions) > writelinetocsvwiththenumbers/filename > }

Process within R

Page 7: Zurich R user group presentation May 2016

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%

2014

H1

2014

H2

2015

H1

2015

H2

QuestionI 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/PAMEast n=9

DSF/PAMWest n=6

SoHo/Smalln=11

I am always told aboutthings that might affect

me.

I feel my manager caresabout me.

I get regular coachingand development from my

manager.

I have the material andequipment to do my job.

I would recommend Saltas a great place to

work.

Our values give meguidance on how to do my

work.

−20%

−10% 0% 10%

20%

−20%

−10% 0% 10%

20%

−20%

−10% 0% 10%

20%

Page 8: Zurich R user group presentation May 2016

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

Department 1

Department 2

Small & Unhappy

Small & happy

Something Finance

0%

25%

50%

75%

100%

0 100

200

300

Page 9: Zurich R user group presentation May 2016

Input is a csv. Image filename is used, image stored locally.

Indesign used to ‘mailmerge’ data into documents

Page 10: Zurich R user group presentation May 2016

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

Page 11: Zurich R user group presentation May 2016

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

Page 13: Zurich R user group presentation May 2016

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

Page 14: Zurich R user group presentation May 2016

OrganizationView

Questions?

Twitter : AndrewMarrittLinkedIn: https://ch.linkedin.com/in/andrewmarritt Website: www.organizationview.com