One does not simply do Data Science - Everyday graphs using R (Part 1)
Graphs and charts using R

One does not simply do Data Science - Everyday graphs using R (Part 1)

Working with data demands value generation. There is an urgent need to draw stories, color the numbers in patterns which can help in indicating lows and highs, constants and spikes. More data and no analysis makes Jack a dull boy. Okay without much ado, I would refer to first few things to understand when you are doing graphs, plots and stories.

1. Which chart to use.                  

I always refer to this beautiful chart, helpful in channeling my approach towards data and charts. Thanks to AndrewAbela.

2. Know your audience.

Decide well before which team is actually viewing the data; the marketing team, the tech team or the C-C-level officers and then frame the story according to the needs.

3. In what context do we want to use the data?

Simple analysis, some graphs can be helpful, building a story might be useful or landing up with some keypoints.


R is an open source tool to play around with the datasets and visualize important insights in form of charts and graphs. Few easy code snippets for everyday charts that can be created with R. Below is the test data to run the code and create some easy visualizations.


STACKED BAR CHART:

library("ggplot2")

df <- data.frame(

 group = c("PDF", "CSV", "ZIP", "HTML"),

 value = c(60, 20, 5, 15)

)

bp<- ggplot(df, aes(x="", y=value, fill=group))+

 geom_bar(stat = "identity")

print(bp)


BAR CHART:

library("ggplot2")

df <- data.frame(

 group = c("PDF", "CSV", "ZIP", "HTML"),

 value = c(60, 20, 5, 15)

)

bp<- ggplot(df, aes(x=group, y=value, fill=group))+

 geom_bar(stat = "identity")

print(bp)


PIE CHART:

library("ggplot2")

df <- data.frame(

 group = c("PDF", "CSV", "ZIP", "HTML"),

 value = c(60, 20, 5, 15)

)

bp<- ggplot(df, aes(x="", y=value, fill=group))+

 geom_bar(stat = "identity")+

 coord_polar("y")

print(bp)


You can take a quick peek at TechCouple for how to start using R.

Simple and easy to try graphs, don't forget to install "ggplot2" library before you run the codes. Worth bookmarking to modify simple ones into more interesting charts.

要查看或添加评论,请登录

Anshika (un-shi-ka) Agarwal的更多文章

  • How to catch the tail ?

    How to catch the tail ?

    Working on data analysis, predictive analytics, strategy modelling or product management. In today’s digital ecosphere…

    1 条评论
  • ALIENS of the online world?

    ALIENS of the online world?

    Digital Presence in form of websites and online presence provides substantial bot activities. Bots can be helpful for…

  • Native Apps vs Hybrid Apps (uno)

    Native Apps vs Hybrid Apps (uno)

    Mobile usage as seeing an incessant push since last few years. To trust the statistics, it up at 52% with respect to…

  • Shoe that fit all sizes

    Shoe that fit all sizes

    I can’t carry my desktop or my laptop in an #Uber but still want to shop that crazy hat for the next pool party. Ouch –…

  • GDPR - "the elephant in the room"

    GDPR - "the elephant in the room"

    Facts about GDPR ?What is GDPR? The General Data Protection Regulation (GDPR) ensures that people’s data is protected…

  • Questionable ? Difference between Data Analytics and Business Intelligence

    Questionable ? Difference between Data Analytics and Business Intelligence

    Data Analytics This helps in building essential data capturing architecture for future forecasted and how to do it or…

    1 条评论
  • "Caught My Eye" - Let's talk about "Content Writing"

    "Caught My Eye" - Let's talk about "Content Writing"

    Quick tips to write that blog you have been thinking about for quite sometime now or writing a product description or…

  • Merging and Cleaning the data using R

    Merging and Cleaning the data using R

    R is a suitable option to build out of data oriented problems and create a suitable solution irrespective of your…

    2 条评论
  • Data Scientist VS Data Analyst - A very common question that makes you think!

    Data Scientist VS Data Analyst - A very common question that makes you think!

    Data Scientist Innovating and figuring ways to fetch, build and create data sets. Technical background, knowledge of…

  • R for your data needs, try it now !

    R for your data needs, try it now !

    R can be your saving boat, the ship in the sea and the solid road towards data extraction and manipulation as and when…

    3 条评论

社区洞察

其他会员也浏览了