Welcome to the course repository for Practical Python for Time Series Analysis on LinkedIn Learning.
In this course, Python and data scientist Jesus Lopez focuses on practical time series analysis in Python, emphasizing explainability and discovering causal relationships. Discover methods for understanding why patterns emerge, what variables drive changes over time, and how to interpret results responsibly. All topics are taught through hands-on examples, mainly from the energy sector, so you can apply insights directly to real-world data. Build the understanding you need to transform raw time series data into meaningful explanations that inform strategic decisions.
- Time Series Fundamentals: Understanding time-indexed data structures in pandas
- Data Aggregation: Mastering groupby, pivot, and resample operations for time series
- Statistical Analysis: Applying regression techniques to temporal data
- Forecasting Models: Implementing SARIMA, Exponential Smoothing, and Prophet
- Practical Applications: Working with real-world datasets from energy, finance, and economics
- Basic Python knowledge
- Familiarity with pandas and NumPy
- Understanding of basic statistics
- Click the "Code" button on this repository
- Select "Open with Codespaces"
- Click "New codespace"
- Wait for the environment to build (this may take a few minutes)
- The devcontainer will automatically install all dependencies using
uv(ultra-fast Python package manager)
- Install Docker Desktop
- Install VS Code
- Install the Dev Containers extension
- Clone this repository
- Open the repository in VS Code
- Click "Reopen in Container" when prompted
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Clone this repository
-
Create a virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install pandas pyarrow fastparquet plotly nbformat nbconvert seaborn scikit-learn statsmodels ipykernel matplotlib numpy scipy prophet ruff jupyter notebook
-
Install Jupyter kernel:
python -m ipykernel install --user --name time-series-analysis
-
Ensure Python 3.10+ is installed
-
Clone this repository
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install pandas pyarrow fastparquet plotly nbformat nbconvert seaborn scikit-learn statsmodels ipykernel matplotlib numpy scipy prophet ruff jupyter notebook
-
Install Jupyter kernel:
python -m ipykernel install --user --name time-series-analysis
practical-python-for-time-series-analysis/
├── data/ # Datasets organized by source
│ ├── EIA/ # Energy Information Administration data
│ ├── FRED/ # Federal Reserve Economic Data
│ ├── UCIrvine/ # UCI Machine Learning Repository data
│ └── YFINANCE/ # Yahoo Finance data
├── modules/ # Shared utility functions
│ └── utils.py # Time series analysis helpers
├── notebooks/ # Course materials
│ ├── 1_Foundation/ # Basic time series concepts
│ ├── 2_Aggregation/ # Data transformation techniques
│ └── 3_Regression/ # Statistical modeling
└── pyproject.toml # Project configuration and dependencies
- Working with datetime indices
- Time series visualization
- Joining temporal datasets
- GroupBy operations for time series
- Pivot tables with temporal data
- Resampling and frequency conversion
- Simple linear regression with time series
- Categorical variables in temporal models
- Feature engineering for time-based predictions
The course uses real-world datasets from various domains:
- Energy: California electricity demand and generation data
- Economics: Federal Reserve economic indicators (CPI, unemployment, etc.)
- Finance: Stock and ETF price data
- Classic: Airline passenger data for demonstration
Key Python packages used in this course:
- pandas: Time series data manipulation
- statsmodels: Statistical modeling and forecasting
- plotly: Interactive visualizations
- scikit-learn: Machine learning utilities
- seaborn: Statistical plotting
- Review the notebook examples in each module
- Check the
modules/utils.pyfile for reusable functions - Refer to the official documentation of the packages used
This project is licensed under the terms included in the LinkedIn Learning course materials.
Jesus Lopez
Python and Data Scientist, Trainer, Consultant
Check out my other courses on LinkedIn Learning.