fabiochiu/medium-articles huggingface dataset:
Making Word Clouds in Tableau
By: Michel Burnett
Tags: Data Visualization, Tableau, Word Cloud

A quick tutorial on how to make word clouds with Tableau software.

Word clouds can be a powerful visualization when analyzing keywords in a dataset. Like pie charts, there seems to be mixed opinions on the efficiency of this technique but as long as the data your analyzing and result your displaying isn’t too complicated, word clouds should still make for a valid and engaging data visualization. Word clouds can fit several viz needs, maybe you’d like to visualize product review keywords for sentiment analysis or maybe you just want to demonstrate the frequency of a word in your dataset.

Let’s get started. For this example, I’ll be using sample amazon review data available here : https://www.kaggle.com/datafiniti/consumer-reviews-of-amazon-products?select=1429_1.csv .

To get started I’ve dragged and dropped the “reviews.title” field into the “Text” box on the “Marks” shelf (note that for this example I am using filters to return only the most common reviews from a single product). Next we want to add some size to our text. We want our text sized by the count of each of these words. To do this, simply drag another “reviews.title” pill onto the “Size” box in the “Marks” shelf then change the measure of the pill to “count”.

Tableau should turn your viz into a tree map by default. As you can see, tree maps are very similar to word clouds like we’re trying to make. In the “Marks” card, where it says “Automatic”, you can select “Text” from the drop down menu to turn these tree map cells into proportionally sized text.

As you can see, the most frequent titles are larger than the others. Now this is starting to look more like an engaging visualization but let’s add one more detail to really bring out the contrast. Just like we did for the “Size” box, I’m going to drag and drop another “reviews.title” pill into the “Color” box and change the measure to “Count”.

Now the most frequent key words can really stand out from the others with size and color.

I hope I was able to show you a new technique to use in Tableau and making data visualizations. Thanks for reading!
Tableau Data Catalog
By: Oli Steadman
Tags: Tableau Data Catalog, Analytics, Data Governance, Tableau, Data Catalog

In September 2019 Tableau announced their new Tableau Catalog tool via the company blog. Almost a year since they began to release videos like that linked above, which showcase a lot of functionality that can be described as “data cataloguing” without having to be wrapped up into a formal, versioned, deployed product with the same complexities you might see from other catalogue vendors.

It certainly missed out on a mention in The Forrester Wave Machine Learning Data Catalogs Q4 2020 but it’s hard to decide whether that’s due to any lack in feature set, or to Tableau’s newness to the cataloguing brandscape (an already crowded arena). Features advertised in the original announcement and explained to some extent in the showcases, include:

External Assets list

Lineage and impact analysis

Data Quality Warnings

Data Details

Enhanced search

Metadata API

These are standard features across the vast majority of enterprise and even open source catalogs; of course there’s the differentiating factor of having a catalog right alongside your Tableau instance where you presumably already do a bunch of analytics and possibly even governance. But it’s this last point that really leaves a deafening silence: no mention of Data Governance. Almost every catalog worth its salt is marketed on governance grounds with the hyped buzz words being “democratisation”, “access”, “transparency”, and the like which, whilst Tableau’s announcement may skip for no more dramatic reason than that it feels quite obvious to them (their product being one built on shared dashboards & collaboration) feels like the smoking gun on a lightweight product offering. I’m open to being proven wrong on that!

Questions left unanswered by the various showcase/demo videos, include:

what’s the infrastructure/footprint requirement; does it simply run alongside Tableau Server?

where do governance actions & requests get handled, inside the UI or some other way?

documentation mentions NODE_LIMIT_EXCEEDED as one of the typical error messages to expect; are nodes configurable to allow handling of more significant workloads?

where is configuration done, via some admin-only UI view? how is this protected (e.g. by credentials or ADFS)?

A more detailed product overview was made available 6 months after the initial announcement but doesn’t go into very much more depth than the blog post, the sales page, and the Getting Started guide. I’m looking forward to exploring further and perhaps posting a follow-up here as to my findings.
Preppin’ Data — 2019W21
By: Jeevan Krishna
Tags: Data Visualization, Tableau, Data, Tableau Prep

Input

New Patient List

Solution Steps

Finally the dataset which was not used earlier has been useful in solving this week’s problem set. First things first, we need to combine data from last week and current week using union statement. Before scaffolding, we will use the data from checkup frequency to create second visit, 3rd and 4th visits start date. We will re-use the flow from earlier week to update the patient level and daily level costs.

Output

Patient level costs

Daily level costs

Prep Flow

New Input Section

Updated Prep Flow

The flow is published here — GitHub Link
Prepping’ Data — 2019W22. Input
By: Jeevan Krishna
Tags: Data Visualization, Tableau, Data, Tableau Prep

Input

Solution Steps

To calculate the moving average, we need to be able to create moving windows relevant to each date. Drop the sales in a clean step as they are unnecessary while creating a window. Create a source with values 0–6 which will be used to scaffold the data. We will have 7 times the rows we have started with. Subtract the scaffolded value from dates and create the range of dates that needs to be within each windows Join this result with the input file to get the values associated with all dates within the window. Exclude nulls in the sales value, this will allow us to identify those windows with less than 7 days. Use aggregate step to calculate the average sales for each day and calculate the no.of days used. If the no.of days is less than 7 replace the moving avg. field with null.

