And effective initial step for characterizing the nature of what time it is and for detecting potential
problems is to use data visualization.
By visualizing the cities, we can detect initial patterns, identify its competence and support potential
problems such as outliers, unequal spacing and missing values.
The most basic and informative plot for visualizing our time cities is the time block.
Our time plot is simply a line chart of the city's value over time.
So the time values go on the horizontal axis and the value of the valuable.
We are monitoring goes on the y axis.
If you look at this example here, we had and tracked data, monthly data with ridership numbers.
It was from January 1991 to March 2004.
It was monthly data and in the form of our table, we convert this table into a line plot.
And in this, you can see the pattern of ridership over time.
A second step in visualizing our time cities is to examine it more carefully.
The following operations are some of the examples of how you can dig deeper.
Using visualization.
Foster's zooming in, zooming in, is basically looking at a shorter period of pain within the series
instead of the larger pillar of pain.
The idea is that we will not be able to figure out weekly patterns when we are looking at a plot of
several years.
Zooming in to a shorter period can reveal patterns that are hidden when viewing the entire cities.
This is especially important when the times it is this long in example.
Here in the first graph, we plotted the entire data from January 1991 to October 2003.
There's was a lot of data.
And the seasonal effect is not coming out clearly in this data because the data points are getting squished
together.
But if you take out only two years from it.
That is if you plot from January 96 to December 1997.
Then you can clearly see that within each year there is a rise and a dip.
This seasonal effect in ridership can be viewed only if you look at a shorter window of pain.
So you can see that the ridership is less.
And Dan Ferb.
It increases and reaches a maximum point in the summer season.
And then it again starts to dip and again reaches a low point in December then.
It again starts to increase.
And this is a seasonal type of pattern.
We were able to view this because we zoomed in into a smaller part of data instead of looking at the
larger picture.
So zooming in helps us view the patterns that are hidden in smaller part of the same cities.
Next operation is adding trendlines.
So we are usually interested in finding the overall trend in the variable, and one way of better capturing
the shape of the trend is to add a trend line, trend lines, approximate trend in the data.
There are several types of clean lines, such as linear trend line quadratic and exponential drilling's.
We will learn how to draw a trend line on our data in the coming videos, next operation that we can
do is suppressing seasonality.
Here also, we are trying to identify the overall trend in our data.
And it is often easier to see the trend when seasonalities suppressed by suppressed, we mean that we
are trying to remove the effects of seasonal variations in the variable.
Suppressing seasonal patterns can be done in three ways.
One is by planting the seeds at a cruder timescale.
For example, if there is seasonal variation, such as ice cream sales increasing in summer and decreasing
in winter.
If we plourde this Eardley.
This seasonal effect will be removed and we will be able to see the overall trend in ice creams it.
A second option is to plot separate time plot for each season.
So instead of applauding for all those reasons, we applaud DeSales for some words of different years.
A third and a more popular option is to use moving average blotz.
We will discuss moving average plots and becoming sections two, if you look at the example here.
This is the same ridership data from January 1991 to September 2003 when we zoomed in.
We were able to identify seasonal effect, and that is the ridership was increasing in the month of
summers and decreasing in the month of winters.
Now, to identify a trend, we are aggregating the total ridership in an ear.
And plotting it here.
This is the first point that I told you.
That is by plotting these series at a cruder timescale.
We can remove this seasonal effect and look at the trend.
Two, if you look at the total ridership in that particular year and you applaud that.
This is the line plot we get and this plot is telling us the overall trend in ridership over the years.
And from this trend, you can observe that since 1996, dictatorship is nearly constantly increasing.
There is a somewhat linear increase in ridership since 1996.
So this kind of observations can be made when you remove seasonality and only look at different.
Next operation is plotting a lag.
Scatterplot.
Scatterplot are basically used to explore the relationship between two variables.
And it is often the case in times it is forecasting that the next value of the DBL is somewhat dependent
on the previous value of the variable.
Previous observations in a time, these are called lag's.
So the previous observation that is previous timestep is called lag one.
Observation at two times turps ago is called lag two and so on.
So you often plot a scatterplot to explore the relationship between each observation and a lag of that
observation.
For example, if you're trying to plot a scatterplot for that based in Breacher vs. the previous day's
templated, it looks something like this.
You can see here, although it is not a perfect straight line, but this type of graph is suggesting
that there is a positive relation between previous day's temperature and the next day's temperature.
That is, if the previous day value is large.
Next day, value is likely to be large.
For example, if previous day value is more than 15, it is very likely that the next day value will
be more than 15 because most of the observations lay there.
So this was a plot of land, one that is on y axis.
We have wildy plus one and on x axis we have VIP.
We can similarly applaud other leg values also.
So if we want to block Blagg five on y axis, we can have white people as one.
And on X-axis, we can take white T minus for.
But practically.
The impact of order values on the recent values is less at.
So the relationship that we will see will be more diffused.
So you'll see somewhat like this where the values are more randomly distributed.
And there is no linear relationship clearly visible in the distribution to lag.
Scatterplot helps us get a hain't, whether there is a relationship between current values and the values.
And if you see such a relationship, it makes sense to use lag features in your analysis.