filmov
tv
R Tutorial : Interactive Data Visualization with rbokeh

Показать описание
---
Hi I am Omayma Said and welcome to the "interactive data visualization with rbokeh" course.
n this course, We will focus on rbokeh; a library for interactive web-based plots.
It is the R interface for the python library Bokeh.
and it is mainly written and maintained by Ryan Hafen.
But Why R bokeh?
rbokeh enables you to create different types of interactive plots.
It allows you and your audience to get more info through ineracting with the plots. The output can shared, embedded in HTML documents or used in web applications.
Since data visualization is an integral part of the data analysis process and a means of communication, the visulaizations should be:
- Self explanatory through the use of (colors, titles, labels, and other visual elements)
- Informative to deliver a certain message easily and
- Persuasive to emphasize the results of an analysis
In this course, we will start by the basics of rbokeh plots in chapter one.
In chapter two, you will learn how to customize your figures using aesthetic attributes and figure options.
In chapter three, you will learn how to put your data in the right format to fit the desired figure.
Finally, in chapter four, you will learn how to combine multiple figures in one layout using grid plots and how to create interactive maps.
In order to create the right types of visualizations to convey your message, you usually need to put your data in the desired format.
In this course we will mainly use the Tidyverse packages like dplyr and tidyr for data manipulation.
So if you are not very familiar with them, you can find introductory tidyverse courses on DataCamp.
But don't worry we'll have a quick refresher for the most important functions which we'll use throughout the course.
Let's start with the gapminder dataset which contains a subset of the Gapminder data on life expectancy, GDP per capita, and population by country.
Note that the library and the dataset have the same name.
If you want to plot life expectancy vs gdp per capita for a particular year, let's say 2002, you will need to extract the corresponding entries.
To achibve this, you pass the gapminder to the filter function, and use the condition year == 2002, to get a new dataframe including only the records in 2002.
Remember that you can use the pipe operator which is written as (percentage - larger than - percentage) to pass what's on the left as a first argument to the function on the right.
You can use the resulting dataframe to plot the 2002 entries as shown this scatter plot. You will learn how to create such plots in the next lessons.
Another useful function is mutate(). You will frequently use it to modify columns or create new ones in a dataframe.
For instance, if you want to create a column with country population in Millions, you can divide pop by 10^6 and assign to a new variable pop_millions, which will appear in a new column as shown in the resulting dataframe.
Now it's time to practice.
#DataCamp #RTutorial #InteractiveDataVisualizationwithrbokeh