Get startedGet started for free

Preparing the data

1. Preparing the data

Alright, we have our newly arrived data here. As you can see, the Trips and Stations table have been loaded in Tableau. Loading data is outside of the scope of this course, so we won’t expand on that here. Under each table, its dimensions and measures are displayed. First things first, we need to look at what has landed in the dimensions and measures section. Let’s make sure that our numeric values are fields that we would want to aggregate when we bring them onto the canvas. And we have four measures here that we don’t want aggregate by default. So we want to control-click birth year, bike-ID, longitude, and latitude, and then we can slide them across the dividing line between dimensions and measures. They will be read as dimensions by default from now on, but we can always switch them back if needed. Next, we’ll create a table to size up our data. First, I’ll add “From Station Name” to the sheet to get a list of all the station names. The “Add to sheet” functionality is the same as dragging the fields to the sheet. I’ll add measure values to the sheet to get a table quickly. Right away, notice that “Docks” and “Tripduration” are summed up by default. I want to know the average number of docks so I’ll change that in the dropdown. We’ll do the same with tripduration to know the average length of a trip started at each station. Tripduration is measured in seconds which is not a useful unit for us to communicate in. So along with that, we'll use our ability to create a calculated field to have a column that is a converted version of tripduration in minutes. The quickest way to accomplish this is to right-click on the field and use the create menu from there. This dialog box appears with the field already populated inside. This is going to be my trip duration in minutes, so I’ll give it that name, and I'm simply going to divide this by 60. And then I’ll drag the new field into this box to get it into our table and again change the aggregation to average. I’m also going to change the fit of the view to “Fit Width” to have my data fill up the space, which will make things easier to inspect. Looking at our new field, this is clearly being rounded. Any time we create a new field, we’re going to want to check its default properties to make sure that every time it’s on the canvas, it’s presented the same way. So within Default properties, we select “Number Format” and for this number, we'll use a custom configuration. We’ll display the field with one decimal point and we’ll add a suffix for the unit, which will call mins for short. Note the space here. And now it’s presented nicely in the viz. Looking at my column headers, this field isn’t clear. Tableau automatically generates it based on the dataset file name and it represents the number of rows or in our case, trips. To make that clearer, I’m going to edit its Alias to be Number of Trips. Our final task here is to add a highlighter, which can be found in the analysis menu on top and then down to highlighters. We see the fields available for highlighting and we’re going to choose “From Station Name”. And now we have this box on the side. So, if I’m looking for a station, I can select it from the list to have it highlighted. If I have several that have a common phonetic element, it will show up like this. What’s great is that it gives me a highlight on the rows in the context of everything else. It doesn't reduce down the rows as filters do. Alright, it’s now your turn!

2. Let's practice!