Professional Documents
Culture Documents
Modern conception of Data Science is the art and science of solving real world problems and for making data
driven decisions. To begin with, it involves an amalgamation of three aspects. These aspects are:
With the basic understanding of those three aspects, you can begin the journey of understanding Data
Science. With consistent effort, you can become fairly proficient in all three aspects over a period of time.
The document is intended to help you become comfortable with the finer nuances of Tableau (as a
platform for working on data).
What is Tableau?
Tableau is a platform for discovering, preparing, visualizing, and sharing data. It’s highly scalable and is
used by data science teams across all vertical markets.
Tableau Public is a free platform to explore, create, and publicly share data visualizations online.
Visualizations that have been published to Tableau Public (“vizzes”) can be embedded into web
pages and blogs, they can be shared via social media or email, and they can be made available
for download and exploration by other users. Visualizations are created in a browser by clicking
“Create a Viz” on your profile page. You can also create vizzes and publish to Tableau Public from
Tableau Desktop Professional or Public Edition –no programming skills are required
The company also offers add-ons (e.g., Tableau Data Management and Server Management), embedded
analytics, and developer tools like webhooks for advanced integrations, customizations, and automation.
As a more broad benefit, Tableau can be quite quick and simple to use. If you have a CSV file ready, you can
create a dashboard in minutes. This dashboard will include several sheets of different visualizations whether
that be a map, chart, or table (etc.). You can essentially drag and drop fields into your sheet and select
visualization.
Tableau: [https://www.tableau.com]
Excel File
Tableau connects to .xls and .xlsx files. To connect to a .csv file, use the Text file connector.
Make the connection and set up the data source. After you open Tableau, under Connect, click Excel. Select
the Excel workbook you want to connect to, and then click Open.
• (Optional) Select the default data source name at the top of the page, and then enter a unique data
source name for use in Tableau. For example, use a data source naming convention that helps
other users of the data source figure out which data source to connect to.
• If your Excel file has one table, click the sheet tab to start your analysis.
Use custom SQL to connect to a specific query rather than the entire data source.
You can also connect to a named range or an Excel table (also known as an Excel list) in the same
way you connect to a worksheet. Both the named range and Excel table function as a table in
Tableau.
You create named ranges in Excel by selecting a range of cells and then selecting Define Name on
the Formulas tab. Similar to named ranges, you can create an Excel table in Excel by selecting a
range of cells, and then selecting Insert > Table. When you connect to a named range or Excel table
in Tableau, an icon appears next to the sheet in the Data Source page as shown below.
You can connect to multiple Excel workbooks at the same time as long as each connection in the data
source has a unique name.
Use bar charts to compare data across categories. You create a bar chart by placing a dimension on the
Rows shelf and a measure on the Columns shelf, or vice versa.
A bar chart uses the Bar mark type. Tableau selects this mark type when the data view matches one of
the two field arrangements shown below. You can add additional fields to these shelves.
To create a bar chart that displays total sales over a four-year period, follow these steps:
Step 1:
Step 2:
Drag the Order Date dimension to Columns and drag the Sales measure to Rows.
Notice that the data is aggregated by year and column headers appear. The Sales measure is aggregated as a
sum and an axis is created, while the column headers move to the bottom of the view. Tableau uses Line as
the mark type because you added the date dimension.
Step 3:
Step 4:
The view shows how different shipping modes have contributed to total sales over time. The ratios look
consistent from year to year.
Step 5:
Drag the Region dimension to Rows, and drop it to the left of Sales to produce multiple axes for sales by
region.
Step 6:
To view data in the West region only, you can filter out the other regions. To do this, drag the Region
dimension again, this time from the Data pane to the Filters shelf.
Step 7:
In the Filter [Region] dialog box, clear the Central, East, and South check boxes, and then click OK
This view gives you insight into your data—for example, how the ship mode changed in the West over the
four-year period.
Analyze Data
How to create and use calculated fields in Tableau using an example?
Calculated fields allow you to create new data from data that already exists in your data source. When you
create a calculated field, you are essentially creating a new field (or column) in your data source, the values or
members of which are determined by a calculation that you control. This new calculated field is saved to your
data source in Tableau, and can be used to create more robust visualizations. But don't worry: your original
data remains untouched.
You can use calculated fields for many, many reasons. Some examples might include:
• To segment data
• To convert the data type of a field, such as converting a string to a date.
• To aggregate data
• To filter results
• To calculate ratios
Types of calculations
You create calculated fields using calculations. There are three main types of calculations you can use to create
calculated fields in Tableau:
• Basic calculations - Basic calculations allow you to transform values or members at the data source
level of detail (a row-level calculation) or at the visualization level of detail (an aggregate calculation)
• Level of Detail (LOD) expressions - Just like basic calculations, LOD calculations allow you to compute
values at the data source level and the visualization level. However, LOD calculations give you even
more control on the level of granularity you want to compute. They can be performed at a more
granular level (INCLUDE), a less granular level (EXCLUDE), or an entirely independent level (FIXED)
with respect to the granularity of the visualization
• Table calculations - Table calculations allow you to transform values at the level of detail of the
visualization only
• Enter a name for the calculated field. In this example, the field is called, Discount Ratio.
To see a list of available functions, click the triangle icon on the right-side of the Calculation Editor.
Each function includes syntax, a description, and an example for your reference.
3. On the Rows shelf, click the plus icon (+) on the Category field to drill-down to Subcategory.
You can see that Binders are heavily discounted in the Central region. Notice that Discount Ratio is
automatically aggregated as a sum.
2. On the Rows shelf, right-click SUM(Discount Ratio) and select Measure (Sum) > Average.
For this example, the formula is changed to return a discount ratio for orders over 2000 USD
in sales:
IIF([Sales] > 2000, [Discount]/[Sales],0)
3. Click OK
The view updates to reflect the changes automatically. You do not need to re-add the updated
calculated field to the view.
1. With your workbook open in Tableau Desktop, select Server > Tableau Public > Save to Tableau Public
After the workbook is published, you are redirected to your account on the Tableau Public website
On your profile page on Tableau Public, do any of the following to customize your profile:
Hover the pointer over a viz to get access to actions such as selecting it as your featured viz, or hiding,
downloading, or deleting it.
Hover the pointer over a viz and then select View to open the viz’s home page. There you can select
Edit Details to customize metadata such as workbook name and description, add a permalink, and
change other settings.
To get a link to share on social media or code to embed in a web page, display a view, and then click
Share at the bottom of the view. (You can get links and embed code for other Tableau Public users’
views this way, too.)