Skip to content

Commit

Permalink
update post
Browse files Browse the repository at this point in the history
  • Loading branch information
jwist committed Nov 28, 2019
1 parent f67b590 commit 3604361
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
28 changes: 26 additions & 2 deletions docs/_posts/2019-11-27-interactive-visualization-with-R.markdown
Expand Up @@ -5,10 +5,34 @@ date: 2019-11-27 20:06:34 -0500
categories: R
---

Interactive data visualization is a must to develop attractive tools for a broad audience. Here I will show how to use a JavaScript framework to visualize results computed with R. I think it is a good idea to keep computation separated from visualization to make more robust pipelines, hence the idea to use a webpage as a visualization platform.

[`visualizer`][visu-link] is a webpage (a tool) that takes data as input and display them according to a customizable layout (a view, or vista in spanish). [`visualizer`][visu-link] allows to define modules that can display many different types of data and that can be chained to build complex pipelines. Since this package is build with pure JavaScript, code can be added to modules to allow even more complex manipulation of the results.

[`visualizer`][visu-link] needs two files, a data.json file that contains the data or result to be displayed in json format and a view.file that contains the description of how to display the data.

Both those files can be produced by an R script and pushed to the webpage. This is what [`hastaLaVista`][hlv-link] R-package.

A multivariate analysis applied to metabolic profiling is used as a showcase example.

## get started

First install the latest release of [`hastaLaVista`][hlv-link] using devtools.

{% highlight r %}
library(hastaLaVista)
v <- new("visualization")
devtools::install_github("jwist/hastaLaVista")
{% endhighlight %}

For multivariate analysis I will use [`MetaboMate`][mm-link]. First, make sure that the following [bioconductor][bioc-link] packages are installed.

{% highlight r %}
BiocManager::install(c("MassSpecWavelet", "impute", "pcaMethods"))
devtools::install_github("kimsche/MetaboMate")
{% endhighlight %}



[visu-link]: https://github.com/npellet/visualizer
[hlv-link]: https://github.com/jwist/hastaLaVista
[mm-link]: https://github.com/kimsche/MetaboMate
[bioc-link]: https://bioconductor.org/install/
2 changes: 1 addition & 1 deletion docs/_sass/minima-classic.scss
Expand Up @@ -8,7 +8,7 @@ $text-color: #111 !default;
$background-color: #fdfdfd !default;
$code-background-color: #eef !default;

$link-base-color: #2a7ae2 !default;
$link-base-color: #d34525 !default;
$link-visited-color: darken($link-base-color, 15%) !default;

$table-text-color: lighten($text-color, 18%) !default;
Expand Down
4 changes: 2 additions & 2 deletions docs/_sass/minima/_base.scss
Expand Up @@ -152,7 +152,7 @@ code {
@include relative-font-size(0.9375);
border: 1px solid $brand-color-light;
border-radius: 3px;
background-color: $code-background-color;
background-color: lighten(#d34525, 35%);
}

code {
Expand All @@ -171,7 +171,7 @@ pre {
}

.highlight {
background: $code-background-color;
background: lighten(#d34525, 35%);
@extend %vertical-rhythm;

.highlighter-rouge & {
Expand Down

0 comments on commit 3604361

Please sign in to comment.