0% found this document useful (0 votes)
14 views8 pages

Adv Tableau

The document outlines a college database schema with SQL commands to populate tables for departments, employees, locations, projects, and work assignments. It also provides instructions for publishing Tableau workbooks to Tableau Public and Tableau Server, as well as creating advanced maps and calculating distances between geographic points. Key steps include preparing workbooks, setting permissions, and utilizing Tableau's mapping features for spatial analysis.

Uploaded by

Arun
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)
14 views8 pages

Adv Tableau

The document outlines a college database schema with SQL commands to populate tables for departments, employees, locations, projects, and work assignments. It also provides instructions for publishing Tableau workbooks to Tableau Public and Tableau Server, as well as creating advanced maps and calculating distances between geographic points. Key steps include preparing workbooks, setting permissions, and utilizing Tableau's mapping features for spatial analysis.

Uploaded by

Arun
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
You are on page 1/ 8

3.

CONSIDER A COLLEGE DTABASE SCHEMA

AND POPULATE THE TABLE WITH VALUES .

INSERT INTO DEPARTMENT VALUES(1, 'Research', '01-jan-2020');

INSERT INTO DEPARTMENT VALUES (2, 'Development', '15-may-2021');

INSERT INTO DEPARTMENT VALUES (3, 'HR', '20-sep-2019');

select * from DEPARTMENT;

INSERT INTO EMPLOYEE VALUES (101, 'John Doe', '123 Elm St', 'M', 60000, NULL, 1);

INSERT INTO EMPLOYEE VALUES (102, 'Jane Smith', '456 Oak St', 'F', 75000, 101, 2);

INSERT INTO EMPLOYEE VALUES (103, 'Mike Johnson', '789 Pine St', 'M', 50000, 101, 1);

INSERT INTO EMPLOYEE VALUES (104, 'Emily Davis', '135 Maple Ave', 'F', 72000, 102, 3);

select * from EMPLOYEE

INSERT INTO DLOCATION VALUES (1, 'New York');

INSERT INTO DLOCATION VALUES (1, 'Boston');

INSERT INTO DLOCATION VALUES(2, 'Chicago');

INSERT INTO DLOCATION VALUES(3, 'San Francisco');

select * from DLOCATION


INSERT INTO PROJECT VALUES (201, 'Alpha', 'New York', 1),

INSERT INTO PROJECT VALUES (202, 'Beta', 'Boston', 1),

INSERT INTO PROJECT VALUES (203, 'Gamma', 'Chicago', 2),

INSERT INTO PROJECT VALUES (204, 'Delta', 'San Francisco', 3);

select * from PROJECT

INSERT INTO WORKS_ON VALUES (101, 201, 20.5),

INSERT INTO WORKS_ON VALUES (101, 202, 15.0),

INSERT INTO WORKS_ON VALUES (102, 203, 30.0),

INSERT INTO WORKS_ON VALUES (103, 201, 10.0),

INSERT INTO WORKS_ON VALUES (104, 204, 25.0);

select * from WORKS_ON


4. publishing to tableau Public or tableau Server

Publishing to Tableau Public (Free, Cloud-Based)

1. Prepare Your Workbook: Ensure all visualizations, dashboards, and stories are final.
2. Sign In to Tableau Public:
• Go to File > Save to Tableau Public As ...
• Sign in to your Tableau Public account (or create one if you don't have it).
3. Publish the Workbook:
• Name your workbook and click Save
• Tableau Public will upload your workbook and create a URL that you can share.
• Note: All data on Tableau Public is publicly accessible.
1. Publishing to Tableau Server or Tableau Online (Secure, Subscription-Based)
1. Connect to Tableau Server:
• Go to Server > Sign In and enter your Tableau Server or Tableau Online credentials.
2. Publish the Workbook:
• Go to Server > Publish Workbook ...
• Choose the project on the server where you want to save the workbook.
3. Set Permissions:
• Customize permissions for who can view, edit, or download the workbook.
4. Configure Extract Refresh (Optional):
• Schedule automatic data refreshes if you're using extracts.
5. Publish:
• Click Publish. You'll receive a URL to access and share your dashboard securely.
2. Embedding in a Website or Application
1) Copy Embed Code:
• After publishing to Tableau Public, Server, or Online, go to the workbook and click Share.
• Copy the Embed Code.
2) Paste Embed Code:
• Insert the code into your website's HTML where you want the visualization to appear.
• Adjust dimensions in the embed code if necessary.
3. Exporting as an Image, PDF, or PowerPoint
1) Export as Image:
• Go to File > Export As Image ... to save a specific sheet or dashboard as a PNG file.
2) Export as PDF:
• Go to File > Print to PDF ... to export selected sheets or dashboards to a PDF document.
3) Export to PowerPoint:
• Go to File > Export as PowerPoint ... to generate a PowerPoint file with each sheet or
dashboard on a separate slide.
4. Sharing via Tableau Mobile

