reenact.reenact.results.potentials#
add_wetland_potential(potentials)
#
Calculate wetland potentials from usage of paludiculture, PV marsh and wet meadows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
potentials
|
list[dict]
|
List of already calculated potentials. |
required |
Returns:
| Type | Description |
|---|---|
list[dict]
|
list[dict]: Updated list of potentials including Moorbewirtschaftung. |
calculate_area_from_capacity(technology, value)
#
Calculate area for technologies using capacity factors.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
technology
|
str
|
The name of the technology/potential area. |
required |
value
|
float
|
The capacity value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The calculated area in km². |
calculate_potentials_from_request(request_or_data)
#
Calculate potentials based on data from an HTTP request or a data dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request_or_data
|
Either a Django request object or a dictionary containing potential data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
list |
list
|
A list of dictionaries, each containing potential data (title, percentage, value, unit, color, stroke_dashoffset). |
circle_view(arc_percentage)
#
Calculate stroke dashoffset for a circular progress bar.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arc_percentage
|
The percentage of the arc to be filled. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
The calculated stroke-dashoffset as a string. |
get_potentials_from_scenario_data(scenario_data)
#
Extract potentials from scenario data dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario_data
|
dict
|
Dictionary containing scenario information. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
list |
list
|
A list of dictionaries, each containing potential data. |