VizWiz

Launch, grow, and unlock your career in data
Showing posts with label change. Show all posts

May 25, 2024

How to Calculate Year over Year Change in Tableau

No comments
With Level of Detail Expressions, calculating year over year change is simple with the 7 steps.

January 31, 2023

How to Calculate Day over Day Change Excluding Weekends

No comments

In a previous tip, I showed you how to calculate day over day change and build 3 KPI cards.

However, this does not cover the case when you need to ignore weekends. In this #Tableau tip, I show you how to calculate daily change excluding the weekends.

You can copy/paste the calculations from below the video. Enjoy and good luck!


Calculations

  1. Latest Day
    {MAX([Order Date])}

  2. Weekday for Latest Day
    DATEPART('weekday',[1. Latest Day])

  3. Sales for Latest Day
    INT([Order Date]=[1. Latest Day])*[Sales]

  4. Previous Day
    IF [2. Weekday for Latest Day]=2
    THEN [1. Latest Day]-3
    ELSE [1. Latest Day]-1
    END

  5. Sales for Previous Day
    INT([Order Date]=[4. Previous Day])*[Sales]

  6. DoD Change
    SUM([3. Sales for Latest Day])-SUM([5. Sales for Previous Day])

  7. DoD Change %
    [6. DoD Change]/SUM([5. Sales for Previous Day])

  8. Positive Change
    [7. DoD Change %]>0

January 19, 2023

How to Calculate Day Over Day Change

No comments

In this tip, I going to show you how to build 3 different KPI cards for measuring day over day change. In just a few steps, I’ll show you how to calculate:

  1. Sales for the most recent day
  2. Sales for the previous day
  3. Difference in sales between those two dates
  4. Percent difference in sales between those two dates

I'll then show you how to create these 3 different methods for displaying the KPIs so that you can create those that are most useful for your audience.


RESOURCES

  • Data - https://data.world/vizwiz/sample-car-sales
  • Month over Month Change - https://www.youtube.com/watch?v=ViD3vclgNv8
  • Year over Year Change - https://www.youtube.com/watch?v=YuxYr4_l2ww


January 3, 2023

#MakeoverMonday 2023 Week 1 - The Change in Greenhouse Gases in the Atmosphere

No comments

2023 is here and #MakeoverMonday will be here the entire you to help you continue to learn and improve. Come on the journey with us each week. Build your portfolio. Showcase your skills. You just might get that job you've been seeking. It's happened, a lot, by participating every week.

For week 1, we were analyzing greenhouse gases in the atmosphere from 1979-2021. The original visualization is quite simple.


We have CO2 and total gases on the left axis and the variance to 1990 on the right. Overall, the chart is pretty easy to read, with the exception of knowing that the red line is always compared to the 1990 value. That definitely needs to be more clear. It's also missing a title, so without the website it is posted on, you wouldn't necessarily know what it's about.

For my viz, I started by reproducing the original, but it doesn't look as good because the data we have starts at 1979. So you miss the big upward curve. From there, I focused primarily on making good looking sparklines that show comparisons with a parameter action. I also showed how to create an "area chart" with multiple colors. I'm going to create a tip video for it; I like how it turned out.

Here's the livestream and below is the visualization for you to interact with. The viz does not render properly on Tableau Public, but hopefully you get the idea.

I hope you continue to join me throughout the year so that we can learn together.

Have a wonderful 2023!



December 22, 2022

How to Calculate Customer Churn Rate in Tableau

No comments

In this tip, I’m show you how to calculate the 3-month and 6-month churn rate in Tableau. To calculate churn rate, all you need to do is:

1. Create 4 calculations

2. Follow the 8 simple steps to build the view

Customer churn rate is the % of customers that you’re losing in a predetermined time period. Churn rate is bad because if you don’t know how many customers are leaving, then you won’t know the impact on your revenue and you would be able to make changes to reduce churn.

October 24, 2022

#MakeoverMonday Week 43 - How have Major League Baseball Pitch Types Changed?

No comments

