Skip to main content

BATEM Tutorial

Welcome to the BATEM tutorial. This guide will help you learn about different aspects of energy management through hands-on exercises using Python and Jupyter notebooks.

Overview

This tutorial consists of:

  • Interactive Jupyter notebooks (named notebookx_XXX.ipynb)
  • Lecture slides (named slidesx_XXX.pdf)

Getting Started

Access the MyBinder project to start the tutorial.

Depending on your internet connection, you may have to wait a few minutes to start the tutorial.

Important:

  • If you are unable to access the MyBinder environment, you can download the project files and run the notebooks locally.
  • To do this, you need to go through the following steps:

Local Installation Guide

  1. Install Python

    • Download Python from python.org
    • Choose the latest Python 3.x version
    • During installation, make sure to check "Add Python to PATH"
    • Verify installation by opening a terminal and typing (PowerShell in Windows, Terminal in macOS/Linux):
      python --version
      
  2. Install Visual Studio Code

    • Download VS Code from code.visualstudio.com
    • Install VS Code following the default installation steps
    • Open VS Code and install the following extensions:
      • "Python" by Microsoft
      • "Jupyter" by Microsoft
  3. Set up the Python Environment

    • Open a terminal in VS Code (Terminal -> New Terminal)
    • Create a new virtual environment:
      python -m venv venv
      
    • Activate the virtual environment:
      • On Windows:
        .\venv\Scripts\activate
        
      • On macOS/Linux:
        source venv/bin/activate
        
    • Install required packages:
      pip install -r requirements.txt
      
  4. Run the Notebooks

    • Open the project folder in VS Code
    • Open any .ipynb file
    • Select the Python interpreter (venv) when prompted
    • Follow the notebook

Working with MyBinder

The MyBinder window should look like this:

There are three main instruments to work with:

  • The project files, accesible from the left panel (Project Structure)
  • The command bar, at the top of the window (Command Bar)
  • The working area, in the middle of the window (Working window)

Following the tutorial

We recommend to follow the tutorial in the following order:

  • Go thorugh the slides for a subject first (slidesXX_XXX.md)
  • Open the corresponding notebook (notebookXX_XXX.ipynb)
    • Solve the exercises in the notebook by writing your replies in a separate document with the references to the questions and exercises.
    • You can check the slides to get the information you need to solve the exercises
  • After finishing the exercises on a notebook, upload the responses to the course platform.

Working with Notebooks

To open any notebook, double-click the corsponding .ipynb file.

Notebook Basics

Notebooks contain two types of cells, as described bellow:

  1. Text Cells (for reading and writing):

    • Double-click to edit
    • Press 'Shift+Enter' to execute the cell and display the text
    • Press 'Ctrl+S' to save the notebook
  2. Code Cells (for running Python):

    • Click the Run (▶️) button to run the cell
    • Alternatively, use the "Restart and run all" (▶️▶️) button in the top menu to run all the cells in the notebook

Notebooks in VS Code

If you are using VS Code and work with the notebooks locally on your machine, your notebook looks like this:

To run a cell, you can either:

  • Click the Run (▶️) button
  • Use the 'Shift+Enter' shortcut

To run all the cells in the notebook, you can either:

  • Click the "Restart" button in the top menu
  • Click the Run All button in the top menu

Working with Plots

The interactive plots typically show evolution of parmaeters (such as power consumption) over time:

  • View Specific Legend Item (for example an appliance): Double-click items in the legend
  • Zoom In: Click and drag a rectangle on the plot
  • Zoom Out: Click "Autoscale" in the top-right corner of the plot
  • View Details: Hover over lines to see line-specific information

For example, hovering over a line in the power consumption plot will show the weather temperature in function of the time.

Evaluation

You will be evaluated based on the answers you provide to the questions and exercises in the notebooks.

We strongly recommend you to put your answers on a separate document (word, pdf, txt, etc.) and provide clear references to the question numbers.

After you have your document ready, you can upload it to the course platform.

Example:

In the notebook: Section I. Sun Question 1. Calculated solar radiations vs measurements Section I., Question 1: (your answer here)

In the separate document: Section I., Question 1: (your answer here)

Release files for batem 0.6.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batem 0.6.11
File Size Uploaded
batem-0.6.11.tar.gz 75.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for batem 0.6.11
File Interpreter ABI Platform
batem-0.6.11-py3-none-any.whl Python 3 none any Details

Total release size: 150.3 MB

Release files / batem-0.6.11.tar.gz

Download URL batem-0.6.11.tar.gz
Size 75.0 MB
Tags Source
SHA-256 checksum
How to use checksums
50215e07fdebeb2e312165dc8883a97b3b86943c13c496c8ea60d73078e2def8
BLAKE2b-256 checksum
How to use checksums
30f20a3132369a856d7e6b9c7ae57ffcd2dc5fa1b726882ded4df5cc01cd3a97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / batem-0.6.11-py3-none-any.whl

Download URL batem-0.6.11-py3-none-any.whl
Size 75.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f4428012d340ad41c8991833b715d8152cd5228ff290674bc13a6211a9e34d50
BLAKE2b-256 checksum
How to use checksums
f681e4a886cd15c370fbcdf6e987a2c7669373d5b3c7cd6f04f170afc64e403b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

0.6.11 This release

2 release files

0.6.10

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6

2 release files

0.5.6

2 release files

0.5.5

1 release file

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.0

2 release files

0.3.29

2 release files

0.3.28

2 release files

0.3.27

2 release files

0.3.25

2 release files

0.3.23

2 release files

0.3.21

2 release files

0.3.20

2 release files

0.3.19

2 release files

0.3.18

2 release files

0.3.17

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.17

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page