Skip to content
Snippets Groups Projects
Commit 5b3f12c8 authored by Sebastian Schubert's avatar Sebastian Schubert
Browse files

Merge branch '3-use-specific-tag-in-the-first-steps-manual' into 'main'

Resolve "Use specific tag in the first steps manual"

Closes #3

See merge request urbanoikos/models/cca!3
parents a0fbd401 29daedce
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Run the Carbon Cycle Assessment
In order to run the Carbon Cycle Assessment (CCA), you need to get the model code first. This code is available TU's git server. [git is a version control system](https://git-scm.com/book/de/v2) and helps to keep track of everything that resembles code. Is is integrated in many development environments such as [Visual Studio Code](https://code.visualstudio.com/docs/sourcecontrol/overview) and can be [run from the command line](https://git-scm.com/book/de/v2)). It also helps to collaborate.
%% Cell type:markdown id: tags:
Run the following to clone the repository (i.e. create a local copy) to the Colab environment and to change into the directory (`cd`) of the code. Necessary python extensions are installed with `pip`:
Run the following to clone the repository (i.e. create a local copy) to the Colab environment and to change into the directory (`cd`) of the code. The specific version for the course is selected and the necessary python extensions are installed with `pip`:
%% Cell type:code id: tags:
``` python
!git clone https://git.tu-berlin.de/urbanoikos/models/cca.git
%cd /content/cca
!git checkout course2023-1
!pip install -r requirements.txt
```
%% Cell type:markdown id: tags:
The repository does not only include the code but also the data that is needed to run the model. Have a look into the `Files` (`Dateien`) section on the left of the Colab screen. The `cca` folder includes the `cca` python package in the `cca` subfolder and the input data for the Tegel application in the `applications/Tegel` folder.
First, load the cca package:
%% Cell type:code id: tags:
``` python
import cca
```
%% Cell type:markdown id: tags:
In order to read in the Tegel data, process it and produce the output, run the following:
%% Cell type:code id: tags:
``` python
tegel = cca.cca_to_df(
filepath_minfotable="applications/tegel/materialinfo.ods",
filepath_musagetable="applications/tegel/materialusage.ods",
infra_floor_area=5105.716, # = 4 times the base area (1276.429m²) as building have 4 levels
project_area=213069.25,
)
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment