Skip to content

Commit

Permalink
fix: csv columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaszkowic committed Sep 30, 2024
1 parent d36aee1 commit 3c796dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion harvester/src/mapbox_tree_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def generate_trees_csv(temp_dir, db_conn):
watering_sum = float(tree[5])
total_water_sum_liters = (radolan_sum / 10.0) + watering_sum

line = f"{id}, {lat}, {lng}, {radolan_sum}, {age}, {watering_sum}, {total_water_sum_liters}"
district = tree[6]

line = f"{id}, {lat}, {lng}, {radolan_sum}, {age}, {watering_sum}, {total_water_sum_liters}, {district}"
lines.append(line)
trees_csv = "\n".join([header] + lines)
trees_csv_full_path = os.path.join(temp_dir, "trees.csv")
Expand Down

0 comments on commit 3c796dc

Please sign in to comment.