This week's data set was pretty simple. We had 21 baseball seasons and a column for each pitch type. Pivoting the metrics made it much easier to work with for me as I could then split the view by pitch type.

During #WatchMeViz (below), I create a trellis view, showed how to create groups, sets, set actions, sparklines, LODs, custom number formatting, creating a mobile view, and more.

Thank you for tuning in. Here's the video and below is my visualization.

September 20, 2022

Comparing Change Between Time Periods with a Scatterplot

No comments
Displaying change in a scatterplot can be challenging. One of the simplest methods, if you only have 2 time periods (e.g., this year vs. last year), is with a connected scatterplot. These are a fantastic visualization for showing the direction of the change AND the amount of change.

August 17, 2022

Analyzing Seasonality with Cycle Plots

No comments
Cycle plots are exceptionally useful for analyzing seasonality in time series data. In this video, I walk you through two examples that show the limitations of traditional time series analysis and two examples of how cycle plots overcome these problems. 

Inspired by: Jon Schwabish
Download the workbook here.

April 19, 2022

How to Calculate YTD vs. Prior YTD Based on a Selected Date

No comments
In this tip, I show you how to calculate year over year change based on a date selected with a parameter. The use case is to calculate YTD sales depending on the date selected and compare it to the prior YTD sales for the same period.

July 21, 2021

How to Compare to the Prior N Months Using the IN Function

No comments
This tip comes from an exercise I did alongside DS21 to find different ways to compare to the prior 3 months. Owen Barnes came up with the method using the IN function upon which this tip is based.

Check out how we did this same exercise with a table calculation and a level of detail expression on Owen's blog here.

May 19, 2021

#WOW2021 Week 20: Can you compare Same Day to a Selected Date?

No comments

Wow! This workout will really test your knowledge of table calcs. The challenge comes from Lorna; view the requirements here.

The main purpose of this challenge is to get familiar with dates and parameters. Fortunately, every Wednesday I host what we call "Wise Up Wednesday" during lunch for my colleagues at The Information Lab and The Data School. We needed all of our brain power for this one. For us, the toughest part wasn't writing the calculations themselves. Rather, it was the logic required for the calculations.

From Lorna:

What if you want to compare a date you choose to the same DAY. For example, Tuesday 18th May 2021, would compare to Tuesday 19th May 2020 for the previous year, and Tuesday 20th April for the previous month. The reason you would want to do this is to compare the Tuesday to Tuesday.

This is where the logic gets tricky. We approached the solution by taking one version at a time, meaning we started by creating the calcs for the same day last year before we went onto the other two scenarios.

We got the in the end. I'd recommend building everything as a table, then change it into a chart later. It's much easier to follow what you calcs are doing.

Good luck! Here's our solution:


May 10, 2021

#MakeoverMonday 2021 Week 19 - The Cost of 1GB of Mobile Data in Every Country

No comments
This was my first time making a World Tile Map (thanks for the template to Neil Richards). Download the template here

In my version, you can view the cost overall or you can compare to a selected country. The title will update automatically depending on if you've selected a country or not.

WatchMeViz



Visualization


January 13, 2021

How to Create a Candlestick Chart

No comments

 What is a Candlestick Chart?

A candlestick chart is a style of financial chart used to describe price movements of a security, derivative, or currency. Each "candlestick" typically shows one day, thus a one-month chart may show the 20 trading days as 20 candlesticks. Candlestick charts can also be built using intervals shorter or longer than one day.

It is similar to a bar chart in that each candlestick represents all four important pieces of information for that day: open and close in the thick body; high and low in the “candle wick”. Being densely packed with information, it tends to represent trading patterns over short periods of time, often a few days or a few trading sessions.  

~ Source: Wikipedia

In this tutorial, I show you how to build a candlestick chart in Tableau. They are built as Gantt charts with a couple of simple calculations. Follow along by downloading the data set here

November 3, 2020

How to Create a Floating Bar Chart

No comments

