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

Add dataset thumbnail #487

Merged
merged 5 commits into from
Nov 18, 2022
Merged

Add dataset thumbnail #487

merged 5 commits into from
Nov 18, 2022

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented Nov 17, 2022

Add image overlay to map if nbart thumbnail link is found.

Tested by running locally; seems to work as expected.

image


📚 Documentation preview 📚: https://datacube-explorer--487.org.readthedocs.build/en/487/

@Ariana-B Ariana-B requested review from omad and robbibt November 17, 2022 06:51
@Ariana-B Ariana-B linked an issue Nov 17, 2022 that may be closed by this pull request
@robbibt
Copy link

robbibt commented Nov 17, 2022

This looks SO cool @Ariana-B, exactly what I had in mind!

One question/suggestion: I can see in the code that it appears to only plot the thumbnail if it's from an NBART product. Would it be possible to generalise this to plot thumbnails for any product if they're available? For example, we also have thumbnails for most of our other Collection 3 products, and it'd be fantastic to be able to visualise them too.

e.g. all of these (and more) have a "_thumbnail.jpg":

https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_fc_3/2-5-1/092/076/2018/06/17/
https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_mangrove_cover_cyear_3/3-0-0/x27/y44/2001--P1Y/
https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_wo_fq_apr_oct_3/1-6-0/x32/y28/1998-04--P7M/
https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_tc_pc_cyear_3/1-0-0/x27/y36/1991--P1Y/

@omad
Copy link
Member

omad commented Nov 17, 2022

This is looking great Ariana. I was expecting it to require Python/Flask modifications as well as the template, hopefully the logic doesn't get too hairy by keeping it in the template with my next request.

The DEA ARD data include thumbnails under the nbart:thumbnail tag, but most datasets that include a thumbnail are simply thumbnail. Can you please update this to also show the thumbnail image for those types of datasets.

Eg.

@Ariana-B
Copy link
Contributor Author

@omad @robbibt
updated to include thumbnail tag

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about moving the implementation out of the template and into a filter. See 👇 for details.

cubedash/templates/dataset.html Outdated Show resolved Hide resolved
cubedash/templates/dataset.html Outdated Show resolved Hide resolved
Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome, thank you!

@omad omad merged commit a900717 into develop Nov 18, 2022
@omad omad deleted the dataset_thumbnail branch November 18, 2022 04:24
@robbibt
Copy link

robbibt commented Nov 18, 2022

Thanks @Ariana-B! Super looking forward to seeing this go live - can someone tag me when that happens so I can test it out?

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

Successfully merging this pull request may close these issues.

Include dataset thumbnails on Explorer dataset pages
3 participants