Output

Prep Flow

The flow is published here — GitHub Link
Robinhood Portfolio — A view via Tableau
By: Jeff Emrich
Tags: Investing, Tableau, Cloudflare, Portfolio, Robinhood

Ok, using the following python code, I web-scrapped all stock prices from yahoo.com/finance and updated my overall, dollar based, ownership status of my top equity holdings.

Python Code: https://colab.research.google.com/drive/1HKiT2EQ4VDDz71rLrIBeU9mDOXbWGaMd?usp=sharing

*Note: The python code is current stored in the cloud via google colab, but is meant to be run on one’s local drive, with all file paths updated accordingly. Also, for AMZN and GOOGL, I modified the code to take the comma out of shares prices over $999.99 so that python could convert strings to floats. If one owns other stocks, such modifications would have to be expanded to those as well.

Overall, my dollar based ownership status of my Robinhood account looks like this:

This view helps me see where my investments are concentrated and where I need to buy more. As share prices fluctuate, this automated process allows one to keep track of their holdings and rebalance as needed.
And again Tableau.Powerful tips for connecting to the data.
By: Mark Eltsefon
Tags: Tableau, Visualization

Photo by Sam Dan Truong on Unsplash

When I started working with Tableau Server, it was a real pain to understand all ins and outs: how to connect to data, how to optimise it, how to keep the dashboard up to date, etc.

Now, after experience getting to know Tableau, I can offer you a glimpse of tips that can facilitate your data work flow with Tableau.

Most of the time use Data Extraction

There are two ways to connect to the data source: via live connections and via extractions. In a nutshell, live connection is a real time extraction, without having to copy data to Tableau Server. Extraction is a scheduled connection, which is refreshed every hour/day/period. All of the data is copied from the datasource to Tableau Server.

My recommendation is to only use live connection when you need update your data every second or every minute.

However, just using extraction will impact the Tableau Server’s performance, and that can cause your team/your coworkers to get a bit grumpy. Try always to keep in touch with your infrastructure team. Separate data sources and visualisations.

I‘d like to mention just a couple of advantages of separation :

1. It’s the first step to the general, holistic approach of unifying data/content management, thereby allowing all users to find the right data in one place and not duplicate data.

2. This approach helps to optimize performance on the server side.

Try to reuse data sources as often as possible. Don’t use complex sql queries.

Only try to connect to tables or join tables. All preprocessing should be done outside of Tableau. It’s important to compartmentalize the visualisation flow from the data preprocessing. This will increase the server’s performance. Appropriate scheduling data extract refreshes

Scheduling data extract refreshes during working hours may take a long time, as multiple processes/jobs/queries might be utilizing the databases at the same time. You should schedule your data refreshes during your idle or non-working time. Prioritize Schedule Refreshes.

There may be many data refreshes connected to different workbooks in a refresh schedule. Some of the data refreshes might involve enormous amount of data which take a lot of time to refresh data extracts, while others might have lesser data and therefore would take less time. Some of the data refreshes can be critical for business, while others can be implemented out of curiosity. You should always look for the sweet spot here. Use Incremental Refresh instead of Full Refresh

Incremental Refresh appends new records to existing records in extracts. Full Refresh delete the whole data and loads old and new records.It is preferable to choose an incremental refresh as it takes much lesser time, unless there is a mandatory business requirement to reload the whole range of data.

Good luck with your dashboards!
Tableau Dynamic Big Data Through REST Call
By: Anthony Alteirac
Tags: Advanced Analytics, Tableau, Big Data, Rest Api, Drilling

Photo by rawkkim on Unsplash

Hey hey hey !

Today I’ll try to describe a very interesting use-case and how to deal with it thanks to Tableau and Advanced Analytics

Discover Tableau Advanced Analytics here: https://www.tableau.com/learn/whitepapers/advanced-analytics-tableau

In a nutshell Tableau Advanced Analytics is designed to call an external service, providing contextualised workbook data, for advanced and dynamic calculations. Think about AI/ML models you want to run on your data and visualise the result in Tableau, live when exploring data, taking into account your filters and selections, then Tableau Advanced Analytics is right for you!

But it can do far more than AI, ML, R advanced functions and I’m sharing only one use case, among hundreds, Tableau Advanced Analytics can solve.

Lets’ imagine you have an IOT time series oriented workbook, your data source is aggregated for human analysis purpose.

Imagine now that you want to give your end-user the ability to see details on one sensor (selected in the workbook) for a very specific time frame (again defined by selections in the workbook), for example only one or two days for a specific sensor. Those details are stored in a massive historical DB (several petabytes) only reachable with REST call.

You can’t predict the sensor and date user will want, you can’t call it directly, you can’t load the entire DB. Houston we’ve got a problem !

The use-case can be summarised like this:

Here’s where Tableau Advanced Analytics will help you!

