Skip to content

Commit

Permalink
avoid crashing when census site is down (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
panosatha authored Nov 1, 2024
1 parent ccbe70f commit d40f38e
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 d40f38e

Please sign in to comment.