For Mobile Access: Users can view published workbooks on their mobile devices through the
Tableau Mobile app, which can connect to Tableau Online or Tableau Server. This makes
dashboards accessible on the go, with interactive capabilities.
5. Create advanced mapping

1. point to point map

2. dual axis map

Aim

To create advanced geographic visualizations in Tableau, specifically a Point-to-Point Map and a


Dual Axis Map, to analyze spatial relationships and overlay multiple data layers. The objective is
to visually represent geographic connections, such as routes, and to enhance data insight by
overlaying two layers on a single map for comparative spatial analysis.

1. Point-to-Point Map

A Point-to-Point Map visualizes connections between two geographic locations (e.g., from
one city to another), often used to represent routes or networks.

2. Dual Axis Map

A dual-axis map is a map with two sets of geographic data overlaid on top of one another.
For example, a filled map of U.S. states with data points for each city layered on top.

Steps:

1. Open Tableau Desktop.

2. In the Connect pane, under Saved Data Sources, connect to the Sample-Superstore data
source.

3. In the Data pane, under Dimensions, double-click State. A map view is created.

4. On the Marks card, click the Mark Type drop-down and select Map.

5. From the Data pane, under Measures, drag Sales to Color on the Marks card. The map
updates to show the sum of sales by state. The states with higher sales are darker blue,
and the states with fewer sales are lighter blue.

6. On the Columns shelf, control-drag (command-drag on a Mac) the Longitude


(generated) field to copy it, and place it to the right of the first Longitude field.

7. On the Marks card, select the top Longitude (generated) tab.

8. From the Data pane, under Dimensions, drag Region to Color on the Marks card. The
map view on the left updates

9. On the Columns shelf, right-click the Longitude (generated) field on the right and select
Dual Axis. The map views are now overlapping each other. You might not be able to see
the map on the bottom layer.

10. On the Marks card, ensure that the bottom Longitude (generated) tab is selected, and
then click Color > Edit Colors.

11. In the Edit Colors dialog box that opens, click the Palette drop-down, select Gray, and
then click OK.Notice that the colors of the map update.
12. On the Marks card, click Color again.

13. In the Color pop-up dialog box, under Opacity, move the slider to approximately 75%.

14. Finally Drop cities on to the Detail.


6. Calculate the Distance between two points on the Map?

Aim:

To calculate the distance between two geographic points on a map in Tableau, allowing for accurate

measurement of spatial relationships. This helps in analyzing distances between locations,

such as routes or connections, using the built-in DISTANCE() function or a custom Haversine

formula, providing meaningful insights into geographic data.

Steps to Calculate Distance

1. Ensure Geographic Data is Loaded:


• Your dataset should have Latitude and Longitude values for both points. For instance,
columns such as Origin_Lat, Origin_Long, Destination_Lat, and Destination_Long.
2. Create Calculated Field for Distance:
• Go to Analysis > Create Calculated Field.
• Name the field, e.g., Distance.
3. Use the Distance Formula in the Calculated Field:
• Tableau has a built-in DISTANCE() function that can calculate the distance directly:

SQL CODE:

DISTANCE(

MAKEPOINT([Start_Lt], [Start_Ln]),

MAKEPOINT([Dest_Lt], [Dest_Ln]),

"kilometers"

• Replace Origin_Lat, Origin_Long, Destination_Lat, and Destination_Long with your actual


field names.

The third argument specifies the unit of measurement ("kilometers" or "miles").

4. Drag the Distance Field into the View:


• You can now add this calculated field to your view, using it in tables, tooltips, or labels to
display the calculated distance between each pair of points.

You might also like