What do you need ?

Tabpy installed and running on any server (https://github.com/tableau/TabPy)

Nothing else :-)

Setup Tableau Desktop to access your TabPy server

Add the IP of your Tabpy server and PORT (9004 by default)

Setup an Index to control the number of points you want to get back from the REST API

Just create an excel or an isolated Table with as much index you need, the maximum points you want to get from your REST call:

My excel has 5000 entries, cost only few KB

In your workbook, add the file:

Make sure your [index] field is set as dimension:

Now you need to call REST API with

[Start date], as parameter

[End date], as parameter

And to be sure it retrieves the number of points you need (arbitrary number, can be hardcoded or defined with a parameter, here we’ll use a parameter so the end-user can change it)

[NumberOfPoints], as parameter

Create the calculated field to get the date from REST API, passing the start and end date, see red rectangles in the below picture, of course you’ll need to adapt the script for your REST API:

Make sure you set the “Default Calculation” to “index”:

and

Create the calculated field to get the Sensor value from REST API, passing again the start and end date:

Make sure you set the “Default Calculation” to “index”, exactly like the previous calculated field.

Now you can build the viz as follows!

Show filters for the 3 parameters so the end-user can change them:

Houston, problem solved !

Tribute
Six Principles of Analytical Design
By: Nikhita Singh Shiv Kalpana
Tags: Data Visualization, Tableau, Air Quality Index, Analytical Design, Covid 19

Six Principles of Analytical Design

Critical thinking skills must occupy the top shelf of any aspiring data analyst’s arsenal. These include analyzing the data, interpreting, and presenting the data relevant and easily consumable by the reader.

Edward Rolf Tufte, in his book “Beautiful Evidence,” presents us with six principles for giving the data in an informative way.

The six principles are:

Showing Comparisons Showing causality, mechanism, explanation, systematic structure Performing Multivariate Analysis Integrating Evidence Describing the Evidence (Documentation) Content is King!

In his book, Edward Rolf Tufte uses Minard’s map of Russia's French invasion, created in 1869, to beautifully explain all these principles. Interested readers can check this book.

Here, I am going to implement these principles with examples using Tableau. I will be using multiple datasets of the Air Quality Index of India from 2015 to 2020. I am using this data to see the Impact of COVID-19 on pollution in India. The datasets were downloaded from here. I have created a storyboard on Tableau on the Impact of Covid-19 on India’s Air Quality Index; please look at it here.

Indian Cities have always ranked top in the list of top polluted cities. But there was a drastic change in the air quality index after lockdown.

According to my analysis Ahmedabad, Delhi, Lucknow, Patna are the top 4 cities with the highest Air Quality Index. This data is until July 2020; right now, Delhi is the most populated city in India. We move forward with these four cities to see the impact of COVID-19 on their Air Quality Index. Let’s dive into our first principal.

Showing Comparisons

Edward Rolf Tufte says :

The fundamental analytical act is statistical reasoning is to answer the question “Compared with what” .

As whenever we are analyzing or providing evidence to our hypothesis, it is vital to make informed comparisons. Below we have a bar chart of the cities with their AQI from April (after the lockdown). The Air Quality Index for each city is around 3–4k, but we need to know this AQI is compared with what?

Top 4 cities with AQI in 2020

We have a hypothesis stating that the Air Quality Index has reduced drastically after COVID-19; it is essential to compare this with the AQI before April 2020.

Therefore, below is a bar graph comparing the state of AQI before and after COVID-19. We can now clearly see how the AQI has decreased drastically after April 2020.

AQI before and after COVID-19

Below is a bar chart race of different cities with their AQI from 2015 to 2020.

Bar Chart Race of Cities with their AQI from 2015 to 2019

Furthermore, I compared the Air Quality Index using choropleth maps, making it easier to compare each city before and after lockdown. You can look at the interactive maps here.
【Tableau】資料視覺化進階功能彙整
By: Ntu Data Analytics Club
Tags: 社課精華, Tableau, Ntudac, Business Analysis, Data Analysis

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
【Tableau】地圖視覺化及儀表板、故事模組介紹
By: Ntu Data Analytics Club
Tags: 社課精華, Tableau, Ntudac, Business Analysis, Data Analysis

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Computing grand totals of Discrete Measures using RUNNING SUM and LOOKUP filter in Tableau
By: Ajinkya Abhyankar
Tags: Data Visualization, Tableau Desktop, Tableau, Tableau Training, Data Analysis

Task: Create a detail report in Tableau and keep multiple discrete measures between 2 discrete dimensions.

As we all know, continuous measures can’t be kept between 2 discrete fields, thus it is required to make continuous measures as discrete.

After doing this, now if we want to display Grand Totals for these Discrete Measures using Analysis->Totals->Show Column Grand Totals in Tableau, then tableau returns NULL for grand totals of Discrete measures as seen in below screenshot.

To handle this NULL issue, follow the below steps to compute grand totals using Running SUM and Lookup table calculation filter:

Duplicate the existing report and rename worksheet as “Grand Totals”. Apply the table calculation “Running Total” on all discrete measures (Sales, Profit, Discount)

