Giter VIP home page Giter VIP logo

draw-organization-chart-with-r's Introduction

Draw-Organization-Chart-with-R

Blog Post: http://haoshawang.com/blog/how-to-draw-organization-chart-with-r/

Spreadsheets are great when the data size is small. I recently have helped one of our PM drawing organization chart with R and feel this is a good example to show the power and simplicity of R.

In this post, I have used a sample dataset and you can download from HERE.

Here is my intuitive solution after read data into R.

  1. Created a temp data frame as data input excluded unnecessary columns. Columns in my data input:

EmpID: Unqiue Identifier for employee EmpName: Employee name. In this case, the PM has preprocessed it and they are unique names. EmpTitle: Employee Title EmpManager: Manager’s name this employee reports to EmpDept: Employee’s department FloorNum: Employee Offie ID. This is the primary key to identify which office employee is at. 2. I used merge function from base to get manager’s titles.

  1. Tweak and create a data frame as data input.

  2. Use igraph packages to plot the organization chart.

6*. Another function if we want to draw organization chart by department

draw-organization-chart-with-r's People

Contributors

elsawhs avatar

Watchers

KTA avatar

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.