From 4de7a1e56b35ae95049207e831eb815c5f7b9176 Mon Sep 17 00:00:00 2001 From: juba Date: Fri, 30 Aug 2024 10:53:34 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20juba/rob?= =?UTF-8?q?servable@94b23ec85136f409f9b32824e7746cec4533436a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 16 ++-- articles/gallery.html | 41 ++++----- articles/index.html | 16 ++-- articles/introduction.html | 88 +++++++++---------- .../htmltools-fill-0.5.8.1/fill.css | 21 +++++ articles/shiny.html | 25 +++--- authors.html | 32 +++---- index.html | 26 +++--- news/index.html | 18 ++-- pkgdown.yml | 7 +- reference/index.html | 16 ++-- reference/renderRobservable.html | 8 ++ reference/robs_observe.html | 30 +++---- reference/robs_update.html | 30 +++---- reference/robservable-shiny.html | 30 ++++--- reference/robservable.html | 62 ++++++------- reference/robservableOutput.html | 8 ++ reference/robservableProxy.html | 30 +++---- reference/to_js_date.html | 26 +++--- sitemap.xml | 64 ++++---------- 20 files changed, 294 insertions(+), 300 deletions(-) create mode 100644 articles/introduction_files/htmltools-fill-0.5.8.1/fill.css create mode 100644 reference/renderRobservable.html create mode 100644 reference/robservableOutput.html diff --git a/404.html b/404.html index 63179b7..dcba735 100644 --- a/404.html +++ b/404.html @@ -6,7 +6,7 @@ Page not found (404) • robservable - + @@ -18,7 +18,7 @@ - +
- +
@@ -106,16 +106,16 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/gallery.html b/articles/gallery.html index a9f6650..59958ad 100644 --- a/articles/gallery.html +++ b/articles/gallery.html @@ -6,20 +6,19 @@ robservable Gallery • robservable - + - - +
- +
@@ -88,9 +87,9 @@

robservable Gallery

Julien Barnier, Kenton Russell

-

2023-12-15

+

2024-08-30

- Source: vignettes/gallery.Rmd + Source: vignettes/gallery.Rmd
@@ -124,8 +123,8 @@

Draggable Pie/Donut Chart input = list(data = df), width = 700 )

-
- +
+

Bar chart race @@ -192,8 +191,8 @@

Bar chart race width = 700, height = 710 )

-
- +
+

Voronoi Map @@ -229,8 +228,8 @@

Voronoi Map= 600, height = 600 )

-
-

You can zoom and pan the map.

+
+

You can zoom and pan the map.

Bivariate Choropleth @@ -272,16 +271,14 @@

Bivariate Choropleth= 800, height = 500 )

-
- +
+ + @@ -294,16 +291,16 @@

Bivariate Choropleth

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/index.html b/articles/index.html index f4bdafc..248590f 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,9 +1,9 @@ -Articles • robservableArticles • robservable - +
- +
@@ -82,15 +82,15 @@

Articles

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/articles/introduction.html b/articles/introduction.html index 7905957..fb3a295 100644 --- a/articles/introduction.html +++ b/articles/introduction.html @@ -6,20 +6,19 @@ Introduction to robservable • robservable - + - - +
- -
+ + +
@@ -143,8 +143,8 @@

Choosing which cells to render"@juba/robservable-bar-chart", include = "chart" )

-
-

If you need to display an unnamed cell2, you can do it by +

+

If you need to display an unnamed cell2, you can do it by specifying its number, ie its position in the notebook (starting with 1). For example, to display the first cell of a notebook if it is unnamed you would use include = 1.

@@ -165,8 +165,8 @@

Choosing which cells to render"@mbostock/eyes", include = c("canvas", "mouse") )

-
-

+

+

In this case, we may want to render mouse without displaying it. This is possible by adding its name to the @@ -177,8 +177,8 @@

Choosing which cells to render= c("canvas", "mouse"), hide = "mouse" )

-
-

Finally, it is possible to mix the use of named and unnamed cells +

+

Finally, it is possible to mix the use of named and unnamed cells both in cell and hide, so you can do something like below.

@@ -204,8 +204,8 @@ 

Updating cell values= "chart", input = list(height = 300) )

-
-

More interesting, we can update the data cell value of +

+

More interesting, we can update the data cell value of the notebook to generate the bar chart based on our own data. We just have to be sure that it is in the same format as the notebook data. In this example the data is in a standard d3-array format, so @@ -227,8 +227,8 @@

Updating cell values= "Species" ) )

-
-

There’s still one problem though. Our species names are truncated. We +

+

There’s still one problem though. Our species names are truncated. We can fix this because the notebook allows us to change the margins of the plot by modifiying the margin cell. As this cell value is a JavaScript object, we can update it by passing a named @@ -245,8 +245,8 @@

