NASA-IMPACT / covid-api

MIT License
14 stars 3 forks source link

Add `detections-vehicles` dataset to backend #83

Closed leothomas closed 3 years ago

leothomas commented 3 years ago

What I did:

Added detections-vehicles dataset - addresses covid-dashboard issue #440

How I did it:

Extracted scene_ids for each feature in the two geojsons currently in S3 and built + uploaded a detections_scenes.csv file.

Created a new dataset metadata file called detections-vehicles.json which is very similar to detection-plane.json and detections-ship.json.

Added detections-vehicle to all datasets which has detections-ship and detection-plane as exclusive datasets

How you can test it:

Run docker-compose up --build

@olafveerman @drewbo would love some feedback on the detections-vehicles.json metadata files (I copy-pasted the description from detections-ships.json, not sure if the info field is missing anything)

@danielfdsilva tagging you because the format of the geojsons in s3 seems different from the other detection-* datasets. Let me know if you need anything in order to implement in the front end

@lillythomas fyi

olafveerman commented 3 years ago

Thanks @leothomas

Running this with 1.8.0 of the dashboard, I noticed a couple of issues. Unsure whether they should be solved on the API, or frontend, but raising them here:

danielfdsilva commented 3 years ago

Tested this locally and the data seems to show up correctly. I encountered some errors, but I think it's because I don't have a planet key.

I did notice the domain error reported by @olafveerman, and this is a problem with the frontend. We were considering domains with 2 dates to be a range according to the time unit. This has been the case and worked until this moment. The very useful isPeriodic property of the api response was not being used.

Long story short, here's the PR with the fix: https://github.com/NASA-IMPACT/covid-dashboard/pull/455

leothomas commented 3 years ago

Fixed the issue with detections-vehicles missing background scenes (issue was due to the fact that detections-vehicles relies on Skysat imagery, which is not available through the Planet tile endpoint (detections-plane and detections-ship rely on Planet imagery which is available through the Planet tile endpoint).

@olafveerman re: observations colour - I'm not seeing anywhere on the backend to specify the colours of the observations. If that's not fixable through the front end, I'm happy to update the info field of each of the detections-* metadata files to specify that the observations are show in orange (instead of red)

olafveerman commented 3 years ago

This looks good! Holding off on merging for a couple of days, until the Story feature has been launched and stable.

leothomas commented 3 years ago

@olafveerman This PR has been open for a while. Can we merge, now that the Story feature has been launched?