# ANN: BrowseTables.jl

**URL:** <https://discourse.julialang.org/t/ann-browsetables-jl/18304>\
**Category:** Package Announcements\
**Tags:** announcement\
**Created:** [December 5, 2018, 6:32am UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304 "2018-12-05T06:32:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 5, 2018, 6:32am UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304/1 "2018-12-05T06:32:53Z")

</div>

[BrowseTables.jl](https://github.com/tpapp/BrowseTables.jl) is a simple package that outputs formatted HTML for tables that support the [Tables.jl](https://github.com/JuliaData/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

```julia
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)

```

---

<div class="post-metadata">

**Author:** ![Raf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raf/32/3383_2.png) [@Raf](https://discourse.julialang.org/u/Raf)\
**Post date:** [December 5, 2018, 9:58am UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304/2 "2018-12-05T09:58:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 5, 2018, 10:07am UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304/3 "2018-12-05T10:07:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pontus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pontus/32/10438_2.png) [@pontus](https://discourse.julialang.org/u/pontus)\
**Post date:** [November 17, 2019, 4:01pm UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304/4 "2019-11-17T16:01:47Z")

</div>

**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.](https://github.com/ronisbr/PrettyTables.jl)) with the REPL ([PrettyTables.jl now has initial support for HTML output - #15 by pontus](https://discourse.julialang.org/t/prettytables-jl-now-has-initial-support-for-html-output/30905/15)) and with Sublime Text ([Sublime Text 3: Worth a look! - #85 by pontus](https://discourse.julialang.org/t/sublime-text-3-worth-a-look/17142/85)). 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](https://github.com/alallier/reload/blob/master/README.md)) and installed using npm ([reload - npm](https://www.npmjs.com/package/reload)).

> **[GitHub - alallier/reload: node module to reload your browser when your code...](https://github.com/alallier/reload)**
>
> node module to reload your browser when your code changes - GitHub - alallier/reload: node module to reload your browser when your code changes

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:

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

```

 ![BrowseTables_Jupyter_example](https://global.discourse-cdn.com/julialang/original/3X/5/9/59a302280e28c06f3cdfbf2b78798a61c0686aad.png)  
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.  
 ![julia_linux_tiled_reload_in_upper_right](https://global.discourse-cdn.com/julialang/original/3X/1/8/18a546218da08425b62f028287262c649a686ec8.png)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 18, 2019, 7:16am UTC](https://discourse.julialang.org/t/ann-browsetables-jl/18304/5 "2019-11-18T07:16:39Z")

</div>

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