3. Go to “Right Click on each measure pill → Edit table calculation → Specific Dimension →Select “Market” on which Running Total will do computation.

4. After applying “Running Sum” to all discrete measures, Grand Total worksheet will look like below:

At this step, you are getting “Grand Total” for each discrete measure for last record in the view which is Index=7 and Market=‘US’.

5. Create a Parameter Top N as below:

6. Create a lookup filter with following condition and drag it to filters shelf. Compute the filter using “Table Down” and set it to “True”.

Here, Lookup offset is set to 0 which means return the Index row at 0th Offset, depending selected Top N value.

For example, If Top N=5 then Grand Totals is computed considering only first 5 rows and lookup filter will return 5th Row having grand totals which is currently at 0th Offset.

If Top N=7 then Grand Totals is computed considering only first 7 rows and lookup filter will return 7th Row having grand totals which is currently at 0th Offset.

We are able to achieve this using LOOKUP function because Table calculation filters in Tableau gets executed in the last and computes all the calculation defined in report prior execution of LOOKUP filter. Thus, here Tableau is computing Running Total of measures first and Lookup is returning Top Nth row having grand totals.

7. Create a new filter “Index#” with below logic for “Detail Records” worksheet to show only Top N records and drag it to filter shelf computing with “Table Down”

8. Hide unnecessary headers from “Grand Totals” worksheet such as INDEX() and Market etc so that we can drag only grand totals on dashboard below main report.

9. Create a new dashboard, add Vertical Layout, drag “Detail Records” worksheet first and “Grand Totals” worksheet below it. See below how it should look.
Calculate Delta,% Increase with Up/Down Arrows on YoY,QoQ,MoM,DoD using Lookup function in Tableau
By: Ajinkya Abhyankar
Tags: Data Visualization, Look Up, Tableau, Tableau Training, Delta

Why Lookup? What is use of this function?

LOOKUP function is used to look up and down a partition of rows and return a values in that field by specifying an offset. This can be used Lookup previous or next value within resp. partition to compute required calculation.

LOOKUP is table calculation which gets executed in the end as per the order of execution of filters and calculations in Tableau. When delta on YoY/QoQ/MoM is to be computed first and later display only the main number wrt current Year, Lookup as Table calculation filter is also required because it gets executed in end after table calculation i.e Delta on YoY gets computed first and then Lookup filter is applied to show only current Year Sales along with Delta on YoY. This scenario is covered in next article of LOOKUP.

Let’s see how to use LOOKUP to calculate Delta, %Increase and Up/Arrow on QoQ.

Drag “Order Date” dimension to Rows. Right Click and then Select “Quarter Q2 2015”. Drag “COUNT(Orders)” to TEXT to see Order count for each of quarter as seen below.

2. Now, Let’s calculate Delta, % Increase and % Increase Arrow from “current quarter” wrt “previous 1 quarter”.

3. Create a new calculated field — Delta and write below Lookup logic:

0 is offset that looks up Count of Orders value for Current Row and -1 is offset that looks up 1 Previous row having count of orders value on QoQ.

4. Drag Delta field on rows to do validation of computed Delta using above logic.

For 2016 Q4 and Q3, Delta is = 5926–4780 = 1146 Orders which means that 1146 orders were increased in 2016 Q4 as compared to 2016 Q3.

For 2016 Q1 and 2015 Q4, Delta is = 2742–4298 = -1556 which means that 1556 orders were reduced in 2016 Q1 as compared to 2015 Q4.

5. Create calculations for % Increase and % Increase Arrow Up/Down as below.

6. Drag both these fields to rows to see below output.

7. Now drag and drop %Increase Arrow Up/Down field to Color and assign red color for down arrow and green for Up arrow. Drag % Increase Arrow Up/Down field from Rows to Text and see final results as below.

8. To Calculate YoY,MoM,DoD — We just have to replace Quarter(Order Date) dimension with YEAR(Order Date) or Month(Order Date) to compute YoY and MoM respectively.
Basic Chart of Data Visualization in Tableau
By: Kiki Candra Mahendra
Tags: Data Visualization, Tableau, Business Intelligence, Business Analysis, Data Analysis

I hope this post can be inspiring and useful, Keep Learning and Improve Skill :)
Wolves are most frequently spotted mammals on hiking/human trails in Banff
By: Anna Räder
Tags: Banff, Tableau, Canada, Wildlife

I visited Banff National Park in 2017. I was truly impressed by the beauty and magnitude of the Rocky Mountains. Today, I analyzed the “Mammal Occurrence — Banff” dataset from Parks Canada (link to the source here) that shows which mammals are most frequently spotted by motion-detection cameras located across Banff National Park in Canada. I visualized the results using a “packed bubbles” chart in Tableau. I filtered the results by type of trail (hiking/human vs. wildlife). I also filtered out the occurrences of humans, bikers, and horse riders to capture only animals in my analysis.

Click on this link to view my interactive dashboard in Tableau.

Here is a list of the top 3 most frequently spotted mammals by type of trail.

Wildlife

