Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# test outputs
examples/hotmaps_output/
hotmaps_output/
34 changes: 34 additions & 0 deletions examples/hotmaps_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Description: This module retrieve data from HotMaps for any bounding box of interest,
and returns the clipped raster file in its original EPSG and the vector file in the
EPSG of interest (defined in the request).
The current available layer names are as below:
1. Heat density total
2. Final energy demand density for space heating and domestic hot water - Residential
3. Final energy demand density for space heating and domestic hot water - Non-Residential
4. Space cooling needs density
5. Building gross floor area density - Residential
6. Building gross floor area density - Non-Residential
7. Building gross floor area density - Total
8. Building construction period - until 1975
9. Building construction period - 1975 - 1990
10. Building construction period - 1990 - 2000
11. Building construction period - 2000 - 2014
12. Population total
13. Potential solar thermal collectors - rooftop
14. Potential solar thermal collectors - open field
License: MIT License.
"""

from dave_data.datapool.hotmaps.hotmaps_request import hotmaps_request

# from dave_data.datapool.hotmaps.hotmaps_request import hotmaps_request

hotmaps_result = hotmaps_request(
"Potential solar thermal collectors - open field",
(14.348144531250002, 51.7406361640977, 14.3701171875, 51.754240074033525),
4326,
)

# bbox_in_Eu = (14.348144531250002, 51.7406361640977, 14.3701171875, 51.754240074033525)
# bbox_outside_EU = (35.71436246138891, 51.38223366566746, 35.719158696607096, 51.39866831101444)
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
requests~=2.32.3
pandas~=2.2.3
geopandas~=1.0.1
shapely~=2.0.6
six~=1.16.0
rasterio~=1.4.1
matplotlib~=3.9.2
OWSLib~=0.32.0
contextily~=1.6.2
Empty file.
16 changes: 16 additions & 0 deletions src/dave_data/datapool/hotmaps/exception/hotmaps_exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class OutOfBbox(Exception):
def __init__(self, errors):
super().__init__(errors)
self.errors = errors


class InvalidBbox(Exception):
def __init__(self, errors):
super().__init__(errors)
self.errors = errors


class InvalidEPSG(Exception):
def __init__(self, errors):
super().__init__(errors)
self.errors = errors
Loading
Loading