Updating cell values= list(top = 20, right = 0, left = 70, bottom = 30) ) ) -
-

Finally, here is a bit more complex example which displays a multi-line +

+

Finally, here is a bit more complex example which displays a multi-line chart with the gapminder data. The to_js_date function is a helper to convert Date or POSIXt R objects to JavaScript @@ -273,8 +273,8 @@

Updating cell values= "chart", input = list(data = df) ) -
- +
+

Sizing the widget @@ -308,8 +308,8 @@

Sizing the widget= c("canvas", "mouse"), hide = "mouse" )

-
-

If you explicitly specify the width and +

+

If you explicitly specify the width and height of the widget with the corresponding arguments, the cell values will be updated accordingly.

@@ -320,8 +320,8 @@ 

Sizing the widget= 500, height = 100 )

-
-

If the notebook doesn’t provide a height value, then +

+

If the notebook doesn’t provide a height value, then you’ll have to manually define an height suitable for the output.

 robservable(
@@ -329,8 +329,8 @@ 

Sizing the widget= "chart", height = 450 )

-
-

Finally, if you provide both a widget height and an +

+

Finally, if you provide both a widget height and an height value with the input argument, the second one is not overriden.

@@ -341,8 +341,8 @@ 

Sizing the widget= list(height = 50), height = 200 )

-
-

There are some cases when these width and +

+

There are some cases when these width and height overrides are not suitable. First, those values could be defined for something else than an output size (height could be another type of parameter). Second, @@ -402,11 +402,11 @@

Inspector state events -
document.addEventListener("robservable-chart-fulfilled", (event) => {         
-   d3.selectAll("#chart rect")
-    .on("mouseover", (event) => { ... })
-    .on("mouseout", (event) => { ... });
-}, false)
+
document.addEventListener("robservable-chart-fulfilled", (event) => {         
+   d3.selectAll("#chart rect")
+    .on("mouseover", (event) => { ... })
+    .on("mouseout", (event) => { ... });
+}, false)
+ - - +
- +
@@ -88,9 +87,9 @@

robservable in Shiny applications

Julien Barnier, Kenton Russell

-

2023-12-15

+

2024-08-30

- Source: vignettes/shiny.Rmd + Source: vignettes/shiny.Rmd
@@ -278,9 +277,7 @@

Proxy usage - -

+
@@ -293,16 +290,16 @@

Proxy usage

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/authors.html b/authors.html index 50e2840..24d83b0 100644 --- a/authors.html +++ b/authors.html @@ -1,9 +1,9 @@ -Authors and Citation • robservableAuthors and Citation • robservable - +
- +
- +
  • -

    Julien Barnier. Author, maintainer. +

    Julien Barnier. Author, maintainer.

  • -

    Kenton Russell. Author. +

    Kenton Russell. Author.

Citation

- Source: DESCRIPTION + Source: DESCRIPTION
-

Barnier J, Russell K (2023). +

Barnier J, Russell K (2024). robservable: Import an Observable Notebook as HTML Widget. -R package version 0.2.2.9000, https://juba.github.io/robservable/. +R package version 0.2.2.9000, https://juba.github.io/robservable/.