1. White-tailed deer

Source of image: Wikimedia Commons

2. Elk

Source of image: Wikimedia Commons

3. Mule deer

Source of image: Wikimedia Commons

Human trails and hiking trails

1. Wolf

Source of image: Wikimedia Commons

2. Mule deer

Source of image: Wikimedia Commons

3. Snowshoe hare

Source of image: Wikimedia Commons

Bonus section:

I added analysis of occurrence by hour for the top three (3) mammals with highest occurrence on human trails and hiking trails. This chart shows (perhaps not surprisingly) that best times to spot these three mammals are during the morning and during the evening when looking for mule deer and wolf, and at night when looking for snowshoe hare.

Click here to see my dashboard in Tableau.

Fun fact! I only spotted the bighorn sheep during my visit in Banff.
Tableau — Hyper API rescuer for complex RLS challenges
By: Gunarathinam M
Tags: Tableau, Tableau Server, Tableau Consulting

Have you implemented the Row-Level-Security(RLS) in any of the Tableau Dashboard? Did you come-across complex scenario to update the user security columns on daily basis for an extract with millions of rows? Then this article is for you.

Problem Statement

We got an extract data source with incremental refresh enabled and RLS implemented. We do daily incremental and weekly full refresh. As part of RLS implementation, all the reporting data fields(dimensions and metrics) columns plus restricted users information(Dimension) in a column named ‘Restricted_users’ and the values are comma-separated, as it's easy and simple to check RLS in Tableau workbook using Username() function.

In the source system, the restricted users keep updated on every day and the same should get reflect n the extract data source.

The challenges are

No daily full refresh, as it degrades the performance of source system(SQL Server — OLTP) allowed to perform only on weekly. The incremental refresh will extract the transactional records which get modified on a daily basis, but not the Restricted_users column.

So the extract refresh doesn’t solve updating the RLS fields on daily basis. extract refresh

Proposed Solution

There is a good saying, “by the yard it’s hard; but inch by inch, anything’s a clinch!”.

Solved using a command-line utility in .Net, and scheduled to run on every night. The processing steps are

Get a list of sites and data sources to perform an incremental refresh For each data source, do the incremental refresh using TabCmd. Download the data source using REST API. Extract the .tdsx file in locally, basically its a zip file. Under data folder get the .hyper file. Use Hyper API to read and update the Restricted_users column in .hyper file. Zip back the files with .tdsx extension. Publish back the datasource using REST API.

In the whole solution, Hyper API is the rescuer to achieve this complex challenge of updating the RLS columns.

We extended this solution to support multi-site servers, means more sites and more data sources to perform the same process on daily basis.

Tested the performance of this whole process and results looks impressive. Total Rows in .hyper file — 14.5 million of 272 MB in size took ~5min to process for each datasource.

Happy programming :)
CLASS PLACEMENT RATE: WHAT DOES THE DATA TELL US?
By: Oluwafunmilayo C. Sofuwa
Tags: Shecodeafrica, Visualization, Placement, Tableau

I came across a class placement dataset recently on Kaggle. I wanted to carry out EDA analysis on the data and also practice my skills in machine learning. The dataset looks at the placement rate if students based on multiple criteria such as gender, degree taken in the university, if such students have an MBA with a specialization etc. For the context of my visualization in tableau, I examined several questions, some of which you can find below as well as the insights I was able to derive from the data.

a) What is the proportion of the placement rate?

A lot of students were able to secure a placements with industries. From the visualization, we can see that about 70% of students were able to secure placements as against the 30% who were not placed.

b) Do students who have previous work experience have an edge over students who don’t?

Work experience doesn’t seem to have an impact on students being placed. The visualization tells us however that students with no work experience had higher placement rate than students with work experience. On the other hand, students with work experience had a lower rate of not being placed (5%) compared with student with no work experience (27%).

c) What’s the likelihood of men getting placed compared to women?

Men are two times likely to get placed compared to women. This in itself is something that is still quite prevalent today across various industries.

d) What is the maximum salary distribution by gender?

Just as men were two times more likely to get a job placement, they were also likely to get more salary when compared to their female counterparts.

e) What is the placement distribution based on the degree obtained while in school?

Communications and Management had by far the highest placement rate compared to the other two, Science & Technology and Others. This could be due to a high demand for Communication and Management across industries in a particular period of time.

To view my complete visualization or download my tableau workbook, please visit https://public.tableau.com/profile/oluwafunmilayo8574#!/vizhome/PlacementData_16066821447100/Workexperience
Enhancing the View of One’s Portfolio via Tableau
By: Jeff Emrich
Tags: Tableau, Investing, Stocks Portfolio

Although I am not necessarily one who is an avid fan of rebalancing (as I like to let winners run), it is nice to understand what one owns in a proportional sense. If a position has run too much or not enough, having a view into one’s portfolio allows one to add/subtract as needed to accomplish individual goals.

To tackle this, I use some python code to scrape current stock prices from the web, and then multiply price times shares owned to obtain ownership stake in a dollar amount. Then simply divide ownership stake by total portfolio value to obtain the concentration a particular position holds within one’s portfolio. For example, below illustrates how my E*Trade portfolio, which holds my Roth IRA, is structured:

