Fix bugs that were showing up in Jupyter
@@ -318,6 +318,7 @@ def label_hydro_region(gens_860, pudl_engine, model_regions_gdf):
crs={"init": "epsg:4326"},
)
+ if model_hydro_gdf.crs != model_regions_gdf.crs:
model_hydro_gdf = model_hydro_gdf.to_crs(model_regions_gdf.crs)
model_hydro_gdf = gpd.sjoin(model_regions_gdf, model_hydro_gdf)
@@ -1368,7 +1369,8 @@ def import_proposed_generators(planned, settings, model_regions_gdf):
geometry=gpd.points_from_xy(planned.longitude.copy(), planned.latitude.copy()),
crs={"init": "epsg:4326"},
)
- planned_gdf.crs = {"init": "epsg:4326"}
+ # planned_gdf.crs = {"init": "epsg:4326"}
+ if planned_gdf.crs != model_regions_gdf.crs:
planned_gdf = planned_gdf.to_crs(model_regions_gdf.crs)
planned_gdf = gpd.sjoin(model_regions_gdf.drop(columns="IPM_Region"), planned_gdf)