Floating bar charts are similar to Gantt bar charts, except they don't use dates or duration for the length of the bar. In this video, I show you how to use floating bar charts for comparing metrics.

Example 1 - Comparing mental health syndromes between women and men

Example 2 - Comparing year over year sales

Data Sources:

  1. Mental Health Symptoms - https://data.world/makeovermonday/2020w27-comparing-common-mental-disorder-by-sex
  2. Superstore 2020.3 - https://data.world/vizwiz/superstore-20203

November 18, 2019

#MakeoverMonday: Tween and Teen Smartphone Ownership

No comments
This week, we're looking at the change in smartphone ownership for tweens and teens between 2015 and 2019.

SOURCE: Morning Brew

What works well?

  • Clear title
  • X-axis is clearly labeled
  • Including the data source
  • Colors are easy to distinguish
  • Vertical lines help draw the eye to compare the years within each age
  • Including labels since the y-axis is hidden

What could be improved?

  • The title could be less bold.
  • The title uses the color for 2015, but it's not related to one year only.
  • The dots are distracting since they are so large.
  • The labels are helpful, but do they need to be so big?
  • With the vertical lines connecting the dots within the year, and the line connecting the ages across the years, I'm not sure which is more important. Given the title, the focus seems like it should be on comparing years within an age.
  • The vertical lines don't need to be so broad.

What I did

  • Removed the lines to make the focus comparing the ownership within an age group
  • Surrounded the dots with a band to ensure the user reads the data within each age group
  • Colored the bands by the change to accentuate the ages that have changed the most
  • Included the labels, but made them very small as to not distract from the analysis
  • Created a mobile version for practice

April 30, 2018

Makeover Monday: Annual Change in American Bee Colonies

2 comments
This week Makeover Monday is collaboration with #VizForSocialGood to analyze bee colonies in America. The data and visualization come from Bee Informed.


What works well?


  • When you hover over a state, the value is indicated on the color legend.
  • Informative tooltips
  • Good filtering capabilities to customize the view
  • Very responsive tooltips
  • Displaying the states and territories outside the continental US separately

What could be improved?

  • A diverging color scale is typically used to indicate positive and negative values. In this case, all values are positive.
  • If you do want to use a diverging palette, the colors should merge at the median.
  • A filled map makes smaller state difficult to compare to larger states.
  • There's no sense of the change over time. Are colonies increasing or decreasing?

My Goals

  • Create small multiple maps that show each year
  • Make the story about the change, rather than the specific values
  • Use highlight actions to make it easy to see a state across all maps
  • Incorporate the total annual loss into the tooltip

April 9, 2018

Makeover Monday: Arctic Sea Ice is Disappearing Fastest in Summer Months

No comments
I'm writing this having just finished a bike tour of Rome with my family in an absolute monsoon. Global warming is proven to cause unusual volatility in the weather, including hotter summers, extreme winter storms, and changing warm water patterns around the earth. This warming is most evident near the Arctic, where ice levels are at all time lows and the cycle of melting is accelerating year upon year.

So when I found this visualization by the National Snow & Ice Data Center, it seemed an appropriate topic for Makeover Monday. One of the most fun elements of this data set is that it includes only two columns: date and sea ice extent.


What works well?

  • Without even trying, it tells a compelling story.
  • The interactivity is fabulous. I really like being able to simply click on an item on the legend to have it added or removed as a highlighted line.
  • Including the 1981-2010 median along with the IQR and IDR provides great context.
  • Defaulting the view to show 2012 (the previously worst year for arctic ice) to 2018 helps show how 2018 is looking to surpass 2012 (in a bad way) by a lot.
  • Subtitle explains what sea ice extent means
  • Good use of simple colors
  • Great example of using highlighting for context

What could be improved?

  • The x-axis could be simpler by only showing the month names and removing the word "Date" from the axis title.
  • Make the title more impactful