Per above, I tend to trust my financial future to GOOGL, AMZN, and VUG (a low cost EFT which contains mostly big Technology names).

https://investor.vanguard.com/etf/profile/VUG
Einstein Analytics Tips & Tricks: Comparing Sales YTD vs Sales PYTD
Tags: Einstein, Einstein Analytics, Tableau, Salesforce, Tips And Tricks

But what if we wanted to compare to last year during the same time frame? There is no “Last Year to this day last year” filter available.

Sure, this can be done with SAQL fairly easily by doing something like:

date in [\”1 years ago\”..\”current day — 1 year\”]

But, what if we don’t want to convert our whole lens into an SAQL step just for this one comparison? The answer is actually fairly simple, just use the “Previous year to date” filter and we can adjust it in the dashboard JSON.

Once we’ve gotten the data we need into the chart and added it to our dashboard, open up the dashboard JSON (CTRL+E or CMD+E) and find our step. We will see the filter section for our PYTD column which looks like this:

This is basically a full years worth of data plus the current year to today. If we want to look at the previous year to the same day in the previous year we just need to change “day”,0 to “day”,-365 and that will give us the same time period for the previous year.

Now we can compare our sales YTD vs our sales PYTD!
Weekly Dose of Data Analyst#8— Which NBA Player is the most cost effective during 2019–2020 Playoffs
By: Common Man
Tags: Data Visualization, Tableau, Data Analyst, NBA

I want to know which NBA players are the most cost effective during 2019–2020 playoffs.

Data Required:

All NBA Players’ Salary in 2019–2020 who have played in 2019–2020 playoffs

All NBA Players’ BPM in 2019–2020 playoffs

BPM is a value used to assess each players efficiency. It is a per-100-possession stat where 0.0 is league average, +5 means the player is 5 points better than an average player over 100 possessions (which is about All-NBA team level), -2 is replacement level, and -5 is really bad.

Its formula can be seen here.

To make the comparison between two better, each players salary has been normalised to fit the range -5 to 10 which is also the range of BPM value.

Summary

The scatter plot below can be divided into four quadrant. Each quadrant’s representation has been summarised as below.

Each data point represent each individual NBA player. Depend on which quadrant they are in, it means different things. If the data point is in quadrants highlighted in green (quadrant 1 & 3), it means the player’s salary roughly fits his efficiency. Conversely, if the data point is in quadrant highlighted in red (quadrant 2 & 4), it means his salary level does not match his efficiency (underpaid or overpaid). Also the arrow direction shows a detailed information based on each data point location in the quadrant.

So it is quite easy to see who is the most cost effective NBA players in 2019–2020 playoffs. That is…..

Donovan Mitchell (Utah Jazz)!!

With 9.4 BPM during playoffs, he only got paid $3.6 Million that year. Players who has similar performance like James Harden and Kawhi Leonard whose salary is about 10 times of Donovan got paid. Upon checking the internet quickly, he recently got a big extension contract ($163 Million for five years)from Utah Jazz. So that basically that has put his yearly salary to the same level as two people mentioned above.
Tableau Level Of Detail Expressions (LOD) With Examples
By: Raşit Saygılı
Tags: Data Science, Tableau, Business, Level Of Detail, Lod

Photo by Markus Winkler on Unsplash

Level of Detail expressions in Tableau allows us to create complex calculations. It is useful for using dimensions from different levels with aggregation. It enables us to use data from different granularities at the same time. LOD expressions can be created with this format;

There are three types of LOD expressions;

Fixed,

Include,

Exclude.

FIXED

Fixed LOD enables us to compute dimensions at an independent level, even when they are not in the view.

For further examples we will use Sample-Superstore data which is a built-in dataset in Tableau.

In the Sample-Superstore dataset, we can easily find total sales for each country by using ‘Country’ and ‘SUM(Sales)’

There is only one country in the dataset. We can find the sales ratio of every state. For achieving this result, we need to create a calculated field that will always get the total sales of the country even we exclude a state or add a new dimension to the view.

In these calculations, firstly we created a calculated field that only gets total sales of country. Sales measure gets the total sales for each state. Then we created a new calculated field for the calculating percentage.

INCLUDE

This expression takes into account a dimension that is out of view. It provides a lower level of detail than the current level in the view.

In the Sample-Superstore dataset, we can calculate the average profit of each state using ‘State’ and ‘AVG(Profit)’.

If we want to take into account every city in this calculation without placing the city dimension in the view, we will need an INCLUDE LOD expression.

There is a difference between the two calculations. In ‘Avg. Profit’, the calculation is created by taking the average of all profits for each State. However, in ‘Avg. Total Profit by City’ at first, we calculate the total profit of the city by city. Then we get an average of all cities for each state.

EXCLUDE

This expression enables us to remove a dimension that is in the view. It provides a higher level of detail at the current level in the view.

In the Sample-Superstore dataset, we can get the total sales of category and subcategory dimensions.

