Automating our work away One consulting firms experience with - - PowerPoint PPT Presentation

automating our work away
SMART_READER_LITE
LIVE PREVIEW

Automating our work away One consulting firms experience with - - PowerPoint PPT Presentation

Automating our work away One consulting firms experience with RMarkdown Finbarr Timbers 1 2 Outline 1. About Darkhorse Analytics 2. Problems we faced 3. How we solved those problems 4. How you can improve R(Markdown) adoption 3 4 5 6


slide-1
SLIDE 1

Automating our work away

One consulting firm’s experience with RMarkdown

Finbarr Timbers

1

slide-2
SLIDE 2

2

slide-3
SLIDE 3

Outline

  • 1. About Darkhorse Analytics
  • 2. Problems we faced
  • 3. How we solved those problems
  • 4. How you can improve R(Markdown) adoption

3

slide-4
SLIDE 4

4

slide-5
SLIDE 5

5

slide-6
SLIDE 6

6

slide-7
SLIDE 7

Problems

7

slide-8
SLIDE 8

Problems

  • 1. It takes a lot of time to replicate, which is a problem when

rework happens (>50 slides!). We’ve had 3 month projects with 1 month consumed by rework.

8

slide-9
SLIDE 9

Problems

  • 1. It takes a lot of time to replicate, which is a problem when

rework happens (>50 slides!). We’ve had 3 month projects with 1 month consumed by rework.

  • 2. All styled differently. We need to edit every plot individually.

9

slide-10
SLIDE 10

Problems

  • 1. It takes a lot of time to replicate, which is a problem when

rework happens (>50 slides!). We’ve had 3 month projects with 1 month consumed by rework.

  • 2. All styled differently. We need to edit every plot individually.
  • 3. No documentation on how to replicate.

10

slide-11
SLIDE 11

Instead? R!

11

slide-12
SLIDE 12

What we did:

12

slide-13
SLIDE 13

What we did:

  • 1. Use RMarkdown to write template (“best practice”) slides.

13

slide-14
SLIDE 14

What we did:

  • 1. Use RMarkdown to write template (“best practice”) slides.
  • 2. Made the slides accessible to the company (we used Git +

Bitbucket).

14

slide-15
SLIDE 15

What we did:

  • 1. Use RMarkdown to write template (“best practice”) slides.
  • 2. Made the slides accessible to the company (we used Git +

Bitbucket).

  • 3. Made it easy to run in other environments (we used installation

scripts; moving to Docker)

15

slide-16
SLIDE 16

What we did:

  • 1. Use RMarkdown to write template (“best practice”) slides.
  • 2. Made the slides accessible to the company (we used Git +

Bitbucket).

  • 3. Made it easy to run in other environments (we used installation

scripts; moving to Docker)

  • 4. Iterate (we used Git).

16

slide-17
SLIDE 17

What we did:

  • 1. Use RMarkdown to write template (“best practice”) slides.
  • 2. Made the slides accessible to the company (we used Git +

Bitbucket)

  • 3. Made it easy to run in other environments (we used installation

scripts; moving to Docker)

  • 4. Iterate (we used Git).
  • 5. Publish as a package (yet to happen).

17

slide-18
SLIDE 18

R:

darkhorse_histogram = function(df, x_var, x_breaks, x_label, y_var, y_breaks, y_label, title, col="#E69F00") { ggplot(df, aes_string(x = x_var, y = y_var)) + ggtitle(title) + geom_bar(fill=col, stat = "identity") + geom_hline(yintercept= 0, colour=col) + darkhorse_theme() + ylab(y_label) + xlab(x_label) + scale_y_continuous(breaks=y_breaks) geom_hline( yintercept=y_breaks[2:length(y_breaks)], color="white") + scale_x_continuous(breaks=x_breaks) }

18

slide-19
SLIDE 19

Go from. . .

19

slide-20
SLIDE 20
  • To. . .

2 4 6 8 10 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Minutes from Home to Station Headcount

Part Time Responders

20

slide-21
SLIDE 21

Also: SQL

SELECT * FROM (SELECT CASE WHEN Call_Type NOT IN ('Medical', 'Fire', 'Fire Alarm Ringing ELSE Call_Type END AS CallType, CallID, Year FROM ERA_TFS.dbo.Calls_Template WHERE Qualified_Event = 1) t PIVOT (COUNT(CallID) FOR Year IN ([2012], [2013], [2014])) pvt

21

slide-22
SLIDE 22

Vehicle Incident Fire Other Fire Alarm Ringing Medical

20000 40000 60000 2012 2013 2014

Calls

22

slide-23
SLIDE 23

Lessons

  • 1. Make it great.

23

slide-24
SLIDE 24

Lessons

  • 1. Make it great.
  • 2. Make it easy.

24

slide-25
SLIDE 25

Lessons

  • 1. Make it great.
  • 2. Make it easy.
  • 3. Make it profitable.

25