0% found this document useful (0 votes)
4 views12 pages

Data Science Tools: Combining Data Sources

Uploaded by

Sumit Kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

Data Science Tools: Combining Data Sources

Uploaded by

Sumit Kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tools in Data Science

Instructor Anand S
Tutorial Instructor Prasanna S
Indian Institute of Technology, Madras
Multiple Data Source
(Refer Slide Time: 00:13)

Hi, everyone. Welcome to the second section of this tutorial. In the previous section, we
install Tableau and build basic charts using a single data source. In this section, we will try to
add a data source and try to create a combined chart using both data sources.

(Refer Slide Time: 00:32)


To establish a new connection, we have to go back to the Data Source section and add a new
connection. So, we have created another CSV file called an audience, which maps the target
audience with the TV ratings. Once we select the file, the connection gets established. And
we can also see the table available below. To join the new table with the existing table, it has
to be a drag and drop.

One-Stop, we see that there is an error in the mapping or joining this is because we have not
notified the mapping fields. Since this new table was prepared on ratings, we have to map
ratings from Netflix shows CSV to ratings in the audience. So, once the relationship is
established, we see that the connection is strong, and then we can move on to create a new
worksheet.

(Refer Slide Time: 01:31)


Once we create a new worksheet, we can see that the new table audience dot CSV is also
available for us, in our work area. Let us say to create a treemap based on audience. We have
an audience here and pulling the content count and developing a treemap. Here the treemap
shows a majority of content is available for adults. Let us try to label the specific contents.
We are adding a label here again, from the count and the label we are having again a
percentage total, which you have done already. Now, this shows the totality of the contents
that are available on Netflix.

(Refer Slide Time: 02:28)

Let us add production country as a color filter. Now, this treemap is highly congested and we
can see that each color denotes a particular country. This will become evident when we move
on and build a dashboard right now let us keep this chart as it is. Let us say Audience -
TreeMap.
(Refer Slide Time: 02:54)

Let us create a new field based on the score. We have something called the IMDB score. Let
us see what is the range. We can say that if we click average, we see an average of 6.5 as a
score, and the IMDb score ranges from 0 to 10.

(Refer Slide Time: 03:33)

Let us try to create a new field called a review. To create a new field, we can always go to the
table section and right-click and create a new field. Let us create something called a review.
Let us say if my IMDb score is less than or equal to 6.5 then I consider the review to be bad.
If my IMDb score is greater than 6.5 and my IMDb score is less than 8 then average. As, if
IMDb score is greater than or equal to 8, then good, else null end. As you type we can see
that it shows calculation contains errors and we also have the error term because good has to
be referenced as a string. We have a reference as a string and the calculation is valid. So, let
us create this new field.

(Refer Slide Time: 04:57)

Now we have a new dimension field called a review. Let us say to use this review and find
out how the movies and the contents lists which are TV shows and movies are distributed
across different months. What is a review as per IMDb? Let us take the field called month
added. And then let us add the total content of shows. Now we see that most of those shows
do not have data. But still, we can exclude the nulls. And we will quickly focus on non-null
values for this chart. If we see, it is clear that content has been huge during April, June, and
October. Now, let us see how the content has been reviewed or what is the response from
IMDb and the users.
(Refer Slide Time: 06:01)

You can add this review as a color. Now, what I see is a stacked bar chart, which shows the
distribution of average bad and good content across different months. Let me keep it as
Content Month - Stacked.

(Refer Slide Time: 06:33)


Now, let us jump on to the first section, which is content rating. Already, we saw something
called filters, which is based on movies. So, we tried to add that in duration where we
selected only movies. Let us have one more filter based on production country. I am adding a
filter called production country. The moment we add it gives a prompt window and then it
asks us what kind of filter has to be done. Earlier we chose the movie, once the field which is
selected will get filtered and the data will get populated accordingly. Now, let us select all.

(Refer Slide Time: 07:12)

This now includes the entire data. There is an option by which we can use this filter as a
drop-down or a front end for a front-end visualization. The moment we right-click the filter
and click show it shows the filter as one of the buttons available in the chart. On the right, we
see the different countries with checkboxes. There are different options by which we can
have this button.

(Refer Slide Time: 07:45)


Let us select a single value dropdown. With a single value drop-down, we can select one
particular country. So, let us select China. In this way, we can modify the graph for the
particular country. Right now, we have 6 different charts populated, and we have one filter
which is added to the first chart. Now, there is a special option by which we can have this
filter across all the charts that are using the same data source.

(Refer Slide Time: 08:16)


If you right-click on the filter and apply it to worksheets, and the moment we click all using
this data source, the entire chart, which we prepared all the charts, which we prepared gets
filtered by the specific country which we have here.

(Refer Slide Time: 08:36)


Let us see the treemap which we will for different countries. Now, we can see that it is
filtered only for China. These are the different options and filters that are available for
individual charts. Let us see how we can format and beautify an existing chart. For instance,
let me take this particular audience treemap. So, this treemap has a title. And to edit a title,
you can click and edit the title directly. Audience distribution and they can use it like any
other text formatting.

(Refer Slide Time: 09:24)

Now we see that the title has been edited. And here I see the percentage is been rounded off
to two decimals. But if we want to remove all the decimals, still, I can go back to that
particular field. This corresponds to the label here.
(Refer Slide Time: 09:41)

We can right-click and format. And, once we format it has lots of options. Let us focus on the
percentage format alone. Now we can see the format is happening. Similarly, we can make
changes to every graph and then finally added to a dashboard.

You might also like