Exclude LOD expression can display the total sales of the category dimension even subcategory remains in the view.

In this example, Tableau ignores the current level of detail and makes calculations at a higher level. Since we identify our calculated field with ‘SUM(Sales)’, the result in the ‘Total Sales Without Subcategory’ will be the summary of higher levels. Changing the aggregation from ‘ATTR’ to another one will not affect the result.

LOD expressions are useful features in Tableau. It can be easily concluded from the examples that calculations can be achieved by FIXED expressions instead of INCLUDE and EXCLUDE.

You can check this article on Tableau’s website for more examples:
Covid 19-Projections with Knime, Jupyter and Tableau
By: Dennis Ganzaroli
Tags: Jupyter, Tableau, Knime, Covid 19, Logistic Model

3. Calculation of the projections

KNIME is my first tool when it comes for ETL and has quite a lot of nodes to perform machine learning models and also a good Deep Learning integration. (the Nodes are theses colored squared icons. They allow you to perform different operations like load data, sort, filter etc.)

But in my case I just want to perform the fit of a logistic model and Jupyter seems to have with the package scipy and curve_fit the best solutions available.

The logistic population growth model is the best choice to fit also a virus spread. In 1838 the Belgian mathematician Pierre François Verhulst introduced the logistic equation, which is a kind of generalization of the equation for exponential growth but with a maximum value for the population (K).

Logistic population growth model

When the population P(t) is small compared to the parameter K, then P/K is nearly zero and we get the approximate equation:

whose solution is:

Exponential growth

i.e. exponential growth. The growth rate decreases as P(t) gets closer to K.

Finally, we get after rearrangement the equation:

The total population increases progressively from P(0) at time t = 0 to the limit K.

Let’s implement this formula in Jupyter with python.

To fit the logistic model to the data we will use the scipy package with curve_fit.

To fit the model we take into account just the cases of the last 45 days (Update of Dec 5th: 90 days seems to give more accurate results). The reason behind this filter is that we want just to fit the last wave of the spread. Otherwise our assumption of the logistic model will not be correct and the model will not fit.

With the parameters found we will be able to project the cases for the next 30 days.

python code to fit the cases of every country with the logistic function

The code is available on my github-site here.

So first we load the covid-data from the Johns Hopkins Institute in KNIME.

Then we restructure, join the data and write it out as csv-file.

To load the csv-file in Jupyter and fit the data we need a Python Source node.

In this node we call the desired Jupyter notebook.

The following video demonstrate how to implement this step.

You don’t need to have a Jupyter Server running to run the Jupyter notebook in KNIME.
I found a blue dot in an old wallet of mine. Member those?
By: Hogan Torah
Tags: Taliban, Tableau, Tablet Repair, Talibanapalooza, Tabloide

I may be a librarian and an intellectual, but for years I even subscribed to The National Enquirer . I blamed Avi and Winifred, my doves. “It’s pages are exactly the right size to line the birdcage!”…
Dataviz #6 : la gestion de la COVID-19 par la France par Mickaël Andrieu
By: Mickaël Andrieu
Tags: Data Visualization, Data Science, Tableau, Covid 19, Weekly

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.
Ready, Set, Data Science!
By: Dan West
Tags: Python, Data Science, Tableau, Learning To Code, Learning

Where to start? Online courses and projects. Ok, which ones?

Data Science A-Z™: Real-Life Data Science Exercises Included by Kirill Eremenko

https://www.udemy.com/course/datascience/ Kaggle.com’s Python Tutorial

https://www.kaggle.com/learn/python

What’s my goal? Eventually land a data science job and maybe have some fun along the way.

Remember, “One step at a time.”
Tableau & its importance in Data Visualisation
By: Coding Ninjas
Tags: Data Visualization, Tableau, Data Science, Database, Machine Learning

A tableau is a tool that allows you to visualise data in the most constructive format which can help make business decisions. Basically, a business intelligence tool that makes better decisions for the company but it is not only limited to that.

Tableau also does that work which is mostly done on other platforms like Excel such as making pie charts, graphs, and storing data in file formats but it mainly focuses on Visual Analysis.

Visual Analysis is a workflow of certain businesses to understand that we need to know about analytics or business intelligence. Any business goes to the sequences of steps to understand or to answer a particular question about their product for understanding let’s take an example of sale business,

A sale business has some products that they sell in the market all these products are stored somewhere in the database, once the storing is done our next task is to perform data analytics using the ETL (Extract, Transfer, Load) tools that check for any corrections in that dataset.

Once that is done the data is transfer to Data Scientist which takes the insights outs of that data which is then shared among other members of the company which help in making a better decision. When the final decision is made then the next thing is to monitor all the changes in the sales and the process continues, this is termed as business intelligence.

It is used in mostly all steps of business intelligence and serves a role in better data visualisation. It offers many tools that are used in different parts of business intelligence all these tools serve different purposes and are used accordingly.

Continue reading the advantages and usage of Tableau, here.
Preppin’ Data — 2019W20
By: Jeevan Krishna
Tags: Tableau, Data, Tableau Prep, Data Science

Input

