ANN: BrowseTables.jl

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