updates to the tds web user interface - unidata | home · summer 2018 unidata student internship...

31
Updates to the TDS Web User Interface Summer 2018 Unidata Student Internship Hailey Johnson Sean Arms, Christian Ward-Garrison

Upload: others

Post on 04-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Updates to the TDS Web User Interface

Summer 2018 Unidata Student Internship Hailey Johnson

Sean Arms, Christian Ward-Garrison

Page 2: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Introduction

1. HTMLwriter → Thymeleaf templating 2. UI design updates

a) Customizable CSS b) Extensible HTML

3. Jupyter Notebook dataset “viewer”

What I did this summer:

Page 3: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Thymeleaf Templating

Page 4: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Thymeleaf Natural templates

• Server-side templating engine • Templates can be rendered as

HTML by browsers • Integrates with Spring

• Variable/Selection expressions • Basic logical operators,

conditionals, loops, mathematical operations, etc.

• Fragment expressions

Page 5: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Thymeleaf Sample

Page 6: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Thymeleaf Which pages use Thymeleaf?

1. Catalog pages 2. Dataset pages 3. NCSS (Grid & Point) pages

Why?

1. Simplicity 2. Efficiency 3. Consistency

Page 7: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Thymeleaf templating

Thymeleaf’d views:

Page 8: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

UI Design Updates

Presenter
Presentation Notes
Start with before and after
Page 9: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,
Page 10: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,
Page 11: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,
Page 12: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,
Page 13: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

UI Updates

• Existing feature: user contributed stylesheet • Use templates for consistency:

• Page templates look for user contributed stylesheets which correspond to that page

• “standard.css” – loaded on all pages • “catalog.css” and “dataset.css”– loaded on catalog/dataset views

• Page layout is reliably structured: • Elements have classes and ids

Customizable CSS Extensible HTML

Page 14: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

UI Updates

• Thymeleaf fragments: portable templates

• Page templates structured as a rigid skeleton which loads fragments • Plugin points: e.g. header, footer, content-section • User adds fragments to

`content/thredds/templates/tdsTemplateFragments.html` • Overridable fragments: custom or default • Optional fragments: custom or none

Customizable CSS Extensible HTML

Page 15: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

UI Updates

Template resolvers: • Default: SpringResourceTemplateResolver • Custom: TdsExtensibleTemplateResolver

• Resolvable patterns: “ext:*” • Looks for matches in the content directory

Customizable CSS Extensible HTML

a.

b.

Page 16: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

UI Updates

Customizable CSS Extensible HTML

Page 17: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Jupyter Notebook Service

Presenter
Presentation Notes
Start with before and after
Page 18: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Jupyter Notebook service

• Return ipynb file pre-populated with catalog URL & Dataset name • Demo access to datasets via Siphon • Simple data visualization

Purpose:

Page 19: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Jupyter Notebook service

1. On TDS startup: a) TDS creates a cache to store Notebooks and their mappings to datasets b) Parses all ipynb files in the “Notebooks” directory as NotebookMetadata objects;

saved permanently in the cache c) Registers “JupyterNotebookViewer” as a data viewer

2. On Dataset page load a) TDS accesses or creates a mapping to the appropriate Notebook

3. On Notebook service request a) NotebookController reads the mapped ipynb file and inserts the Catalog URL and

Dataset Name where appropriate b) Returns the edited Notebook file

How it works:

Page 20: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Mapping Noteboks to Datasets

Presenter
Presentation Notes
Start with before and after
Page 21: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Jupyter Notebook service

Mapping notebooks to datasets:

Page 22: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Jupyter Notebook service

1. Create your notebook (ipynb) 2. Update the “viewer_info” metadata 3. Place notebook in `content/thredds/notebooks`

Contributing your own Notebook:

Page 23: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

TDS “in the wild”

Demo #1

Page 24: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Demo #2

TDS not “in the wild”

Page 25: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Page 26: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Goals/Benefits

• Administrative users: • Curate data more effectively • Target users and use cases

• End users: • Lower barrier-to-entry for data use

• Web navigation • Access and usage examples/instructions

• Wider range of users

Presenter
Presentation Notes
Curate with publishing metadata Target with notebook service
Page 27: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Use cases

• Large repositories: • Data discoverability, visualization, access

• Education: • Interactive instructional notebooks

• Publication: • Small data repositories as supplementary material • Verify methods and results

Presenter
Presentation Notes
Last two less common use cases
Page 28: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Future work

• Baseline work:

• Document contributing Notebooks • Add tests

• Notebook service • UI tests

Unexciting Slightly more exciting Exciting

Page 29: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Future work

• Notes from building a demo:

• Free-form metadata type for datasets and catalogs • Top content-section for dataset page • Pattern-matching for notebook registration

Unexciting Slightly more exciting Exciting

Page 30: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Intro Applications Progress/Results Going Forward Demo

Future work

• More features:

• Multiple Notebook viewers per dataset (end user’s choice) • Distribute common templates for features

Unexciting Slightly more exciting Exciting

Presenter
Presentation Notes
Less is more?
Page 31: Updates to the TDS Web User Interface - Unidata | Home · Summer 2018 Unidata Student Internship Hailey Johnson . Sean Arms, Christian Ward -Garrison . ... Thank you’s: Sean, John,

Summer 2018: a visual summary

Thank you, everyone!

Presenter
Presentation Notes
Thank you’s: Sean, John, and Ryan, other Jon