My Goals

  • First, I wanted to rebuild the original and see if I could make it any better. I couldn't.
  • Second, build a spiral diagram that shows the months around the outside, but this only worked well when it was animated.
  • Finally, I settled on a different take on the metric that swaps the months and year on the original. That is, put the year on the x-axis and month on each line. This gave me only 12 lines which looked less busy and helped me see patterns for each month.
  • Next, I included a line that is the average of each year (black line).
  • I then decided to look at how each year of each month changed compared to 1979. I went with a percent change because I think that provides more context.
  • Lastly, I included a highlighter for the months and included some BANs of the actual values for comparison.

Click on the image for the interactive version.

April 1, 2018

Makeover Monday: World Wine Production

6 comments
This week Eva provided a simple data set and a simple viz from the International Organisation of Vine and Wine.


What works well?

  • It's a simple line chart, which makes it easy to understand.
  • The red line stands out well against the white background without being too bright.
  • The units on the axis are labeled.
  • The title tells is what the line represents.

What could be improved?

  • The subtitle could be moved to a caption below the image.
  • The axis has a strange scale. Why does it start at 180?
  • Adding the drop lines makes it look like the length of those lines is important, but if you compare the length of the lines, then that could be misleading due to the axis starting at 180. I'd remove those lines.
  • The year labels are diagonal.
  • Each year doesn't need a label.
  • Why doesn't the source document contain data for all of the years?

My Goals

  • It's Easter and I have basically no time to work on this, so do something quick.
  • Mimic what we created for Workout Wednesday week 33.
  • Focus on the relative change from a chosen period instead of the absolute change. For me, this is more meaningful if you want to see how much a country has changed and it normalizes all of the countries.

That's it. All done!

January 1, 2018

Makeover Monday: How Has U.S. Consumption of Poultry and Livestock Changed since 1965?

3 comments
Welcome to another year of Makeover Monday! This year, we're partnering with data.world to host our data, be a platform for discussion and to welcome other tools to the project.

For week 1, we're looking at this chart from The Atlas about American poultry and livestock consumption. The data comes from the National Chicken Council (yes, there is such a thing) ; note that the source data is slightly different from the chart as the data is more up-to-date.


What works well?

  • Using distinct colors
  • Line chart shows the consumption trend well, particularly the increase in chicken consumption
  • Including the word "pounds" on the top axis label
  • Displaying every 5 years on the x-axis
  • Including a solid line at zero
  • Using light gridlines

What could be improved?

  • There's no interactivity, making it impossible to know the exact values
  • Labeling the start and end of the lines would help give the change more context.

My Goals

  • Since the original chart is pretty good as a line chart, stick with lines.
  • Focus on the change since 1965.
  • Include big labels on the ends of the lines
  • Use colors that associate more with the type of meat
  • Remove as many gridlines and axis lines as possible to move the focus even more to the lines

With those goals in mind, here is my first Makeover Monday of 2018. Let's make this an amazing year! And remember to join the conversation on data.world, where you can embed your visualisations live (or simply post an image with a link).

August 7, 2017

Makeover Monday: How has access to toilets changed for girls in India?

No comments
Eva picked quite an interesting and important topic this week for Makeover Monday week 32 - access to toilets for school girls in India. Coming from a western country, girls and boys have always had equivalent access to restroom facilities, so the topic itself has been a good learning experience for me. I hope this week the Community can make some really impactful vizzes.

Let's have a look at the original:


What works well?

  • The filled map helps you easily identify which States fall into which categories.
  • The colors work well together.

What could be improved?

  • The title doesn't make sense. What does access over sanitation mean?
  • Sanitation is spelled wrong in the title.
  • The legend is cut off.
  • Making comparisons across the maps is nearly impossible.
  • Making comparisons across years IS impossible.
  • There's a lack of explanation as to what the data means.
  • There's a lack of insight.
  • Labelling each State makes the maps look very cluttered.
  • There's no call to action.

My Goals

  • Provide insight as to which States have gotten better
  • Use a more meaningful metric rather than separating the two metrics
  • Simplify and declutter the visualisation
  • Highlight what's important
  • Emphasize the inequality of access to toilets for girls

With those goals in mind, here's my Makeover Monday week 32.