Patient level info

Cost per day based on no.of days stayed

scaffold for adding rows

Solution Steps

Based on the inputs provided and the output structure, I am not sure where do we use the check-up frequency in the overall solution. Join the patient level info with scaffold to increase the no. of rows so that you can calculate each day level totals. Create a calculation based on the day no. to show the cost Branch out the flow into 2 directions — One to aggregate the overall cost on Patient level and Other on the date level.

Output

Daily costs

Patient level costs

Prep Flow

The flow is published here — GitHub Link
Initial Exploratory Data Analysis On Japan Console Game Sales with SQL & Tableau
By: Chloe Wei
Tags: Games, Japan, Tableau, Sql, Data Analysis

Introduction

Introduction

This dataset contains a list of video games sales in NA, EU and JP region. It was generated by a scrape of vgchartz.com.

Fields include

Rank — Ranking of overall sales Name — The games name Platform — Platform of the games release (i.e. PC,PS4, etc.) Year — Year of the game’s release Genre — Genre of the game Publisher — Publisher of the game NA_Sales — Sales in North America (in millions) EU_Sales — Sales in Europe (in millions) JP_Sales — Sales in Japan (in millions) Other_Sales — Sales in the rest of the world (in millions)

For the purpose of this article, I will be focusing on the Japan region.
Preppin’ Data — 2019W19
By: Jeevan Krishna
Tags: Tableau, Data, Tableau Prep, Data Science

Input

Solution Steps

Delete unnecessary columns — Rank, Rider No., Times Convert Times into seconds by splitting the values Aggregate the data on Team name and count the no.of riders, calculate avg. gap in seconds Apply filters on count of riders to be atleast 7 and less than or equal to 6000 seconds on avg. gap to accommodate for 100 min avg. gap.

Output

Prep Flow

The flow is published here — GitHub Link
物聯網數據儲存與分析(下)
By: Minche Tsai
Tags: Redshift, IoT, Tableau, Business Intelligence, Softchef

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Easily Calculate Year over Year Growth in Tableau
By: Michel Burnett
Tags: Tableau, Tableau Public, Visualization, Bi

A quick tutorial on using Tableau’s year over year growth calculation.

Year over year growth is a popular metric for business success. Being able to find where growth may be hindered or lagging is crucial to any business, big or small. Tableau makes this easy with its relatively new addition of the year over year table calculation.

In this example I’ll be using a public dataset on global trade available here : https://catalogue.data.govt.nz/dataset?tags=imports+and+exports. I’ve put the “date” and “country” dimensions in the columns shelf and the “value” measure in my rows shelf to create a simple bar chart. Now we will add a table calculation that shows us the percentage difference from the previous year.

Drag and drop your value measure into the “Label” box, this will label the value amounts over the bars. Now click on measure and select “Quick Table Calculation” and then “Year Over Year Growth” from the drop down menu.

Now you should see the percentage change from the previous year over each of the preceding bars.
Most common street trees in Toronto visualized in Tableau
By: Anna Räder
Tags: Dataset, Nature, Tableau, Toronto, Trees

I visualized most common street trees in Toronto using the dataset from ArcGIS Hub. This dataset consists of City-owned trees located on road allowances across Toronto.

Hope you enjoy this summary. Scroll down for the list of the most common trees with photos and key facts.

Click here to access my interactive chart (treemaps chart) in Tableau Public.

Here is the list of the top 5 most common street trees in Toronto:

1. Norway maple (Acer platanoides)

Accounts for 13% of all street trees in Toronto.

Source of image: Wikipedia

Key facts: A species of maple native to eastern and central Europe and western Asia. It was brought to North America in the mid-1700s as a shade tree. (Source: Wikipedia)

2. Honey locust (Gleditsia tricanthos)

Accounts for 4.3% of all street trees in Toronto.

Source of image: Wikipedia

Key facts: It is native to central North America where it is mostly found in the moist soil of river valleys. Honey locust is highly adaptable to different environments, has been introduced worldwide, and is an aggressive invasive species. (Source: Wikipedia)

3. Colorado blue spruce (Picea pungens)

Accounts for 3.9% of all street trees in Toronto.

Source of image: Wikipedia

Key facts: It is native to North America. It is used as an ornamental tree in many places far beyond its native range. The blue spruce has blue-green coloured needles and is a coniferous tree.

4. Crab apple (Malus sargentii)

Accounts for 3.6% of all street trees in Toronto.

Source of image: Wikipedia

Key facts: A species of crabapple. The plant is a shrub growing about 6 feet tall. Malus sargentii is native to Japan but is commonly used as an ornamental shrub elsewhere. (Source: Wikipedia)

5. Silver maple (Acer saccharinum)

Accounts for 3.6% of all street trees in Toronto.

Source of image: Wikipedia

Key facts: A species of maple native to the eastern and central United States and southeastern Canada. It is one of the most common trees in the United States. (Source: Wikipedia)
BI工具比較：Tableau和FineReport的12個區別
Tags: 商業智慧, Tableau, 數位轉型, Business Intelligence, Bi系統建置

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore