
Explore tips to navigate the course, access notebooks, use the Q&A forums and Discourse chat, and get help for time series data analysis.
Explore a structured Python for time series data analysis curriculum covering NumPy, Pandas, and Statsmodels for visualization and forecasting with Arima, seasonal Arima, recurrent neural networks, and Prophet.
Install the Anaconda Python distribution, create and activate the tsa course environment using the provided yml file, and launch Jupyter notebook to run the course notebooks.
Explore NumPy, the numerical processing library for large arrays, and learn to create, index, and operate on arrays, plus how pandas builds on NumPy.
Import NumPy and begin creating arrays from lists and nested lists, inspect their shape, and explore arange, zeros, ones, linspace, identity matrix, and time series data.
Learn how to generate and reshape numpy arrays with rand, randn, and rand int. Set seeds for reproducible results and use max, min, argmax, argmin, and dtype.
Explore NumPy indexing and selection on one- and two-dimensional arrays, covering slicing, broadcasting, copies, and boolean conditional selection with a view toward pandas.
Master element-wise numpy operations and broadcasting for scalar and array arithmetic, with division by zero warnings, and apply functions like sqrt, log, and sin to arrays and sum across axes.
Practice numpy exercises by creating arrays of ten zeros, ten ones, and ten fives. Avoid overwriting example output by running only the prompt cell, since some results may be random.
Master NumPy exercise solutions for Python analysis by creating zeros and ones, arange sequences, and reshaped arrays. Apply indexing, slicing, and operations to generate matrices, random data, and sums.
Explore the pandas library for data analysis, built on NumPy, and learn series and dataframes, plus handling missing data, group by operations, indices, and data input and output.
Create pandas series from lists, numpy arrays, or dictionaries with a named index. Perform index-aligned operations between series and handle missing data as NaN, with upcasting to floats as needed.
Learn how to work with pandas dataframes by constructing them, selecting columns and rows, creating and dropping columns, and using loc and iloc for indexing.
Learn Pandas data frame conditional selection using boolean masks, filter rows by column conditions, and reset or set the index, with quick data frame summaries.
Learn how to handle missing data in time series with pandas by dropping, filling, or imputing values, using dropna, thresh, and fillna.
Learn to perform pandas groupby by splitting data by a category, applying aggregate functions like mean or max, and returning a per category summary with the group as the index.
Master common pandas operations on series and dataframes, including unique values, value_counts, conditional selection, apply, and columns and index handling with info, describe, and sort_values.
Learn how pandas reads and writes data across csv, excel, and html formats using read_csv, read_excel, and read_html. Locate files with pwd and specify full paths.
Use pandas to load Population by County CSV, inspect the data frame, list states (51 with DC), and calculate the 2010–2017 percent change to identify top states, practicing one-line solutions.
Master pandas workflows on census data: load data, inspect columns and head, compute unique states, top counties and states by population, and analyze percent change from 2010 to 2017.
Explore pandas visualization for time series: learn the available plot types, simple one-line plots, and basic customization, with exercises and solutions built on matplotlib.
Learn to visualize time series data with pandas, creating histograms, bar charts, line plots, area charts, scatter plots, box plots, KDE, and hexagonal bean plot in notebooks.
Learn to customize pandas plots for time series analysis, adjusting figure size, line style and color, and adding titles, axis labels, and legends using Matplotlib.
Explore Pandas data visualization by recreating a scatter of produced versus defective, and by plotting a histogram and a box plot by weekday.
Learn practical pandas data visualization by building scatter plots, histograms, box plots by weekday, and area plots with tweaks to color, size, line width, and legend placement.
Master the basics of Python date time objects, numpy date time64, and date ranges using arange, and explore pandas date time index for time series analysis.
Explore pandas date range creation and date time indices, including parsing with to_datetime, handling formats for European and US dates, and querying max, min, and argmin positions.
resample time series in pandas to turn daily data into yearly or monthly summaries using mean or sum, with a date index and plotting.
Learn to shift time series data with pandas by rows or by date frequency, manage NaN fill values, and understand how reassigning data frames preserves changes.
Explore rolling and expanding time series methods in pandas, computing moving averages with seven- and 30-day windows and visualizing the results.
Visualize time series data with pandas, exploring plot types, formatting, and axis labeling. Learn to set titles, x and y labels, and axis limits with a date time index.
Learn to customize time series visualizations by setting x tick spacing with matplotlib dates, using weekday and month locators, formatting ticks, and adding grid lines for clearer plots.
practice pandas time series with a milk production dataset from 1962 to 1975, convert dates to datetime, set date as index, and plot a line plot with month-based box plot.
Transform the date column with to_datetime, set a datetime index, plot the series to reveal seasonality and an upward trend, and create a box plot by month.
practice pandas time series analysis with the fred dataset from the federal reserve, building a datetime index, plotting monthly values, and exploring yearly means, rolling means, and 2008–2009 changes.
Learn to analyze time series in pandas by reading data, setting a datetime index, and plotting; compute percent changes, identify peaks, apply yearly means, bar plots, and a rolling mean.
Explore the Statsmodels library for time series analysis, learn decomposition, moving averages, and Holt-Winters methods, and perform statistical tests on trends and seasonalities ahead of forecasting in the next section.
Learn how to use the statsmodels tsa hp filter in python to decompose a time series into trend and cyclical components, discussing trends, seasonality, and cycles.
Explore ETS decomposition to separate time series into error, trend, and seasonal components using Statsmodels; compare additive and multiplicative models and visualize residuals with the airline passengers data.
Explore the theory of exponentially weighted moving average models (EMA) and how EMA overcomes SMA weaknesses by weighting recent data more heavily, reducing lag.
Explore how to compute exponentially weighted moving averages in pandas, compare with simple moving averages, and learn span, center of mass, half-life, and alpha parameters.
Explore the theory of Holt–Winters methods for time series data, including double and triple exponential smoothing with level, trend, and seasonal components, and the role of additive versus multiplicative seasonality.
Learn to implement Holt-Winters methods in Python using Statsmodels and pandas, with a code-along on the airline passengers data, handling frequency, fitting simple exponential smoothing, and comparing results.
Explore Holt-Winters exponential smoothing with additive and multiplicative trends and seasonality in a Python Statsmodels workflow, fitting models, comparing double and triple smoothing, and interpreting fitted values.
practice statsmodels time series exercises in a jupyter notebook with fred industrial production data from 1970–1989, plotting sma 12, ewma span 12, and holt-winters multiplicative triple smoothing.
Walks through statsmodels time series exercises, setting monthly frequency, computing a 12-month moving average, applying simple exponential smoothing and triple exponential smoothing with multiplicative seasonality, and visualizing results.
Explore general forecasting models for time series data, from Holt-Winters to ARIMA, and learn model selection with statistical tests.
Explore forecasting with Holt-Winters on time series and forecast future dates. Learn to perform a train-test split and evaluate predictions in a Jupyter notebook using multiplicative trend and seasonal components.
Learn to evaluate time series forecasts with regression metrics—MAE, MSE, and RMSE—by comparing predictions to true test data, and why accuracy, recall, and precision don't apply to continuous forecasts.
Evaluate forecast accuracy using mean absolute error and RMSE with sklearn, forecast 36 months via exponential smoothing with multiplicative trend and seasonality, and introduce stationarity and differencing for ARIMA.
Explore the theory of autocorrelation and partial autocorrelation, and learn how ACF and PACF plots relate to time series, lags, and ARIMA, with Statsmodels.
Explore plotting ACF and PACF in Python using statsmodels, compare non-stationary and stationary data with airline passengers and daily births, and learn how to interpret lag plots and confidence intervals.
Explore the ARIMA family—autoregressive, integrated, and moving average components; learn differencing for stationarity, ADF testing, seasonal SARIMA, and grid searches for PDQ terms in forecasting.
Explore autoregression (AR) models that forecast a time series using a linear combination of past values, with lag coefficients, a constant, and a white noise term.
Learn to implement an autoregression model (AR) with Statsmodels in Python on a US population dataset, compare AR(1), AR(2), and auto-selected lag, and forecast future values.
Explore descriptive statistics and tests for time series, including stationarity with the augmented Dickey-Fuller test, Granger causality, and model selection with Aicc and BIC.
Explore descriptive statistics and tests for time series with Statsmodels, performing the Augmented Dickey-Fuller test to assess stationarity and the Granger causality test on airline passengers and births.
Explore descriptive statistics and Granger causality tests, evaluate forecast accuracy with MSE, RMSE, and MAE, and reveal seasonality using month and quarter plots on the airline passengers data.
Arima theory explained through the autoregressive, integrated, and moving average components, their p, d, q orders, and how differencing achieves stationarity.
Learn to determine AR and MA orders for ARIMA models by reading ACF and PACF plots, using grid search with the PMD Arema library, and selecting models by AIC.
Use pyramid auto.arima to automatically select arima orders via stepwise search, comparing models with AIC for stationary and seasonal data; identify arima(1,1,1) and sarima 2,1,2 with 0,0,1,12.
Apply arma and arima models in python with statsmodels, using auto.arima, adf testing for stationarity, and train-test splits to forecast one month of data in part one.
Learn to build ARMA and ARIMA models for time series, use auto.arima for order selection, assess stationarity with ADF, interpret ACF/PACF, and forecast with a fitted ARIMA.
Identify and implement seasonal autoregressive integrated moving average (sarima) models, configure seasonal parameters P, D, Q and M, and use auto.arima to forecast with or without exogenous regressor variables.
Explore SARIMAX for seasonal time series analysis, incorporating exogenous variables such as holidays and weekdays, and learn to encode them with pandas get_dummies to improve forecasts.
Apply a seasonal sarima model to daily restaurant visitors, handle missing data, and evaluate weekly seasonality. Incorporate exogenous holiday variables to improve forecasts using auto.arima.
Enhance seasonal sarima models with exogenous variables like holidays using statsmodels. Retrain on full data and supply future exogenous values for accurate forecasting.
Explore vector autoregression (var) models that capture interdependence by regressing each variable on its own and others' lagged values. Learn steps to select k and p, fit, forecast, and retrain.
This code-along demonstrates vector autoregression for two interrelated time series—M2 money stock and personal consumption—using stationarity checks, differencing, AIC-driven p selection, and forecasting the next 12 months.
Forecast with vector autoregression by using results.dot.forecast with a five by two lagged Y for twelve steps, convert to dataframe, and undo the differencing to compare with the test set.
Explore vector autoregression moving average (varma) models by expanding two time series y1 and y2 with a moving average term, using p=1 and q=1 in a two-variable system.
Explore Varma models by applying vector autoregression moving average to money and spending data, using auto.arima to determine p and q orders, and compare performance to var and arma models.
Walk through a seasonal ARIMA forecasting exercise using California hospitality industry employees time series, performing ETS decomposition, Auto ARIMA orders, train-test split, MSE and RMSE evaluation, and a one-year forecast.
Learn to run and interpret forecasting solutions for time series. Includes plotting, seasonal decomposition, auto.arima, training/testing splits, rmse/mse evaluation, and forecasting one year ahead.
Explore deep learning for time series forecasting by building neural networks from perceptron models to LSTM and GRU, with Keras implementations and ARIMA comparisons.
Explore the perceptron, an artificial neuron, with two inputs, weights, and a bias; apply a simple activation rule to produce a binary output and represent it mathematically.
Connect multiple perceptrons into a neural network with input, hidden, and output layers, and explore activation functions like sigmoid, tanh, relu, plus z = w x + b, using Keras.
Learn Keras basics by building a small sequential neural network with dense layers to fit a noisy linear dataset, train over epochs, monitor loss, and predict y from x.
Explore recurrent neural networks for sequence data, including time series and text, and see how unrolling and memory cells enable sequence or vector outputs, paving the way to lstm.
Explore how long short-term memory (LSTM) cells prevent forgetting in long sequences by detailing forget and input gates, the cell state, and comparing GRU, with practical Keras text-generation applications.
Learn to forecast a monthly time series with Keras and recurrent neural networks, using a train test split, min-max scaling, and the time series generator to project future periods.
Learn to use the Keras time series generator to create input batches from scaled data for a recurrent neural network, using a history length to forecast the next time step.
Build and train a Keras time-series RNN with an LSTM layer of 150 neurons and the output, using a 12-step input from a time-series generator to predict the 13th point.
Build a Keras RNN for time series on a miles traveled dataset, covering data prep, seasonal decomposition, scaling, time series generator, and LSTM forecasting.
Explore the solutions for the Keras and recurrent neural network project, including data import, min-max scaling, time series generator, LSTM model, training, evaluation, plotting, inverse transform, and saving.
Explore multivariate time series with lstms to forecast multiple features, applying two changes: adjust input shape for feature count, and use one dense neuron per feature, noting arima alternatives.
Explore the Prophet library for forecasting time series with an additive regression model, including change points, yearly Fourier seasonality, weekly dummies, and optional holidays.
Learn to use Facebook's Prophet library with Python by formatting data into DZ and y, converting DZ to datetime, creating a monthly future dataframe, and forecasting with built-in plots.
Evaluate Prophet forecasts by preparing the data, performing a train–test split, fitting the model, and using cross-validation with RMSE and MAPE metrics to assess horizons.
Use Prophet to track and visualize trend changes in time series data, forecasting monthly values for hospitality employees and highlighting change points with a plotted forecast.
Explore how to switch Prophet seasonality from additive to multiplicative, train on full data, forecast 50 periods, and compare root mean squared error to select the best mode.
Welcome to the best online resource for learning how to use the Python programming Language for Time Series Analysis!
This course will teach you everything you need to know to use Python for forecasting time series data to predict new future data points.
We'll start off with the basics by teaching you how to work with and manipulate data using the NumPy and Pandas libraries with Python. Then we'll dive deeper into working with Pandas by learning about visualizations with the Pandas library and how to work with time stamped data with Pandas and Python.
Then we'll begin to learn about the statsmodels library and its powerful built in Time Series Analysis Tools. Including learning about Error-Trend-Seasonality decomposition and basic Holt-Winters methods.
Afterwards we'll get to the heart of the course, covering general forecasting models. We'll talk about creating AutoCorrelation and Partial AutoCorrelation charts and using them in conjunction with powerful ARIMA based models, including Seasonal ARIMA models and SARIMAX to include Exogenous data points.
Afterwards we'll learn about state of the art Deep Learning techniques with Recurrent Neural Networks that use deep learning to forecast future data points.
This course even covers Facebook's Prophet library, a simple to use, yet powerful Python library developed to forecast into the future with time series data.
So what are you waiting for! Learn how to work with your time series data and forecast the future!
We'll see you inside the course!