Skip to content

Commit

Permalink
log and account for non-irrigated import JSONs
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Jun 27, 2022
1 parent 03c7f58 commit b284d39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/import/flowpath_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def get_data(filename):
gpd.DataFrame with the geojson data included.
"""
df = gpd.read_file(filename, index="OBJECTID")
if "irrigated" not in df.columns:
LOG.info("%s had no irrigated column", filename)
df["irrigated"] = 0
# Compute full rotation string
# 2022 is repeating -2 (2020)
s = df["CropRotatn_CY_2021"]
Expand Down

0 comments on commit b284d39

Please sign in to comment.