Intro to Data Visualization with R & ggplot2




[ad_1]

The R programming language is experiencing rapid increases in popularity and wide adoption across industries. This popularity is due, in part, to R’s rich and powerful data visualization capabilities. While tools like Excel, Power BI, and Tableau are often the go-to solutions for data visualizations, none of these tools can compete with R in terms of the sheer breadth of, and control over, crafted data visualizations.

As an example, R’s ggplot2 package provides the R programmer with dozens of print-quality visualizations – where any visualization can be heavily customized with a minimal amount of code.

In this webinar we will provide an introduction to data visualization with the ggplot2 package. The focus of the webinar will be using ggplot2 to analyze your data visually with a specific focus on discovering the underlying signals/patterns of your business.

Attendees will learn how to:

• Craft ggplot visualizations, including customization of rendered output.

• Choose optimal visualizations for the type of data and the nature of the analysis at hand.

• Leverage ggplot2’s powerful segmentation capabilities to achieve “visual drill-in of data”.

• Export ggplot2 visualizations from RStudio for use in documents and presentations.

Repository:
https://code.datasciencedojo.com/datasciencedojo/tutorials/tree/master/Introduction%20to%20Data%20Visualization%20with%20R%20and%20ggplot2

Watch more community talks:
https://tutorials.datasciencedojo.com/category/community-talks/

Learn more about Data Science Dojo here:
https://datasciencedojo.com/data-science-bootcamp/

Watch the latest video tutorials here:
https://tutorials.datasciencedojo.com/

See what our past attendees are saying here:
https://datasciencedojo.com/reviews/

Like Us: https://www.facebook.com/datasciencedojo/
Follow Us: https://twitter.com/DataScienceDojo
Connect with Us: https://www.linkedin.com/company/data-science-dojo

Also find us on:
Instagram: https://www.instagram.com/data_science_dojo/

#rtutorial #datavisualization #rprogramming

Source


[ad_2]

Comment List

  • Data Science Dojo
    January 3, 2021

    what a load of unnecessary talking…. 25 minutes of not needed introduction. 5 minutes to tell why passengerID and name are not relevant…. get to the point already…

  • Data Science Dojo
    January 3, 2021

    An excellent video! Thanks a lot!

  • Data Science Dojo
    January 3, 2021

    DATA SCIENCE DOJO Piliz share the R code , my not running properly

  • Data Science Dojo
    January 3, 2021

    Isn't there a mistake in the axis description of the last histogram?

  • Data Science Dojo
    January 3, 2021

    Wait a minute, I am gonna update my linked In bio to R expert

  • Data Science Dojo
    January 3, 2021

    Such a wonderful video!!!So simple and easy way to make it understand

  • Data Science Dojo
    January 3, 2021

    Wow, the Best video on ggplot2. Love you Data Science Dojo. So very much helpful and really got me excited.

  • Data Science Dojo
    January 3, 2021

    oh man I can't thank enough, you are so good I lost my mind in understanding u hold my back, thanks

  • Data Science Dojo
    January 3, 2021

    Excellent!

  • Data Science Dojo
    January 3, 2021

    Thank you so much..

  • Data Science Dojo
    January 3, 2021

    Very good!

  • Data Science Dojo
    January 3, 2021

    Thank you very much for your explanation.

  • Data Science Dojo
    January 3, 2021

    I loaded the dataset in both SPSS and R and did all of the plots – to me SPSS was more easy to use, but the plots actually look better in R. Great video.

  • Data Science Dojo
    January 3, 2021

    Thank you for this video, it was indeed helpful. Didn't have sufficient knowledge in ggplots but now i do. Thanks a lot!

  • Data Science Dojo
    January 3, 2021

    Wow. Thanks

  • Data Science Dojo
    January 3, 2021

    Thanks a ton david …

  • Data Science Dojo
    January 3, 2021

    tq dojo

  • Data Science Dojo
    January 3, 2021

    Incredible, telling a story with data!

  • Data Science Dojo
    January 3, 2021

    Thank you so much for your video

  • Data Science Dojo
    January 3, 2021

    Thanks for the tutorial! Small caveats on the density plot and the histogram towards the end. The axes are mislabeled. Y should be probability density or counts, while X should be age

  • Data Science Dojo
    January 3, 2021

    Really thanks

  • Data Science Dojo
    January 3, 2021

    Here is all the code:

    library (ggplot2)

    titanic = read.csv("titanic.csv", stringsAsFactors = FALSE)

    View(titanic)

    # set up factors.

    titanic$Pclass = as.factor(titanic$Pclass)

    titanic$Survived = as.factor(titanic$Survived)

    titanic$Sex = as.factor(titanic$Sex )

    titanic$Embarked = as.factor(titanic$Embarked )

    ggplot(titanic,aes(x = Survived)) + geom_bar()

    geom_bar()

    prop.table(table(titanic$Survived)) #Compares who perished and who survived

    #create the same plot with title

    # We can use color to look at two aspects (i.e dimmensions)

    ggplot(titanic,aes(x = Sex, fill = Survived))+

    theme_bw() +

    geom_bar() +

    labs(y = "Passenger Count",

    title = "Titanic Survival Rates by Sex")

    # What was the survival rate bty calss of tickets

    ggplot(titanic,aes(x = Pclass, fill = Survived))+

    theme_bw() +

    geom_bar() +

    labs(y = "Passenger Count",

    title = "Titanic Survival Rates by P-Class")

    # 4 What was the survival Rates by class of ticket and gender?

    ggplot(titanic,aes(x = Sex, fill = Survived))+

    theme_bw() +

    facet_wrap(~Pclass)+

    geom_bar() +

    labs(y = "Passenger Count",

    title = "Titanic Survival Rates by P-Class and sex")

    # 5th What os the distribution of passenger ages?

    ggplot(titanic,aes(x = Age)) +

    theme_bw() +

    geom_histogram(binwidth = 5) +

    labs(y = "Passenger Count",

    x = "age (binwidth = 5)",

    title = "Titanic Age Distribution")

    # 6th question – What are the survival rates by age?

    ggplot(titanic,aes(x = Age, fill = Survived)) +

    theme_bw() +

    geom_histogram(binwidth = 5) +

    labs(y = "Passenger Count",

    x = "age (binwidth = 5)",

    title = "Titanic Age Distribution")

    #boxplot is another way of visualization

    ggplot(titanic,aes(x = Survived, y = Age)) +

    theme_bw() +

    geom_boxplot()+

    labs(x = "Age",

    y = "Survived",

    title = "Titanic Age Distribution")

    #use Facets for density plots

    ggplot(titanic,aes(x = Age, fill = Survived )) +

    theme_bw() +

    facet_wrap(Sex ~ Pclass) +

    geom_density(alpha = 0.5) +

    labs(x = "Age",

    y = "Survived",

    title = "Titanic Age Distribution")

    # you can tell the same story with a Histogram

    ggplot(titanic,aes(x = Age, fill = Survived )) +

    theme_bw() +

    facet_wrap(Sex ~ Pclass) +

    geom_histogram(binwidth = 5) +

    labs(x = "Age",

    y = "Survived",

    title = "Titanic Age Distribution")

  • Data Science Dojo
    January 3, 2021

    thanks very informative

  • Data Science Dojo
    January 3, 2021

    thanks for such good vedio. Loved it,

Write a comment