Skip to content

Commit

Permalink
feat: add district to layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaszkowic committed Sep 30, 2024
1 parent 23aa9d5 commit e5bed7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion harvester/src/mapbox_tree_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def generate_trees_csv(temp_dir, db_conn):
trees.radolan_sum,
trees.pflanzjahr,
COALESCE(SUM(w.amount), 0) AS watering_sum
trees.bezirk as district
FROM
trees
LEFT JOIN
Expand All @@ -87,7 +88,9 @@ def generate_trees_csv(temp_dir, db_conn):
logging.info(f"Creating trees.csv file for {len(trees)} trees...")

# Build CSV file with all trees in it
header = "id,lat,lng,radolan_sum,age,watering_sum,total_water_sum_liters"
header = (
"id,lat,lng,radolan_sum,age,watering_sum,total_water_sum_liters,district"
)
lines = []
for tree in tqdm(trees):
id = tree[0]
Expand Down

0 comments on commit e5bed7b

Please sign in to comment.