Skip to content

Commit

Permalink
Added missing data endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
damienallen committed Jun 9, 2024
1 parent 23084f3 commit f04385d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions urban_heat/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ async def get_source_counts():
return OrderedDict(sorted(countries.items()))


@app.get("/urau/missing", response_model=list[str])
async def get_missing():
await init_db()

features = await UrbanExtent.find_all().to_list()
return sorted([f.properties.URAU_CODE for f in features if not f.prepared_sources])


@app.get("/urau/{code}", response_model=UrbanExtent)
async def get_urau(code: str):
await init_db()
Expand Down

0 comments on commit f04385d

Please sign in to comment.