The crosstalk package allows filtering and synchronization between htmlwidgets (ie map, plot and table) on a shared data object. Since it does not require an R backend server to render functions like Shiny, it can be hosted for free on any website like Github Pages.

There are however severe limitations in this case, since we want to aggregate across sites or times.

Notes

Preparation

See prep (source prep.Rmd) on manipulations to go from original OTU_table_taxa_all.txt to the otu.csv used in this visualization.

You can see the Rmarkdown source for this doc at index.Rmd.

Interactivity

You can interactively filter and view data above with:

  • date slider. Drag slider to define date range to display.
  • map box: Click on box button in upper left to limit range.
  • plot legend: Click on legend labels to turn on/off sites in plot and hover mouse to get values for date.
  • table row: Click on rows to highlight selection in map and plot.

Issues

Issues:

  • map. Markers at each site are plotted for each date sampled, whereas they should be aggregated across the filters selected (requires Shiny).
  • taxa. Taxonomic filters are not feasible without aggregating also by site and/or date (requires Shiny).

Next Steps

Experimenting with time-space-taxa filtering and display using Crosstalk which enables knitting from Rmarkdown (see source) to HTML for free easy hosting on Github Pages.

Although Crosstalk synchronizes a shared data object between htmlwidgets such as the leafet map, plotly plot, and DT table, the need for aggregation across time, taxa and/or sites, necessitates migrating this type of application to Shiny for applying back-end R functions to aggregate data as interactively specified by the user.

Shiny requires a hosted solution with Shiny Server or ShinyApps.io. I’ll proceed with installing the open-source Shiny Server in the Google Cloud Platform.