@Manual{,
   title = {robservable: Import an Observable Notebook as HTML Widget},
   author = {Julien Barnier and Kenton Russell},
-  year = {2023},
+  year = {2024},
   note = {R package version 0.2.2.9000},
   url = {https://juba.github.io/robservable/},
 }
@@ -104,15 +104,15 @@

Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/index.html b/index.html index 7e69e71..ed00bc7 100644 --- a/index.html +++ b/index.html @@ -6,22 +6,20 @@ Import an Observable Notebook as HTML Widget • robservable - + - + - +
- +
@@ -93,8 +91,8 @@

This package allows the use of Observable notebooks (or parts of them) as htmlwidgets in R.

Note that it is not an iframe embedding a whole notebook – cells are <div> included directly in your document or application. You can choose what cells to display, update cell values from R, and add observers to cells to get their values back into a Shiny application.

The following GIF shows a quick example of reusing a bar chart race notebook inside R with our own data.

-
-

example

+
+example
example

You’ll find more examples and the associated R code in the robservable gallery.

@@ -140,7 +138,7 @@

Development notespacker to manage JavaScript source code and dependencies. If you want to modify it, you’ll need a working installation of Node.js.

After cloning this repository, run the following in a terminal at the project root :

-
npm install
+
npm install

Then, if you modify the JavaScript code in srcjs, you’ll have to run the following command to bundle and update the widget JavaScript code :

 packer::bundle_dev()
@@ -206,16 +204,16 @@

Dev status

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/news/index.html b/news/index.html index ac31a3d..f3b3bb9 100644 --- a/news/index.html +++ b/news/index.html @@ -1,9 +1,9 @@ -Changelog • robservableChangelog • robservable - +
- +
@@ -100,15 +100,15 @@
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/pkgdown.yml b/pkgdown.yml index e67dec7..199b37c 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,12 +1,11 @@ -pandoc: 2.19.2 -pkgdown: 2.0.7 +pandoc: 3.1.11 +pkgdown: 2.1.0 pkgdown_sha: ~ articles: gallery: gallery.html introduction: introduction.html shiny: shiny.html -last_built: 2023-12-15T15:37Z +last_built: 2024-08-30T10:53Z urls: reference: https://juba.github.io/robservable/reference article: https://juba.github.io/robservable/articles - diff --git a/reference/index.html b/reference/index.html index ee9ba62..d3f9d46 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,9 +1,9 @@ -Function reference • robservablePackage index • robservable - +
- +
@@ -111,15 +111,15 @@

Misc

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/renderRobservable.html b/reference/renderRobservable.html new file mode 100644 index 0000000..8aef180 --- /dev/null +++ b/reference/renderRobservable.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/robs_observe.html b/reference/robs_observe.html index ed70a0b..38a4ffc 100644 --- a/reference/robs_observe.html +++ b/reference/robs_observe.html @@ -1,9 +1,9 @@ -Add an observer to a robservable notebook input through robservableProxy — robs_observe • robservableAdd an observer to a robservable notebook input through robservableProxy — robs_observe • robservable - +
- +
@@ -74,21 +74,19 @@

Add an observer to a robservable notebook input through r

Arguments

-
robs
+ + +
robs

robservableProxy that you would like to update

-
observer
+
observer

character name(s) of inputs to observe

Value

- - -

robservable_proxy

- - +

robservable_proxy

@@ -236,15 +234,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/robs_update.html b/reference/robs_update.html index 9ba74c6..422fc1d 100644 --- a/reference/robs_update.html +++ b/reference/robs_update.html @@ -1,9 +1,9 @@ -Update robservable through robservableProxy — robs_update • robservableUpdate robservable through robservableProxy — robs_update • robservable - +
- +
@@ -74,21 +74,19 @@

Update robservable through robservableProxy

Arguments

-
robs
+ + +
robs

robservableProxy that you would like to update

-
...
+
...

named arguments to represent variables or inputs to update

Value

- - -

robservable_proxy

- - +

robservable_proxy

@@ -236,15 +234,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/robservable-shiny.html b/reference/robservable-shiny.html index 274a8bf..681d244 100644 --- a/reference/robservable-shiny.html +++ b/reference/robservable-shiny.html @@ -1,10 +1,10 @@ -Shiny bindings for robservable — robservable-shiny • robservableShiny bindings for robservable — robservable-shiny • robservable - +
- +
@@ -78,25 +78,27 @@

Shiny bindings for robservable

Arguments

-
outputId
+ + +
outputId

output variable to read from

-
width, height
+
width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

-
expr
+
expr

An expression that generates a robservable

-
env
+
env

The environment in which to evaluate expr.

-
quoted
+
quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

@@ -114,15 +116,15 @@

Arguments

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/robservable.html b/reference/robservable.html index 948d09b..6431dde 100644 --- a/reference/robservable.html +++ b/reference/robservable.html @@ -1,9 +1,9 @@ -Display an Observable notebook as HTML widget — robservable • robservableDisplay an Observable notebook as HTML widget — robservable • robservable - +
- +
@@ -88,66 +88,66 @@

Display an Observable notebook as HTML widget

Arguments

-
notebook
+ + +
notebook

The notebook id, such as "@d3/bar-chart", or the full notebook URL.

-
include
+
include

character vector of cell names to be rendered. If NULL, the whole notebook is rendered.

-
hide
+
hide

character vector of cell names in include to be hidden in the output.

-
input
+
input

A named list of cells to be updated with a fixed value.

-
input_js
+
input_js

A named list of cells to be updated with JavaScript code. Each list element is itself a list with a vector of argument names as inputs entry, and a character string of JavaScript code as definition entry, as expected by Observable runtime variable.define function.

-
observers
+
observers

A vector of character strings representing variables in observable that you would like to set as input values in Shiny.

-
update_height
+
update_height

if TRUE (default) and input$height is not defined, replace its value with the height of the widget root HTML element. Note there will not always be such a cell in every notebook. Set it to FALSE to always keep the notebook value.

-
update_width
+
update_width

if TRUE (default) and input$width is not defined, replace its value with the width of the widget root HTML element. Set it to FALSE to always keep the notebook or the Observable stdlib value.

-
width
+
width

htmlwidget width.

-
height
+
height

htmlwidget height.

-
elementId
+
elementId

optional manual widget HTML id.

-
json_args
+
json_args

custom arguments passed to JSON serializer.

-
json_func
+
json_func

optional custom JSON serializer R function.

Value

- - -

An object of class htmlwidget.

+

An object of class htmlwidget.

Details

@@ -164,16 +164,16 @@

Examples

"@juba/robservable-bar-chart", include = "chart" ) -
- +
+ ## Change cells data with input robservable( "@juba/robservable-bar-chart", include = "chart", input = list(color = "red", height = 700) ) -
- +
+ ## Change data frame cells data df <- data.frame(table(mtcars$cyl)) names(df) <- c("name", "value") @@ -186,8 +186,8 @@

