Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit c2063bf

Browse files
committed
add check for gsp metadata, and information on how to delete it
1 parent 4fad459 commit c2063bf

File tree

1 file changed

+10
-0
lines changed
  • nowcasting_dataset/data_sources/gsp

1 file changed

+10
-0
lines changed

nowcasting_dataset/data_sources/gsp/eso.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ def get_gsp_metadata_from_eso(calculate_centroid: bool = True) -> pd.DataFrame:
7575
metadata.merge(shape_data, right_on="RegionID", left_on="region_id", how="left")
7676
)
7777

78+
assert "centroid_lat" in metadata.keys(), (
79+
"GSP Metadata does not contain centroid_lat, "
80+
'try deleteing the folder "nowcasting_dataset/data_sources/gsp/gsp_shape"'
81+
)
82+
83+
assert "centroid_lon" in metadata.keys(), (
84+
"GSP Metadata does not contain centroid_lon, "
85+
'try deleteing the folder "nowcasting_dataset/data_sources/gsp/gsp_shape"'
86+
)
87+
7888
return metadata
7989

8090

0 commit comments

Comments
 (0)