ANN: BrowseTables.jl

BrowseTables.jl is a simple package that outputs formatted HTML for tables that support the Tables.jl interface.

The primary purpose of the package is to make eyeballing medium-sized data tables easier. The default formatting uses a fairly condensed font and layout, while still remaining readable. I would like to thank @y4lu for help with CSS.

Demo

Install with pkg> add BrowseTables. Then

using BrowseTables
table = (A = rand(vcat(1:10, missing), 100),
         B = rand(vcat('a':'h', missing), 100),
         C = rand(1:100, 100))
open_html_table(table)
17 Likes

Could also be good to get the html output without writing it to file, so we could show tables in an interface using Interact.jl and observables.

1 Like

Happy to do this, please open an issue for further discussion.

Interactive dataframe/table exploration using BrowseTables.jl and the reload node app.

Have been using a static html server live-reloader app to view dataframe and table output in a browser via an html file written from Julia. Posted examples using PrettyTables.jl (GitHub - ronisbr/PrettyTables.jl: Print data in formatted tables.) with the REPL (PrettyTables.jl now has initial support for HTML output - #15 by pontus) and with Sublime Text (Sublime Text 3: Worth a look! - #85 by pontus). See the second Sublime Text post for more detail regarding selection of the reload node application among a host of static-server/live-reloader options (e.g. active support, permissive license, etc). The reload application can be sourced directly from GitHub (https://github.com/alallier/reload/blob/master/README.md) and installed using npm (reload - npm).

Thought I’d share a screenshot of this along with @Tamas_Papp’s BrowseTables package, it worked quite nicely for this particular interactive data exploration use case wrangling some CMS data, and required no special formatting, just ship the dataframe to the browser, so much nicer than using show function! This demonstrates use with a Jupyter notebook, but can be any source that writes the html file from Julia.
After using BrowseTables, it’s a simple one-liner command to write the table - this includes use of some the kwargs but a basic 'write_html_table(“index.html”, df)` would suffice:

write_html_table("index.html", prvdr; title="Hospital Cost Report", caption="HOSP_RPT_ALPHA where CLMN_NUM = '00200' AND RPT_REC_NUM = '649581'")


And for anyone curious, on the backend, here is how I have this set up to work with Julia on Linux. These are tiled zsh shells within a console (preparing myself for a migration from KDE to i3 at some point). Note the upper right two tiles, the rightmost has the reload -b command run after navigating to the directory with the html file and producing the first output from Julia (on localhost:8080). To the left of that is the Julia kernel running the Jupyter notebook using IJulia.jl (on localhost:8888). I add packages in a kernel below that, have a REPL over to the left, and a shell below that.

5 Likes

Thanks for sharing this, it always feels nice if people find my packages useful.

3 Likes