Examples

y = "name" ) ) -
- +
+
@@ -202,15 +202,15 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/robservableOutput.html b/reference/robservableOutput.html new file mode 100644 index 0000000..8aef180 --- /dev/null +++ b/reference/robservableOutput.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/robservableProxy.html b/reference/robservableProxy.html index a1da785..0b496a6 100644 --- a/reference/robservableProxy.html +++ b/reference/robservableProxy.html @@ -1,10 +1,10 @@ -Send commands to a Proxy instance in a Shiny app — robservableProxy • robservableSend commands to a Proxy instance in a Shiny app — robservableProxy • robservable - +
- +
@@ -80,18 +80,20 @@

Send commands to a Proxy instance in a Shiny app

Arguments

-
id
+ + +
id

single-element character vector indicating the output ID of the robservable to modify (if invoked from a Shiny module, the namespace will be added automatically)

-
session
+
session

the Shiny session object to which the robservable belongs; usually the default value will suffice

-
deferUntilFlush
+
deferUntilFlush

indicates whether actions performed against this instance should be carried out right away, or whether they should be held until after the next time all of the outputs are updated; defaults to @@ -100,9 +102,7 @@

Arguments

Value

- - -

A proxy object which allows to update an already created robservable instance.

+

A proxy object which allows to update an already created robservable instance.

Details

@@ -132,15 +132,15 @@

Details

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/reference/to_js_date.html b/reference/to_js_date.html index eeb0691..3b3d68b 100644 --- a/reference/to_js_date.html +++ b/reference/to_js_date.html @@ -1,9 +1,9 @@ -Convert a Date or POSIXt object to a JS Date format — to_js_date • robservableConvert a Date or POSIXt object to a JS Date format — to_js_date • robservable - +
- +
@@ -74,15 +74,15 @@

Convert a Date or POSIXt object to a JS Date format

Arguments

-
date
+ + +
date

object to be converted

Value

- - -

Numeric value representing the number of milliseconds between Unix Epoch +

Numeric value representing the number of milliseconds between Unix Epoch (1 January 1970 UTC) and date.

@@ -98,15 +98,15 @@

Value

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.0.

- - + + diff --git a/sitemap.xml b/sitemap.xml index d7872f8..2e97f93 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,48 +1,18 @@ - - - - https://juba.github.io/robservable/404.html - - - https://juba.github.io/robservable/articles/gallery.html - - - https://juba.github.io/robservable/articles/index.html - - - https://juba.github.io/robservable/articles/introduction.html - - - https://juba.github.io/robservable/articles/shiny.html - - - https://juba.github.io/robservable/authors.html - - - https://juba.github.io/robservable/index.html - - - https://juba.github.io/robservable/news/index.html - - - https://juba.github.io/robservable/reference/index.html - - - https://juba.github.io/robservable/reference/robs_observe.html - - - https://juba.github.io/robservable/reference/robs_update.html - - - https://juba.github.io/robservable/reference/robservable-shiny.html - - - https://juba.github.io/robservable/reference/robservable.html - - - https://juba.github.io/robservable/reference/robservableProxy.html - - - https://juba.github.io/robservable/reference/to_js_date.html - + +https://juba.github.io/robservable/404.html +https://juba.github.io/robservable/articles/gallery.html +https://juba.github.io/robservable/articles/index.html +https://juba.github.io/robservable/articles/introduction.html +https://juba.github.io/robservable/articles/shiny.html +https://juba.github.io/robservable/authors.html +https://juba.github.io/robservable/index.html +https://juba.github.io/robservable/news/index.html +https://juba.github.io/robservable/reference/index.html +https://juba.github.io/robservable/reference/robs_observe.html +https://juba.github.io/robservable/reference/robs_update.html +https://juba.github.io/robservable/reference/robservable-shiny.html +https://juba.github.io/robservable/reference/robservable.html +https://juba.github.io/robservable/reference/robservableProxy.html +https://juba.github.io/robservable/reference/to_js_date.html +