teaser.examples.e9_building_data_import_from_excel module
This script demonstrates how a building can be generated by importing building
data from excel.
An appropriate example file with some building data is imported from
examplefiles/ExcelBuildingData_Sample.xlsx.
In the excel every room is listed by its own, via a custom defined zoning
algorithm these rooms are combined to zones.
The user needs to adjust the zoning to his needs.
See # Block: Zoning methodologies (define your zoning function here)
Limitations and assumptions:
- Outer and inner wall area depend on the calculations done in the excel
- Ground floor area is only as big the respective net area of the heated room
volume (NetArea)
- Floor area is only as big the respective net area of the heated room volume
(NetArea)
- Rooftop area is only as big the respective net area of the heated room
volume (NetArea)
- Rooftops are flat and not tilted, see “RooftopTilt”
- Ceiling area is only as big the respective net area of the heated room
volume (NetArea)
- Ceiling, floor and inner walls are only respected by half their area,
since they belong half to the respective
and half to the adjacent zone
- Orientations are clockwise in degree, 0° is directed north
-respective construction types have to be added to the TypeBuildingElements.json
-respective UsageTypes for Zones have to be added to the UseConditions.json
-excel file format has to be as shown in the “ExcelBuildingData_Sample.xlsx”
Information about the required excel format:
#Documentation in progress!
-yellowed columns are necessary input to teaser -> don´t change column
header, keep value names consistent.
-non yellowed columns may either not be used or be used for your zoning
algorithm
-Under the cell ‚Usage type‘ you will see some cells that are blank but have
their row filled.
It means the blank cell actually belongs to the Usage type above but in that
specific row we filled the characteristics
of the window/wall of a different orientation of the same exact room. That
means every row is either a new room or a
new orientation of that room. A room might have two outer walls in two
different orientation so for each outer wall,
a an extra row defining the respective orientation is added
-The entries in the excel sheet must be consistent for python being able to
convert it.
-If an inner wall is reaching inside a room but is not the limit of the room,
it should be accounted with 2x the area
-
teaser.examples.e9_building_data_import_from_excel.get_list_of_present_entries(list_)[source]
Extracts a list of all in the list available entries, discarding “None”
and “nan” entries
- Parameters:
- list_: list
list that shall be processed
-
teaser.examples.e9_building_data_import_from_excel.import_building_from_excel(project, building_name, construction_age, path_to_excel, sheet_names)[source]
Import building data from excel, convert it via the respective zoning and feed it to teasers logic classes.
Pay attention to hard coded parts, which are marked.
- Parameters:
- project: Project()
TEASER instance of Project
- building_name: str
name of building to be set in the project
- construction_age: int [y]
construction age of the building
- path_to_excel: str
path to excel file to be imported
- sheet_names: str or list
sheet names which shall be imported
- return data: pandas.DataFrame
zoned DataFrame which is finally used to parametrize the teaser classes
- return project: Project()
TEASER instance of Project filled with the imported building data
-
teaser.examples.e9_building_data_import_from_excel.import_data(path=None, sheet_names=None)[source]
Import data from the building data excel file and perform some
preprocessing for nan and empty cells.
If several sheets are imported, the data is concatenated to one dataframe
- Parameters:
- path: str
path to the excel file that should be imported
- sheet_names: list or str
sheets of excel that should be imported
-
teaser.examples.e9_building_data_import_from_excel.zoning_example(data)[source]
This is an example on how the rooms of a building could be aggregated to
zones.
In this example the UsageType has to be empty in the case that the
respective line does not represent another
room but a different orientated wall or window belonging to a room that
is already declared once in the excel file.
- Parameters:
- data: pandas.dataframe
The data which shall be zoned
- return data: pandas.dataframe
The zoning should return the imported dataset with an additional
column called “Zone” which inhibits the
information to which zone the respective room shall be part of,
and also a column called “UsageType_Teaser” which stores the
in UsageType of each row.
UsageType must be available in the UseConditions.json.