-
Notifications
You must be signed in to change notification settings - Fork 303
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
Implements a html representation for the Scene #2171
base: main
Are you sure you want to change the base?
Conversation
- still uses css from pyresample area html representation - duplicates a lot of css from xarray html representation
Maybe some food for thought: I like the way the xsar project shows the coverage of the data on a map, see here https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/examples/xsar_advanced.html#Open-a-dataset-with-a-xsar.Sentinel1Meta-object |
@mraspaud yes I also have been thinking about a more interactive variant with bokeh plots. But since this would introduce quite a view new dependencies I first wanted to keep it "low profile". Additionally the question would be showing a view of the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2171 +/- ##
==========================================
- Coverage 96.08% 95.96% -0.13%
==========================================
Files 377 378 +1
Lines 55155 55249 +94
==========================================
+ Hits 52997 53019 +22
- Misses 2158 2230 +72
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Pull Request Test Coverage Report for Build 12010382256Details
💛 - Coveralls |
While many users use Satpy in automated scripts in a more interactive workflow in Jupyter notebooks printing the Scene just outputs a concatenated list of the string representation of xarray DataArrays.
In my opinion this does not give a good overview of the Scene and what is contained in it.
Inspired by the xarray html representation of Datasets and DataArrays (in fact for some parts I reused code/css from xarray, more about that below) I implemented a html representation for the Scene.
The Scene can potentially contain data from different platforms/sensors with different areas, resolutions and extents. The current implementation tries to capture this and give a somewhat structured overview of the Scene resulting in the following design idea:
Collapsed view
Uncollapsed view
In progress "features"
Todos
Right now this mixes in some code/css from pytroll/pyresample#450 because when I started working on this I thought that I might reuse the html representation of the area definition. Turns out I wanted it to look
a little different in the html view of the Scene :-D. Apart from that I duplicated some code/css from xarray for the display of the data (this also leads to a little display bug when somewhere in the notebook another xarray object is shown). So obvious todos are:
Design questions and ideas
Obviously "design" is always opinionated so some of my questions/ideas are:
Another note: while I got it looking and working the way I wanted it the css/html probably is a mess (haven't done any in a long time). So if there are any html/css wizards out there help is appreciated :-).