Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPIC: analysis ready data access/data retrieval from Dashboard #138

Closed
leothomas opened this issue Sep 9, 2021 · 2 comments
Closed

EPIC: analysis ready data access/data retrieval from Dashboard #138

leothomas opened this issue Sep 9, 2021 · 2 comments

Comments

@leothomas
Copy link
Contributor

"Power users" might want to grab data from the dashboard to perform further analysis on. This might be underlying COG's, a jupyter notebook, .tif files, or .csv files corresponding to time series graphs

@leothomas
Copy link
Contributor Author

Some thoughts on the design of this feature:

Using the API to find COGs and download them directly from S3 is documented here. These instructions might be confusing to non-technical users, as they require knowledge of REST APIs, the AWS CLI and downloading file objects from the terminal using cURL or wget (although I would assume that most people interested in downloading COGs have at least some knowledge of the above topics).

WebMap Tiles:

The binary content of the web map tiles generated by the API can be wrapped in a StreamingResponse object, which will be downloaded by most browsers

Source COGs:

The source COG should not be downloaded to the user's machine using the same StreamingResponse technique as above, as this would entail loading the entire COG into the lambda's runtime memory. Even using the FileResponse object would require the entire COG to be copied over to the Lambda's runtime environment

I suggest returning an S3 presigned url as a RedictResponse - which should also have the same result of downloading the file in the user's browser.

CSV's for mean/median values (from the AOI feature and /timelapse endpoint)

Using the CSV Middleware from the Trace Emissions API we can easily add an accept header that specifies the text/csv mimetype as a return type - this will convert the JSON result of the API call into a CSV object which will be returned as a StreamingResponse (and download in most browsers).

@olafveerman
Copy link
Contributor

This is currently being dealt with on the frontend. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants