[MUSIC] Welcome back, it's time to tackle our time related questions. And one of the very best ways to visualize a trend over time is using a line chart. So that's what we're going to learn in this lesson. Let's get started. The next questions are, when do we see the most injuries? And what kind of seasonality do expect? Since we're talking about time, let's think about how we would do that. Pictures and time turn to data. What do the charts have in common? The time axis runs from left to right. So that tells us that we should put the date field into the column shelf because columns stack horizontally. The y-axis in those normal time trended graphs is the metric were trying to trend over time. Let's start with a whole new sheet this time. First drag the date field out to the columns. Wait, that's not a date, that's just a year. But, notice something weird? There's a small plus sign surrounded by a square on the left of that blue pill. Click it and you'll see that another blue pill magically appears to the right of year, labeled quarter. And now we have more columns showing up in our view, nested below the years. This is called a hierarchy, and Tableau automatically makes one for any date field. If you keep clicking the plus signs the date data gets more and more granular as you go. If this field was a date and time type, then we could keep expanding down and down and down to the second. As it is, even though there's a day in this data set, turns out it's only the first of the month. So we can get rid of the last pill by either clicking the minus sign on the month pill, or just by dragging the day pill off the View. Again, since we're wanting the number of incidents, let's drag number of records from the measures to the row shelf, because we said that we wanted the height to indicate our metric. Tableau sees that we have dates and automatically creates a line chart, because lines are really good for time trended data. Other chart types could work, but lines tend to work best. Now, due to the type of date field we're using here, Tableau breaks the lines for each quarter. Let's just clean things up a little and drag the quarter off the view. [SOUND] Much better. You'll also notice though that there's a horizontal scroll bar on the bottom if your screen is too small. Personally, I hate scrolling right and left, and I also hate seeing that raggedy nastiness created by the month names all being different lengths. Just to know, doing data visualization is often a lot of over obsessing about making things neat and orderly. So to get rid of the scroll bar, if you have one, or two get rid of this white space if you have it, change the fit from Standard to Entire View using the drop-down at the top of the window. Then, to take care of the raggedy months, right-click on any month on the x-axis and click format. In the formatting pane on the left, make sure that Header is selected, and then in the Dates drop-down change from Automatic to First Letter. [SOUND] So much better already. Now each month is only one letter long, but we still get the idea. Close the formatting pane, because we don't need it anymore. Now each month is only one letter long, but we still get the idea. The less ink that's cluttering up our vis the more the data, the important stuff, will pop. There's some other decluttering exercises we can do, but we'll cover that later. So now we have a trend over time of bus injuries. We can kind of see here that the number of injuries might be trending upward over time, but we can't tell too much about seasonality. Let's rename the sheet incidents over time and duplicate, then go to the new sheet. To answer the seasonality question, let's drag the year from the column shelf to the Detail button on the Marks card. It's kind of a mess, isn't it? But putting the years all on top of each other this way, we can see that there doesn't appear to be much in the way of seasonality. To double-check let's just for a minute change the month pill to quarter, By right-clicking and then clicking Quarter. Since we know the data ends in September 2018 and it looks oddly low, we can probably assume that this does not include all of September. Other than that though, maybe there is a little bit of seasonality, in 2016 and 2017 at least. The data trended pretty similarly, and it looks like maybe 2018 was on its way there, too. Since this is more promising to demonstrate our seasonality, or lack thereof, let's leave it as is not change it back to month. We've got that in the time trend anyway. Let's rename the sheet incidents by season and keep going.