Get startedGet started for free

Slicing and dicing

1. Slicing and dicing

All right, we're going to continue our trend analysis. We want to look at time segmented into four periods of the day. midnight to six am, six am to noon, noon to six pm, and then six pm to midnight. This is a calculated field that will accomplish this. Again, it uses an IF THEN ELSE structure. In datepart, we want the hour, which will be a value between 0 and 23. If the hour is greater than or equal to 0 and less than 6, it returns night. So midnight to 5:59am will be called night. Then, we have hours greater than or equal to 6 and less than 12, that’s morning between 6am to 11:59am. The same structure is repeated for afternoon but between 12 and 5:59pm. Any hours that don’t fit the night, morning, and afternoon blocks, will be called evening. All right, our first viz will include Time Block, weekday, and gender. So we’re switching from customer segmentation to gender segmentation. Let’s use Show Me to illustrate another approach to building visualizations. I’m going to control click gender, time block, and counted rows. So that’s two dimensions and one measure. In the show me window, let’s do Tree Map. This will help me get started. I'm going to bring start time to rows to be able to create the segmentation by weekday, so I’ll change this to be a discrete, weekday presentation. I’ll stretch out the fit and close up show me. I’m going to take time block to color so that it’s easier to analyze quickly who’s using what when. I’ll bring the counted rows field to the Text Label marks card and apply a quick table calculation of percent of total. And I’ll have it compute across rather than down, so that I have a total of 100% for each day. I now have a completely different way to analyze the data and potentially trends. The last visualization we are going to build is a bubble chart. Let's take gender to our column shelf. We’re going to exclude Null values for gender. We simply don’t have the data, so let’s omit them. Now, I'm going to bring several things onto the marks card to be able to bring this to life. Let’s bring counted rows, or number of trips, to size. Start time is going to come on twice, to text and then color. So to the text label marks card and there, I want it to be presented as continuous by hour. Note it’s continuous, so I’m picking from the lower half of the menu. Let’s change this to circle so we can get a bubble chart. Again we bring start time to the color marks card. We want this to be discrete weekday. Now, I’ll have segmentation done by each of the days of the week. Some interactions to note. You can slide the order in the legend to change the order in the visualization. Now we can have our weekend days on the outer rim. We can also balance white space and drag headers to different sides. All right, let’s wrap up the chapter!

2. Let's practice!