Skip to content

Commit

Permalink
avoid crashing when census site is down
Browse files Browse the repository at this point in the history
  • Loading branch information
panosatha committed Nov 1, 2024
1 parent ccbe70f commit f3cf4ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hydromt_fiat/fiat.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,11 @@ def setup_equity_data(
equity.download_census_data(year_data)
equity.rename_census_data()
equity.match_geo_ID()
equity.download_shp_geom(year_data, county_numbers)
try:
equity.download_shp_geom(year_data, county_numbers)
except:
self.logger.warning("The census track shapefile could not be downloaded, potentially because the site is down. Aggregation areas and equity information will not be available in the FIAT model!")
return
equity.merge_equity_data_shp()
equity.clean()
gdf = rename_geoid_short(equity.equity_data_shp)
Expand Down

0 comments on commit f3cf4ab

Please sign in to comment.