Today we are going see use of polygon and points in Tableau to create an map showing an geographical details. Tableau has out of the box visualization of geographic regions such as countries, zip code, states and it is pretty much simple by simple drag and drop into sheet with geocoding fields in data source.

Now, what if we need to see customize location in the map or geographical boundaries across across different suburbs or need to see municipal map of particular city with different sub-wards. Tableau for that purpose has polygons which can be used for drawing an particular spot but this required a bit of work before we start using it. This collecting of data with all the points might be time consuming process.

Lets get started with this:

Custom polygon has 2 requirements:

1 – Latitude and longitude coordinates for each point of polygon

2 – An point order in which points are connected with each other

For this dashboard, we will create Mumbai map on basis of municipality wards and I found that data from json file here and converted that into an excel spreadsheet. Once you have data arranged in below format, Tableau will connect the points with the help of longitude and latitude information:

once your data is ready with wards,points, longitude and latitude then import the data into Tableau then do following steps:

  • Place longitude and latitude on rows and columns respectively
  • change mark type to polygon
  • Convert points into dimension then place points column into path under mark
  • Final step is to place ward column into colours under mark

Your polygon map is ready for Mumbai with different Ward with its boundaries as shown below:

Next I did was to get 2011 census data of Mumbai population and create different sheets to create dashboard which shows population, literacy and working class for each ward.

Here is the final dashboard that I designed and published:

Do let me know your feedback or if you have any queries on the same.

 

I had an Tableau session last week and I came across possibility of creating hub and spoke in Tableau. I am aware of its been discussed earlier as well in multiple blogs and Tableau public but here I am sharing my experience with Hub and Spoke.

For the matter of this visualization, I extracted all the arrival data to Mumbai airport for 19th Feb from Mumbai Airport arrival website and created excel file in below format:

Each origin and destination had to duplicated into multiple records. For Example:

Flight|Origin|PathID|ArrivalTime|…

6E 189|Delhi  |Delhi – Mumbai|00:40|…

6E 189|Mumbai |Delhi – Mumbai|00:40|…

Next step was to import the data into Tableau and do the necessary data manipulation for cleaner data.

  1. Add origin to detail tab under marks section, this will enable latitude and longitude in the sheet
  2. Drag path id column into color pallette.
  3. select the number of records and put into size tab

This will create following route map (hub & Spoke model) as per below image:

Then I created couple of other sheets on the basis of on-time performance and delay types for different airlines flight arriving at Mumbai Airport and created the final dashboard showing all the details.


Let me know your feedback on the dashboard

##R markdown to WordPress
In this post we will look into steps to publish R markdown directly into wordpress. Here are the steps:

#1 Packages Needed:
Following packages needs to be installed on R studio

install.packages(“devtools”)
install.packages(“RCurl”)
install.packages(“XML”)
devtools:::install_github(“duncantl/XMLRPC”)
devtools:::install_github(“duncantl/RWordPress”)

#2 Once the packages are installed write the blog or r markdown document:
Once R markdown is completed then to upload the post on wordpress, first ensure RWordPress is loaded

library(RWordPress)

Then connect with your wordpress site with credentials:

options(WordPressLogin = c(user = 'password'), # your user name & password
        WordPressURL = 'http://tabvizexplorer/xmlrpc.php') # your WP url + /xmlrpc.php at the end

#3 Finally use knitr library to create an html code to be uploaded on wordpress

library(knitr)
knit2wp('WP_markdown.Rmd', title = 'How to Upload R Markdown Directly to WordPress', publish = FALSE) # your filename and blog post title

Done! your R markdown is ready to be publish

After creating several dashboard and data visualization for clients, I thought let me try to create tableau dashboard to represent my professional experience with skills.

Here I imported Excel file containing my education, work experience and skills into Tableau. As an interviewer, I generally ask people to share one page resume and Tableau gives that flexibility of creating an interactive resume which can be attractive and also speaks about the experience a person has.

Please let me know your feedback on my resume:

I have been thinking about starting a blog from long time however I didn’t get time to start one. Here I am now starting one. Today we are going to see the data visualization on Tableau with Statistics of Virat Kohli. Cricket has been one sport that I have been following since early childhood. So I thought why not pick cricket as topic for my first blog.

Here is the steps I took to download:

1 – Download the data from espncricinfo.com and pasted data into excel spreadsheet

2 – Import the excel into Tableau

3 – Visualize the data into Tableau

4 – Publish the data into Tableau Public and below is the output produced: