Static Scenario Generation Example

We will start by import the relevant modules

from static_scenario_generator.scenarios import ScenarioGeneration
import os 

Define path and inputs

path = "../tests/data"

#scenario input prameters in json format
json_file = "config_1.json" 

#scenario input prameters in csv format
csv_file = "csv_load_input.csv"

Scenario Generator class instance

scenario_class = ScenarioGeneration()

Json output

print(scenario_class.json_load(os.path.join(path,json_file)))
   Scenarios Cattle systems Manure management  Dairy pop  Beef pop  \
0          0          Dairy       tank liquid    1060000         0   
1          0           Beef       tank liquid          0      1000   
2          0   Upland sheep             solid          0         0   
3          0  Lowland sheep             solid          0         0   
4          1          Dairy       tank liquid    1060000         0   
5          1           Beef       tank liquid          0      1000   
6          1   Upland sheep             solid          0         0   
7          1  Lowland sheep             solid          0         0   

   Upland sheep pop  Lowland sheep pop  Dairy prod  Beef prod  \
0                 0                  0           0          0   
1                 0                  0           0          0   
2              3000                  0           0          0   
3                 0              50000           0          0   
4                 0                  0           0          0   
5                 0                  0           0          0   
6                 0                  0           0          0   
7                 0                  0           0          0   

   Upland sheep prod  ...  Urea abated proportion  Crop area  Wetland area  \
0                  0  ...                       0          0             0   
1                  0  ...                       0          0             0   
2                  0  ...                       0          0             0   
3                  0  ...                       0          0             0   
4                  0  ...                       0          0             0   
5                  0  ...                       0          0             0   
6                  0  ...                       0          0             0   
7                  0  ...                       0          0             0   

   Forest area  Conifer proportion  Broadleaf proportion  Conifer harvest  \
0            1                 0.7                   0.3             0.05   
1            1                 0.7                   0.3             0.05   
2            1                 0.7                   0.3             0.05   
3            1                 0.7                   0.3             0.05   
4            1                 0.7                   0.3             0.05   
5            1                 0.7                   0.3             0.05   
6            1                 0.7                   0.3             0.05   
7            1                 0.7                   0.3             0.05   

   Broadleaf harvest  Conifer thinned  Afforest year  
0                  0              0.1           2080  
1                  0              0.1           2080  
2                  0              0.1           2080  
3                  0              0.1           2080  
4                  0              0.8           2080  
5                  0              0.8           2080  
6                  0              0.8           2080  
7                  0              0.8           2080  

[8 rows x 28 columns]

CSV output

print(scenario_class.csv_load(os.path.join(path,csv_file)))
   Scenarios Cattle systems Manure management  Dairy pop  Beef pop  \
0          0          Dairy       tank liquid    1060000         0   
1          0           Beef       tank liquid          0      3000   
2          0   Upland sheep             solid          0         0   
3          0  Lowland sheep             solid          0         0   
4          1          Dairy       tank liquid    1060000         0   
5          1           Beef       tank liquid          0      3000   
6          1   Upland sheep             solid          0         0   
7          1  Lowland sheep             solid          0         0   

   Upland sheep pop  Lowland sheep pop  Dairy prod  Beef prod  \
0                 0                  0           0          0   
1                 0                  0           0          0   
2              3000                  0           0          0   
3                 0               3000           0          0   
4                 0                  0           0          0   
5                 0                  0           0          0   
6              3000                  0           0          0   
7                 0               3000           0          0   

   Upland sheep prod  ...  Urea abated proportion  Crop area  Wetland area  \
0                  0  ...                       0          0           0.2   
1                  0  ...                       0          0           0.2   
2                  0  ...                       0          0           0.2   
3                  0  ...                       0          0           0.2   
4                  0  ...                       0          0           0.2   
5                  0  ...                       0          0           0.2   
6                  0  ...                       0          0           0.2   
7                  0  ...                       0          0           0.2   

   Forest area  Conifer proportion  Broadleaf proportion  Conifer harvest  \
0            1                 0.2                   0.3              0.4   
1            1                 0.2                   0.3              0.4   
2            1                 0.2                   0.3              0.4   
3            1                 0.2                   0.3              0.4   
4            1                 0.2                   0.3              0.4   
5            1                 0.2                   0.3              0.4   
6            1                 0.2                   0.3              0.4   
7            1                 0.2                   0.3              0.4   

   Broadleaf harvest  Conifer thinned  Afforest year  
0                0.3              0.4           2080  
1                0.3              0.4           2080  
2                0.3              0.4           2080  
3                0.3              0.4           2080  
4                0.3              0.4           2080  
5                0.3              0.4           2080  
6                0.3              0.4           2080  
7                0.3              0.4           2080  

[8 rows x 28 columns]