Webpage upgrade - how to display AMWG Tables #145
Replies: 3 comments 6 replies
-
@justin-richling: Thanks for the update. Do you have an example of the webpage you created? I mean a link that we could look at? Thanks. |
Beta Was this translation helpful? Give feedback.
-
So I was just trying to output a pandas (formatted) table from a jupyter notebook today. And it was not that simple. One idea might be to actually turn the tables into images (e.g., generate png from adf_table.py). There are some packages that do this. Then we could re-use most of the same infrastructure on the web pages that we use for figures, since tables are just another figure. Would that help? Just a thought. |
Beta Was this translation helpful? Give feedback.
-
To add my two cents to this discussion, there is still currently a need to create an internal ADF interface so that any future plotting or table-generation script can easily add their plots/tables to the website. This would likely require moving the HTML generation code in |
Beta Was this translation helpful? Give feedback.
-
As I am going through the webpage update one issue that needs some attention is how the AMWG tables are displayed.
The way the page is being built, the plot types can be displayed in a way that it looks like the user never navigates away from the page, but in reality the plot html files are formatted exactly like the main page, just with the images on the right side.
At the moment when a user clicks the desired table (case, baseline/obs, or comparison) it navigates to that page. This generated table html page is not formatted like any other html page and thus one must navigate manually back from the table page.
The ideal situation is to format the table html pages like the different plot types (above images). The immediate problem is that to format the AMWG tables (which are generated in
amwg_table.py
), it requires jinja and data that live in theadf_diag.py
script. Thus, it seems like we would need to grab this data and have it pulled into theamwg_table.py
section that builds the table html files. The reason why the plot type html files can be formatted correctly and easily is that they are generated inadf_diag.py
where jinja has access to the data necessary to build it. This method of formatting the table html files seems like it would take a decent amount of change to both scripts. Maybe I'm overestimating the level of work, but it seems like a lot up front.The best I've gotten is to add the top navigation bar to the table files (where clicking 'Home' will take you back to the case main page):
The other option is to embed the AMWG tables in the Tables page of the website. This is easier, but the
embed
tag doesn't allow for clicking on links to show/hide the table html file, so all the tables will be visible all the time. To me this is not ideal, as some of the tables can be large if the number of variables are large, but maybe someone has other thoughts.There are plenty of ways to get around this problem, but would require at least JavaScript. Although I have dealt with JS before, I don't recommend we go this route now.
This may be a slight hiccup, but we can still have a working version of the new webpage even if we just have to navigate away from the table pages. Sorry for the long post, but I would be happy to give some in-person explanation if any of this is unclear or if there are options I haven't explored.
Beta Was this translation helpful? Give feedback.
All reactions