Skip to content

Extending astropy's table notebook viewer #10317

Closed

Description

@joncwong

So I understand that astropy's table API allows us to interactively view and search through our data in a nice table format with

table.show_in_notebook()

However, I wanted the option to be able to "mark" rows of a table in the way that you would mark something as complete in a to-do list. I dug into the source code and noticed that the table API uses a jQuery library called DataTables. DataTables allows us to conduct multiple selections of a row as shown here: https://datatables.net/extensions/select/examples/initialisation/multi.html

How would I go about including something like this into my workflow? Is this even possible? If not through astropy, is there a way to "inject/modify" the rendered table after astropy is finished with it? Can I define my own scripts and have the table call them?

Thanks in advance!

Activity

  1. pllim commented on May 5, 2020

    @pllim
    Member

    Can you please elaborate on an astronomy use case that needs checkboxes?

  2. joncwong commented on May 5, 2020

    @joncwong
    Author

    I'm working on a custom observation planning jupyter notebook. I've been using astropy tables as a way to store the targets and would like to mark when certain targets are observed.

  3. jairideout commented on May 6, 2020

    @jairideout

    Can I work on this feature if it's decided to be included in astropy?

  4. pllim commented on May 6, 2020

    @pllim
    Member

    How do you envision the state of those checkboxes be saved into any supported file format and loaded back up again?

  5. joncwong commented on May 6, 2020

    @joncwong
    Author

    If they were checkboxes, I was hoping it could be a boolean value in the astropy table similar to how ipywidgets have values equal to True or False depending on if it's checked or not.

  6. pllim commented on May 6, 2020

    @pllim
    Member

    So, basically clicking on it changes the data in the table in real time. That is venturing into the realm of GUI editing. Let's wait for others to chime in. Thanks for your patience!

  7. taldcroft commented on May 8, 2020

    @taldcroft
    Member

    This is something that could be stored in the table meta dict, possibly taking advantage of the newly added custom attributes (though not immediately sure if this would work on a base Table instance).
    https://docs.astropy.org/en/latest/table/construct_table.html#adding-custom-table-attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions