Get startedGet started for free

Creating seasonal groups

1. Creating seasonal groups

Welcome back! We’re now going to create some groups to represent seasons using a Calculated Field and we’ll apply our new groups to a map. Since we want to make groups that represent seasons, we need date data. I’ll bring Start Time to the Rows shelf and change the configuration to discrete Month. Now we have a clear list of the months. We want January and February to represent Winter, March and April to represent Spring, and May and June to represent summer. To do this, we’ll create a calculated field called Seasons. And here’s the formula for season. Similar to earlier chapters, we’re using datepart to get the month number and an if/then/else structure. Remember, that in this structure, as soon as it hits a true condition, it leaves and exits. So if the month is less than 3, it returns “winter”, if not it continues on to the other two statements. This else statement ensures that something will be returned. I can validate this calculated field by dragging it on to my table and we see the months are correctly categorized. One thing to notice is that our seasons are not ordered chronologically. I can right click on the seasons field and select sort from the menu. These first three are not useful for our usecase, but manual is. And here I can rearrange them chronologically and it will remain persistent throughout this workbook. Now, I’ll head to this premade worksheet that has a map visualization of the top 15 stations by volume. I’ll take seasons and drag it to color. And, I’ll change the marks type from circle to pie chart. Now the seasons are applied to each of these dots. If I turn on the mark labels, we get the volume of rides for each season at each station. I’ll drag ranking to labels, to get the ranking instead of each station. If I hover over my points, we see that the ranking is no longer shown. Let’s edit that by selecting the Tooltip card. I’ll insert the season and rank in the last line so that it says “Station rank for <Seasons>” followed by the ranking. Let’s try it out…. And our tooltip is properly updated. Let’s say we find the pie charts overwhelming, we can add the seasonal trip count information in the tool tip instead. I can go back to this sheet with my table and add the trip counts as text. To clean it up for the tooltip, I’ll take out the months and move seasons to columns. And, I’ll hide this column header. Now I’ll go back to a copy of the original map we started with. In the edit tooltip popup, I’ll insert the sheet I just revised that’s called season! Here we see there are many different ways to communicate information. Time for you to try it out!

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.