├── .Rbuildignore ├── .codecov.yml ├── .github ├── .gitignore └── workflows │ └── R-CMD-check.yaml ├── .gitignore ├── .lintr ├── .travis.yml ├── CONTRIBUTING.md ├── DESCRIPTION ├── LICENSE ├── LICENSE.note ├── NAMESPACE ├── NEWS.md ├── R ├── attr_mapping.R ├── bokeh_render_json.R ├── constants.R ├── fig_axis.R ├── fig_callback.R ├── fig_gmap.R ├── fig_grid.R ├── fig_hover.R ├── fig_layer.R ├── fig_legend.R ├── fig_range.R ├── fig_selection.R ├── fig_tap.R ├── fig_title.R ├── fig_tool.R ├── figure.R ├── helpers.R ├── helpers_extra_pars.R ├── json_helpers.R ├── layer__utils.R ├── layer_bar.R ├── layer_glyphs.R ├── layer_hexbin.R ├── layer_image.R ├── layer_lines.R ├── layer_map.R ├── layer_points.R ├── layer_shapes.R ├── layer_stats.R ├── layer_text.R ├── make_glyph.R ├── misc.R ├── output_gist.R ├── output_html.R ├── output_json.R ├── output_prerender.R ├── output_save.R ├── point_types.R ├── prepare_figure.R ├── rbokeh-package.R ├── shiny.R ├── theme_axis.R ├── theme_grid.R ├── theme_legend.R ├── theme_palettes.R ├── theme_plot.R ├── theme_title.R ├── themes.R └── zzz.R ├── README.md ├── _pkgdown.yml ├── cran-comments.md ├── data ├── elements.rda ├── flightFreq.rda └── nyctaxihex.rda ├── docs ├── 404.html ├── CONTRIBUTING.html ├── LICENSE-text.html ├── apple-touch-icon-120x120.png ├── apple-touch-icon-152x152.png ├── apple-touch-icon-180x180.png ├── apple-touch-icon-60x60.png ├── apple-touch-icon-76x76.png ├── apple-touch-icon.png ├── articles │ ├── index.html │ ├── rbokeh-pkg.html │ ├── rbokeh.html │ └── rbokeh_files │ │ ├── bokehjs-0.12.5 │ │ ├── bokeh-widgets.min.css │ │ ├── bokeh-widgets.min.js │ │ ├── bokeh.min.css │ │ ├── bokeh.min.js │ │ ├── icons-classic │ │ │ ├── label.png │ │ │ ├── resultset_next.png │ │ │ └── resultset_previous.png │ │ ├── images │ │ │ ├── actions.gif │ │ │ ├── ajax-loader-small.gif │ │ │ ├── arrow_redo.png │ │ │ ├── arrow_right_peppermint.png │ │ │ ├── arrow_right_spearmint.png │ │ │ ├── arrow_undo.png │ │ │ ├── bullet_blue.png │ │ │ ├── bullet_star.png │ │ │ ├── bullet_toggle_minus.png │ │ │ ├── bullet_toggle_plus.png │ │ │ ├── calendar.gif │ │ │ ├── collapse.gif │ │ │ ├── comment_yellow.gif │ │ │ ├── down.gif │ │ │ ├── drag-handle.png │ │ │ ├── editor-helper-bg.gif │ │ │ ├── expand.gif │ │ │ ├── header-bg.gif │ │ │ ├── header-columns-bg.gif │ │ │ ├── header-columns-over-bg.gif │ │ │ ├── help.png │ │ │ ├── info.gif │ │ │ ├── listview.gif │ │ │ ├── pencil.gif │ │ │ ├── row-over-bg.gif │ │ │ ├── sort-asc.gif │ │ │ ├── sort-asc.png │ │ │ ├── sort-desc.gif │ │ │ ├── sort-desc.png │ │ │ ├── stripes.png │ │ │ ├── tag_red.png │ │ │ ├── tick.png │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ ├── user_identity.gif │ │ │ └── user_identity_plus.gif │ │ ├── loader.css │ │ ├── notused │ │ │ ├── bokeh-tables.min.css │ │ │ └── bokeh-tables.min.js │ │ └── prev │ │ │ ├── cdn.txt │ │ │ ├── v0.12.1 │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh.min.css │ │ │ ├── bokeh.min.js │ │ │ └── loader.css │ │ │ ├── v0.12.10 │ │ │ ├── bokeh-gl.min.js │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh.min.css │ │ │ ├── bokeh.min.js │ │ │ └── notused │ │ │ │ ├── bokeh-gl.min.js.map │ │ │ │ ├── bokeh-tables.min.css │ │ │ │ ├── bokeh-tables.min.css.map │ │ │ │ ├── bokeh-tables.min.js │ │ │ │ ├── bokeh-tables.min.js.map │ │ │ │ ├── bokeh-widgets.min.css.map │ │ │ │ ├── bokeh-widgets.min.js.map │ │ │ │ ├── bokeh.min.css.map │ │ │ │ └── bokeh.min.js.map │ │ │ ├── v0.12.5 │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh.min.css │ │ │ └── bokeh.min.js │ │ │ ├── v0.12.6 │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh.min.css │ │ │ └── bokeh.min.js │ │ │ ├── v0.12.9 │ │ │ ├── bokeh-gl.min.js │ │ │ ├── bokeh-gl.min.js.map │ │ │ ├── bokeh-tables.min.css │ │ │ ├── bokeh-tables.min.css.map │ │ │ ├── bokeh-tables.min.js │ │ │ ├── bokeh-tables.min.js.map │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.css.map │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh-widgets.min.js.map │ │ │ ├── bokeh.min.css │ │ │ ├── bokeh.min.css.map │ │ │ ├── bokeh.min.js │ │ │ └── bokeh.min.js.map │ │ │ ├── v1.0.1 │ │ │ ├── bokeh-gl.min.js │ │ │ ├── bokeh-gl.min.js.map │ │ │ ├── bokeh-tables.min.css │ │ │ ├── bokeh-tables.min.js │ │ │ ├── bokeh-tables.min.js.map │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh-widgets.min.js.map │ │ │ ├── bokeh.min.css │ │ │ ├── bokeh.min.js │ │ │ └── bokeh.min.js.map │ │ │ └── v1.3.4 │ │ │ ├── bokeh-gl.min.js │ │ │ ├── bokeh-widgets.min.css │ │ │ ├── bokeh-widgets.min.js │ │ │ ├── bokeh.min.css │ │ │ └── bokeh.min.js │ │ ├── htmlwidgets-1.5.1 │ │ └── htmlwidgets.js │ │ └── rbokeh-binding-0.5.1 │ │ └── rbokeh.js ├── authors.html ├── bootstrap-toc.css ├── bootstrap-toc.js ├── docsearch.css ├── docsearch.js ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── index.html ├── link.svg ├── logo.png ├── news │ └── index.html ├── pkgdown.css ├── pkgdown.js ├── pkgdown.yml └── reference │ ├── b_eval.html │ ├── bokeh_render_json.html │ ├── catjitter.html │ ├── console_callback.html │ ├── custom_callback.html │ ├── data_name_list.html │ ├── debug_callback.html │ ├── elements.html │ ├── figure.html │ ├── figure_data.html │ ├── figures │ └── logo.png │ ├── flightfreq.html │ ├── get_object_refs.html │ ├── gmap.html │ ├── gmap_style.html │ ├── grid_plot.html │ ├── index.html │ ├── ly_abline.html │ ├── ly_annular_wedge.html │ ├── ly_annulus.html │ ├── ly_arc.html │ ├── ly_bar.html │ ├── ly_bezier.html │ ├── ly_boxplot.html │ ├── ly_contour.html │ ├── ly_crect.html │ ├── ly_curve.html │ ├── ly_density.html │ ├── ly_hexbin.html │ ├── ly_hist.html │ ├── ly_image.html │ ├── ly_image_url.html │ ├── ly_lines.html │ ├── ly_map.html │ ├── ly_multi_line.html │ ├── ly_oval.html │ ├── ly_patch.html │ ├── ly_points.html │ ├── ly_polygons.html │ ├── ly_quadratic.html │ ├── ly_quantile.html │ ├── ly_ray.html │ ├── ly_rect.html │ ├── ly_segments.html │ ├── ly_text.html │ ├── ly_wedge.html │ ├── nyctaxihex.html │ ├── palettes.html │ ├── phantom_install.html │ ├── pipe.html │ ├── point_types.html │ ├── print_model_json.html │ ├── rbokeh-package.html │ ├── rbokeh2html.html │ ├── rbokehOutput.html │ ├── renderRbokeh.html │ ├── set_palette.html │ ├── set_theme.html │ ├── shiny_callback.html │ ├── sub_names.html │ ├── theme_axis.html │ ├── theme_grid.html │ ├── theme_legend.html │ ├── theme_plot.html │ ├── theme_title.html │ ├── themes.html │ ├── tool_box_select.html │ ├── tool_box_zoom.html │ ├── tool_crosshair.html │ ├── tool_hover.html │ ├── tool_lasso_select.html │ ├── tool_pan.html │ ├── tool_reset.html │ ├── tool_resize.html │ ├── tool_save.html │ ├── tool_selection.html │ ├── tool_tap.html │ ├── tool_wheel_zoom.html │ ├── widget2gist.html │ ├── widget2png.html │ ├── x_axis.html │ ├── x_range.html │ ├── y_axis.html │ └── y_range.html ├── inst └── htmlwidgets │ ├── lib │ └── bokehjs │ │ ├── bokeh-widgets.min.css │ │ ├── bokeh-widgets.min.js │ │ ├── bokeh.min.css │ │ ├── bokeh.min.js │ │ ├── icons-classic │ │ ├── label.png │ │ ├── resultset_next.png │ │ └── resultset_previous.png │ │ ├── images │ │ ├── actions.gif │ │ ├── ajax-loader-small.gif │ │ ├── arrow_redo.png │ │ ├── arrow_right_peppermint.png │ │ ├── arrow_right_spearmint.png │ │ ├── arrow_undo.png │ │ ├── bullet_blue.png │ │ ├── bullet_star.png │ │ ├── bullet_toggle_minus.png │ │ ├── bullet_toggle_plus.png │ │ ├── calendar.gif │ │ ├── collapse.gif │ │ ├── comment_yellow.gif │ │ ├── down.gif │ │ ├── drag-handle.png │ │ ├── editor-helper-bg.gif │ │ ├── expand.gif │ │ ├── header-bg.gif │ │ ├── header-columns-bg.gif │ │ ├── header-columns-over-bg.gif │ │ ├── help.png │ │ ├── info.gif │ │ ├── listview.gif │ │ ├── pencil.gif │ │ ├── row-over-bg.gif │ │ ├── sort-asc.gif │ │ ├── sort-asc.png │ │ ├── sort-desc.gif │ │ ├── sort-desc.png │ │ ├── stripes.png │ │ ├── tag_red.png │ │ ├── tick.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── user_identity.gif │ │ └── user_identity_plus.gif │ │ └── loader.css │ ├── rbokeh.js │ └── rbokeh.yaml ├── man-roxygen ├── callback.R ├── dots-fillline.R ├── dots-line.R ├── ex-axis.R ├── ex-bar.R ├── ex-barret.R ├── ex-barret_ryan.R ├── ex-barret_ryan_2.R ├── ex-boxplot.R ├── ex-callback.R ├── ex-elements.R ├── ex-flightfreq.R ├── ex-gmap.R ├── ex-grid.R ├── ex-hover-callback.R ├── ex-hover-custom-callback.R ├── ex-image.R ├── ex-image_url.R ├── ex-lines.R ├── ex-points.R ├── ex-range.R ├── ex-selection-callback.R ├── ex-shapes.R ├── ex-shiny.R ├── ex-tap-debug-callback.R ├── ex-theme.R ├── par-coloralpha.R ├── par-hover.R ├── par-legend.R ├── par-lineprops.R ├── par-lnamegroup.R ├── par-text.R ├── par-url.R └── tools.R ├── man ├── b_eval.Rd ├── bokeh_render_json.Rd ├── catjitter.Rd ├── console_callback.Rd ├── custom_callback.Rd ├── data_name_list.Rd ├── debug_callback.Rd ├── elements.Rd ├── figure.Rd ├── figure_data.Rd ├── figures │ └── logo.png ├── flightfreq.Rd ├── get_object_refs.Rd ├── gmap.Rd ├── gmap_style.Rd ├── grid_plot.Rd ├── ly_abline.Rd ├── ly_annular_wedge.Rd ├── ly_annulus.Rd ├── ly_arc.Rd ├── ly_bar.Rd ├── ly_bezier.Rd ├── ly_boxplot.Rd ├── ly_contour.Rd ├── ly_crect.Rd ├── ly_curve.Rd ├── ly_density.Rd ├── ly_hexbin.Rd ├── ly_hist.Rd ├── ly_image.Rd ├── ly_image_url.Rd ├── ly_lines.Rd ├── ly_map.Rd ├── ly_multi_line.Rd ├── ly_oval.Rd ├── ly_patch.Rd ├── ly_points.Rd ├── ly_polygons.Rd ├── ly_quadratic.Rd ├── ly_quantile.Rd ├── ly_ray.Rd ├── ly_rect.Rd ├── ly_segments.Rd ├── ly_text.Rd ├── ly_wedge.Rd ├── nyctaxihex.Rd ├── palettes.Rd ├── phantom_install.Rd ├── pipe.Rd ├── point_types.Rd ├── print_model_json.Rd ├── rbokeh-package.Rd ├── rbokeh2html.Rd ├── rbokehOutput.Rd ├── renderRbokeh.Rd ├── set_palette.Rd ├── set_theme.Rd ├── shiny_callback.Rd ├── sub_names.Rd ├── theme_axis.Rd ├── theme_grid.Rd ├── theme_legend.Rd ├── theme_plot.Rd ├── theme_title.Rd ├── themes.Rd ├── tool_box_select.Rd ├── tool_box_zoom.Rd ├── tool_crosshair.Rd ├── tool_hover.Rd ├── tool_lasso_select.Rd ├── tool_pan.Rd ├── tool_reset.Rd ├── tool_resize.Rd ├── tool_save.Rd ├── tool_selection.Rd ├── tool_tap.Rd ├── tool_wheel_zoom.Rd ├── widget2gist.Rd ├── widget2png.Rd ├── x_axis.Rd ├── x_range.Rd ├── y_axis.Rd └── y_range.Rd ├── pkgdown └── favicon │ ├── apple-touch-icon-120x120.png │ ├── apple-touch-icon-152x152.png │ ├── apple-touch-icon-180x180.png │ ├── apple-touch-icon-60x60.png │ ├── apple-touch-icon-76x76.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ └── favicon.ico ├── tests ├── testthat.R └── testthat │ ├── test-css-svg.R │ ├── test-figures.R │ └── test-zzz-lintr.R └── vignettes ├── .gitignore ├── rbokeh-pkg.Rmd └── rbokeh.Rmd /.Rbuildignore: -------------------------------------------------------------------------------- 1 | man-roxygen 2 | \.git 3 | ^\.travis\.yml$ 4 | \.DS_Store 5 | ..Rcheck 6 | CONTRIBUTING\.md 7 | ^_ignore$ 8 | \.sublime\- 9 | .Rproj 10 | ^\.httr-oauth$ 11 | cran-comments.md 12 | .lintr.* 13 | _gh-pages 14 | .codecov.yml 15 | vignettes2/ 16 | ^js-scales 17 | ^.vscode 18 | ^docs-dev 19 | inst/htmlwidgets/lib/bokehjs/notused 20 | inst/htmlwidgets/lib/bokehjs/prev 21 | ^code-gen 22 | ^revdep$ 23 | rbokeh.code-workspace 24 | ^_pkgdown\.yml$ 25 | ^docs$ 26 | ^pkgdown$ 27 | ^vignettes/rbokeh\.Rmd$ 28 | ^CRAN-RELEASE$ 29 | ^\.github$ 30 | -------------------------------------------------------------------------------- /.codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | bot: hafen 3 | 4 | coverage: 5 | range: "70...95" 6 | status: 7 | patch: 8 | default: 9 | branches: 10 | - master 11 | - dev 12 | target: '80' 13 | project: 14 | default: 15 | branches: 16 | - master 17 | - dev 18 | -------------------------------------------------------------------------------- /.github/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /.github/workflows/R-CMD-check.yaml: -------------------------------------------------------------------------------- 1 | # For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. 2 | # https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: 9 | branches: 10 | - main 11 | - master 12 | 13 | name: R-CMD-check 14 | 15 | jobs: 16 | R-CMD-check: 17 | runs-on: ${{ matrix.config.os }} 18 | 19 | name: ${{ matrix.config.os }} (${{ matrix.config.r }}) 20 | 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | config: 25 | - {os: windows-latest, r: 'release'} 26 | - {os: macOS-latest, r: 'release'} 27 | - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} 28 | - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.1.0 (ubuntu-20.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" } 29 | 30 | env: 31 | R_REMOTES_NO_ERRORS_FROM_WARNINGS: true 32 | RSPM: ${{ matrix.config.rspm }} 33 | GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} 34 | 35 | steps: 36 | - uses: actions/checkout@v2 37 | 38 | - uses: r-lib/actions/setup-r@v1 39 | with: 40 | r-version: ${{ matrix.config.r }} 41 | 42 | - uses: r-lib/actions/setup-pandoc@v1 43 | 44 | - name: Query dependencies 45 | run: | 46 | install.packages('remotes') 47 | saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) 48 | writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") 49 | shell: Rscript {0} 50 | 51 | - name: Restore R package cache 52 | uses: actions/cache@v2 53 | with: 54 | path: ${{ env.R_LIBS_USER }} 55 | key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} 56 | restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- 57 | 58 | - name: Install system dependencies 59 | if: runner.os == 'Linux' 60 | run: | 61 | while read -r cmd 62 | do 63 | eval sudo $cmd 64 | done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') 65 | 66 | - name: Install dependencies 67 | run: | 68 | remotes::install_deps(dependencies = TRUE) 69 | remotes::install_cran("rcmdcheck") 70 | shell: Rscript {0} 71 | 72 | - name: Check 73 | env: 74 | _R_CHECK_CRAN_INCOMING_REMOTE_: false 75 | run: | 76 | options(crayon.enabled = TRUE) 77 | rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") 78 | shell: Rscript {0} 79 | 80 | - name: Upload check results 81 | if: failure() 82 | uses: actions/upload-artifact@main 83 | with: 84 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results 85 | path: check 86 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | # History files 3 | .Rhistory 4 | .Rapp.history 5 | # Example code in package build process 6 | *-Ex.R 7 | # R data files from past sessions 8 | .Rdata 9 | # RStudio files 10 | .Rproj.user/ 11 | rbokeh.sublime* 12 | .httr-oauth 13 | _ignore 14 | .lintr_cache 15 | inst/doc 16 | _gh-pages 17 | vignettes/index_cache/ 18 | revdep 19 | -------------------------------------------------------------------------------- /.lintr: -------------------------------------------------------------------------------- 1 | cache_directory: ".lintr_cache" 2 | linters: with_defaults( 3 | commented_code_linter = NULL, 4 | absolute_paths_linter = NULL, 5 | line_length_linter(100), 6 | NULL 7 | ) 8 | exclusions: 9 | list( 10 | ) 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: r 2 | cache: packages 3 | 4 | r: 5 | - release 6 | 7 | after_success: 8 | - Rscript -e 'covr::codecov()' 9 | 10 | branches: 11 | only: 12 | - master 13 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | How to contribute to rbokeh 2 | =========================== 3 | 4 | Thank you for sharing your code with the rbokeh. We appreciate your contribution! 5 | 6 | ## Join the mailing list 7 | 8 | If you're not already on the Bokeh mailing list, take a minute to [join](https://groups.google.com/a/continuum.io/d/forum/bokeh). 9 | 10 | ## Check the issue tracker 11 | 12 | Before you write too much code, check the [open issues in the rbokeh issue tracker](https://github.com/bokeh/rbokeh/issues?state=open) 13 | to see if someone else has already filed an issue related to your work or is already working on it. If not, go ahead and 14 | [open a new issue](https://github.com/bokeh/rbokeh/issues/new). 15 | 16 | ## Announce your work on the mailing list or issue tracker 17 | 18 | Shoot us a quick email on the mailing list or note on the issue tracker letting us 19 | know what you're working on. There 20 | will likely be people on the list who can give you tips about where to find relevant 21 | source or alert you to other planned changes that might effect your work. 22 | 23 | If the work you're proposing makes substantive changes to rbokeh, you may be asked to attach a design document 24 | to your issue in the issue tracker. This document should provide a high-level explanation of your design, clearly define the goal 25 | of the new design, etc. This document is meant to save you time 26 | as it allows the team a chance to provide feedback on the proposes changes. The document also allows the team to prepare for large changes to the code 27 | base. We welcome change but also want to ensure that code quality is kept high. 28 | 29 | ## Submit your pull request 30 | 31 | Github provides a nice [overview on how to create a pull request](https://help.github.com/articles/creating-a-pull-request). 32 | 33 | Some general rules to follow: 34 | 35 | * Do your work in [a fork](https://help.github.com/articles/fork-a-repo) of the rbokeh repo. 36 | * Create a branch for each feature/bug in rbokeh that you're working on. These branches are often called "feature" 37 | or "topic" branches. 38 | * Use your feature branch in the pull request. Any changes that you push to your feature branch will automatically 39 | be shown in the pull request. If your feature branch is not based off the latest master, you will be asked to rebase 40 | it before it is merged. 41 | * If your pull request fixes an issue, reference the issue so that it will [be closed when your pull request is merged](https://github.com/blog/1506-closing-issues-via-pull-requests) 42 | * Keep your pull requests as small as possible. Large pull requests are hard to review. Try to break up your changes 43 | into self-contained and incremental pull requests, if need be, and reference dependent pull requests, e.g. "This pull 44 | request builds on request #92. Please review #92 first." 45 | * The first line of commit messages should be a short (<80 character) summary, followed by an empty line and then, 46 | optionally, any details that you want to share about the commit. 47 | * Include unit tests with your pull request. We love tests and [use Travis CI](https://travis-ci.org) 48 | to check every pull request and commit. We use the [testthat](http://adv-r.had.co.nz/Testing.html) R package for running unit tests. See code in the `inst/tests` for examples. 49 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: rbokeh 2 | Title: R Interface for Bokeh 3 | Version: 0.5.2 4 | Authors@R: c( 5 | person("Ryan", "Hafen", email = "rhafen@gmail.com", role = c("aut", "cre")), 6 | person("Kenton", "Russell", email = "kent.russell@timelyportfolio.com", role = "ctb"), 7 | person("Jonathan", "Owen", email = "jonathanro@gmail.com", role = "ctb"), 8 | person("Barret", "Schloerke", email = "schloerke@gmail.com", role = "ctb"), 9 | person("Saptasrhi", "Guha", email = "saptarshi.guha@gmail.com", role = "ctb"), 10 | person("Continuum Analytics, Inc.", role = c("aut", "cph"), 11 | comment = "Bokeh library in htmlwidgets/lib, https://bokeh.pydata.org" 12 | )) 13 | Description: A native R plotting library that provides a flexible declarative interface for creating interactive web-based graphics, backed by the Bokeh visualization library . 14 | URL: https://hafen.github.io/rbokeh/ https://github.com/bokeh/rbokeh 15 | BugReports: https://github.com/bokeh/rbokeh/issues 16 | License: MIT + file LICENSE 17 | LazyData: true 18 | NeedsCompilation: no 19 | Imports: 20 | htmlwidgets (>= 0.5), 21 | maps, 22 | methods, 23 | jsonlite, 24 | digest, 25 | hexbin, 26 | lazyeval, 27 | pryr, 28 | magrittr, 29 | scales, 30 | gistr 31 | Suggests: 32 | testthat, 33 | data.table, 34 | lattice, 35 | lintr, 36 | roxygen2 (>= 5.0.0), 37 | latticeExtra, 38 | knitr, 39 | rmarkdown, 40 | markdown 41 | Enhances: shiny (>= 0.12) 42 | RoxygenNote: 7.1.1 43 | Encoding: UTF-8 44 | VignetteBuilder: knitr 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2016 2 | COPYRIGHT HOLDER: Continuum Analytics, Inc. and Ryan Hafen 3 | -------------------------------------------------------------------------------- /LICENSE.note: -------------------------------------------------------------------------------- 1 | The rbokeh package as a whole is distributed under MIT. 2 | 3 | The rbokeh package includes other open source software components. The following 4 | is a list of these components (full copies of the license agreements used by 5 | these components are included below): 6 | 7 | - bokeh.js, https://bokeh.pydata.org/ 8 | 9 | 10 | bokeh.js license 11 | --------------------------------------------------------------------- 12 | Copyright (c) 2012, Continuum Analytics, Inc. 13 | All rights reserved. 14 | 15 | Redistribution and use in source and binary forms, with or without modification, 16 | are permitted provided that the following conditions are met: 17 | 18 | Redistributions of source code must retain the above copyright notice, 19 | this list of conditions and the following disclaimer. 20 | 21 | Redistributions in binary form must reproduce the above copyright notice, 22 | this list of conditions and the following disclaimer in the documentation 23 | and/or other materials provided with the distribution. 24 | 25 | Neither the name of Continuum Analytics nor the names of any contributors 26 | may be used to endorse or promote products derived from this software 27 | without specific prior written permission. 28 | 29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” 30 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 31 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 32 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 33 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 34 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 35 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 36 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 37 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 38 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 39 | THE POSSIBILITY OF SUCH DAMAGE. 40 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export("%>%") 4 | export(.datatable.aware) 5 | export(bk_default_theme) 6 | export(bk_ggplot_theme) 7 | export(bokeh_render_json) 8 | export(catjitter) 9 | export(console_callback) 10 | export(custom_callback) 11 | export(debug_callback) 12 | export(figure) 13 | export(figure_data) 14 | export(get_object_refs) 15 | export(gmap) 16 | export(gmap_style) 17 | export(grid_plot) 18 | export(ly_abline) 19 | export(ly_annular_wedge) 20 | export(ly_annulus) 21 | export(ly_arc) 22 | export(ly_bar) 23 | export(ly_bezier) 24 | export(ly_boxplot) 25 | export(ly_contour) 26 | export(ly_crect) 27 | export(ly_curve) 28 | export(ly_density) 29 | export(ly_hexbin) 30 | export(ly_hist) 31 | export(ly_image) 32 | export(ly_image_url) 33 | export(ly_lines) 34 | export(ly_map) 35 | export(ly_multi_line) 36 | export(ly_oval) 37 | export(ly_patch) 38 | export(ly_points) 39 | export(ly_polygons) 40 | export(ly_quadratic) 41 | export(ly_quantile) 42 | export(ly_ray) 43 | export(ly_rect) 44 | export(ly_segments) 45 | export(ly_text) 46 | export(ly_wedge) 47 | export(pal_bk_glyph) 48 | export(pal_bk_line_dash) 49 | export(pal_bk_line_width) 50 | export(pal_color) 51 | export(pal_gradient) 52 | export(pal_size) 53 | export(pal_tableau) 54 | export(phantom_install) 55 | export(point_types) 56 | export(print_model_json) 57 | export(rbokeh2html) 58 | export(rbokehOutput) 59 | export(renderRbokeh) 60 | export(set_palette) 61 | export(set_theme) 62 | export(shiny_callback) 63 | export(theme_axis) 64 | export(theme_grid) 65 | export(theme_legend) 66 | export(theme_plot) 67 | export(theme_title) 68 | export(tool_box_select) 69 | export(tool_box_zoom) 70 | export(tool_crosshair) 71 | export(tool_hover) 72 | export(tool_lasso_select) 73 | export(tool_pan) 74 | export(tool_reset) 75 | export(tool_resize) 76 | export(tool_save) 77 | export(tool_selection) 78 | export(tool_tap) 79 | export(tool_wheel_zoom) 80 | export(widget2gist) 81 | export(widget2png) 82 | export(x_axis) 83 | export(x_range) 84 | export(y_axis) 85 | export(y_range) 86 | import(htmlwidgets) 87 | import(lazyeval) 88 | import(maps) 89 | import(methods) 90 | importFrom(digest,digest) 91 | importFrom(gistr,gist_create) 92 | importFrom(grDevices,boxplot.stats) 93 | importFrom(grDevices,col2rgb) 94 | importFrom(grDevices,colorRampPalette) 95 | importFrom(grDevices,contourLines) 96 | importFrom(grDevices,hsv) 97 | importFrom(grDevices,rgb2hsv) 98 | importFrom(hexbin,hcell2xy) 99 | importFrom(hexbin,hexbin) 100 | importFrom(hexbin,hexcoords) 101 | importFrom(jsonlite,fromJSON) 102 | importFrom(jsonlite,toJSON) 103 | importFrom(magrittr,"%>%") 104 | importFrom(pryr,named_dots) 105 | importFrom(scales,hue_pal) 106 | importFrom(scales,shape_pal) 107 | importFrom(stats,aggregate) 108 | importFrom(stats,complete.cases) 109 | importFrom(stats,is.ts) 110 | importFrom(stats,ppoints) 111 | importFrom(stats,quantile) 112 | importFrom(stats,qunif) 113 | importFrom(stats,runif) 114 | importFrom(stats,time) 115 | importFrom(utils,browseURL) 116 | importFrom(utils,head) 117 | importFrom(utils,tail) 118 | -------------------------------------------------------------------------------- /R/bokeh_render_json.R: -------------------------------------------------------------------------------- 1 | #' Plot a Bokeh JSON specification 2 | #' 3 | #' Take a path to a Bokeh JSON plot specification file and render it in the browser. 4 | #' 5 | #' @note This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_model_json}}. 6 | #' 7 | #' @param json_file path to json file 8 | #' 9 | #' @seealso \code{\link{print_model_json}} 10 | #' @import htmlwidgets 11 | #' @importFrom jsonlite fromJSON 12 | #' 13 | #' @export 14 | bokeh_render_json <- function(json_file) { 15 | 16 | # extract the id 17 | tmp <- jsonlite::fromJSON(json_file, simplifyVector = FALSE) 18 | docid <- names(tmp)[1] 19 | modelid <- tmp[[1]]$roots$root_ids[[1]] 20 | 21 | # forward options using x 22 | x <- list( 23 | docs_json = paste(readLines(json_file), collapse = "\n"), 24 | padding = list(type = "figure"), 25 | elementid = digest::digest(Sys.time()), 26 | modelid = modelid, 27 | docid = docid, 28 | isJSON = TRUE 29 | ) 30 | 31 | # create widget 32 | htmlwidgets::createWidget( 33 | name = "rbokeh", 34 | x, 35 | width = NULL, 36 | height = NULL, 37 | package = "rbokeh" 38 | ) 39 | } 40 | -------------------------------------------------------------------------------- /R/fig_hover.R: -------------------------------------------------------------------------------- 1 | # to add a HoverTool: 2 | # - create a HoverTool model 3 | # - need to point to glyph 4 | # add ref to toolbar$attributes$tools 5 | # add model to object 6 | 7 | ## this is only used internally 8 | ## users cannot manually add a hover tool 9 | ## it must be done through the hover argument to the layer functions 10 | 11 | add_hover <- function(fig, tooltips, renderer_ref) { 12 | id <- gen_id(fig, c(renderer_ref$id, "hover")) 13 | hov_model <- hover_model(id, fig$x$spec$ref, renderer_ref, tooltips) 14 | 15 | if (is.null(fig$x$spec$model$toolbar)) { 16 | tbid <- gen_id(fig, "Toolbar") 17 | tbmodel <- toolbar_model(tbid) 18 | tbmodel$model$attributes["logo"] <- list(fig$x$spec$logo) 19 | fig$x$spec$model$plot$attributes$toolbar <- tbmodel$ref 20 | fig$x$spec$model$toolbar <- tbmodel$model 21 | fig$x$spec$model$plot$attributes$tool_events <- list() 22 | fig <- update_tool_events(fig) 23 | } 24 | 25 | fig$x$spec$model$toolbar 26 | 27 | fig$x$spec$model$toolbar$attributes$tools[[id]] <- hov_model$ref 28 | fig$x$spec$model[[id]] <- hov_model$model 29 | 30 | fig 31 | } 32 | 33 | add_hover_callback <- function(fig, callback, ref_layer) { 34 | 35 | if (is.null(fig$x$spec$model$toolbar)) { 36 | tbid <- gen_id(fig, "Toolbar") 37 | tbmodel <- toolbar_model(tbid) 38 | tbmodel$model$attributes["logo"] <- list(fig$x$spec$logo) 39 | fig$x$spec$model$plot$attributes$toolbar <- tbmodel$ref 40 | fig$x$spec$model$toolbar <- tbmodel$model 41 | fig$x$spec$model$plot$attributes$tool_events <- list() 42 | fig <- update_tool_events(fig) 43 | } 44 | 45 | hov_id <- gen_id(fig, c(callback, ref_layer, "hov_callback")) 46 | 47 | nm <- paste(ref_layer, "glyph_rend", sep = "_") 48 | renderer_ref <- fig$x$spec$callback$layers[[ref_layer]][[nm]] 49 | 50 | hov_model <- hover_model(hov_id, fig$x$spec$ref, renderer_ref, tooltips = NA) 51 | 52 | callback <- handle_hover_callback(callback, fig$x$spec$callback$layers) 53 | 54 | cb_id <- gen_id(fig, c(renderer_ref$id, "HoverCallback", 55 | callback$args, callback$lname)) 56 | cb_model <- customjs_model(id = cb_id, 57 | code = callback$code, args = callback$args) 58 | hov_model$model$attributes$callback <- cb_model$ref 59 | fig$x$spec$model[[cb_id]] <- cb_model$model 60 | fig$x$spec$model$toolbar$attributes$tools[[hov_id]] <- hov_model$ref 61 | fig$x$spec$model[[hov_id]] <- hov_model$model 62 | 63 | fig 64 | } 65 | 66 | hover_model <- function(id, plot_ref, renderer_ref, tooltips) { 67 | res <- base_model_object("HoverTool", id) 68 | res$model$attributes$plot <- plot_ref 69 | if (is.null(renderer_ref)) { 70 | res$model$attributes$renderers <- NULL 71 | } else { 72 | res$model$attributes$renderers <- list(renderer_ref) 73 | } 74 | res$model$attributes$names <- list() 75 | 76 | # TODO: expose any of these to user? 77 | res$model$attributes$anchor <- "center" 78 | res$model$attributes$attachment <- "horizontal" 79 | res$model$attributes$line_policy <- "prev" 80 | res$model$attributes$mode <- "mouse" 81 | res$model$attributes$point_policy <- "snap_to_data" 82 | 83 | res$model$attributes$tooltips <- tooltips 84 | res 85 | } 86 | -------------------------------------------------------------------------------- /R/fig_legend.R: -------------------------------------------------------------------------------- 1 | # to add a legend: 2 | # - create a legend model 3 | # - add a model reference 4 | # - add a list of legend items 5 | 6 | # individual legend items are lists with a label 7 | # and a list of glyph_renderers that the legend 8 | # entry refers to 9 | 10 | ## these are all internal functions called from make_glyph 11 | ## legends are specified through the various layer functions 12 | 13 | add_legend <- function(fig, legends, extra_pars) { 14 | leg_id <- gen_id(fig, "legend") 15 | leg_name <- "legend" 16 | 17 | items <- list() 18 | for (ii in seq_along(legends)) { 19 | lg <- legends[[ii]] 20 | li_id <- gen_id(fig, paste0("legenditem", ii)) 21 | li_name <- paste0("legenditem_", ii) 22 | lgmod <- legend_item_model(li_id, lg) 23 | fig$x$spec$model[[li_name]] <- lgmod$model 24 | items[[ii]] <- lgmod$ref 25 | } 26 | 27 | leg <- legend_model(leg_id, fig$x$spec$ref, items, extra_pars) 28 | 29 | fig$x$spec$model$plot$attributes$renderers[[leg_id]] <- leg$ref 30 | fig$x$spec$model[[leg_name]] <- leg$model 31 | 32 | fig 33 | } 34 | 35 | legend_item_model <- function(id, item) { 36 | res <- base_model_object("LegendItem", id) 37 | res$model$attributes$label <- list(value = item[[1]]) 38 | res$model$attributes$renderers <- item[[2]] 39 | 40 | res 41 | } 42 | 43 | legend_model <- function(id, plot_ref, legends, extra_pars) { 44 | res <- base_model_object("Legend", id) 45 | res$model$attributes$plot <- plot_ref 46 | res$model$attributes$items <- legends 47 | 48 | res$model$attributes <- c(res$model$attributes, extra_pars) 49 | 50 | res 51 | } 52 | 53 | legend_par_validator_map <- list( 54 | "location" = "legend_orientation", 55 | "background_fill_alpha" = "num_data_spec", 56 | "background_fill_color" = "color", 57 | "border_line_alpha" = "num_data_spec", 58 | "border_line_cap" = "line_cap", 59 | "border_line_color" = "color", 60 | "border_line_dash" = "line_dash", 61 | "border_line_dash_offset" = "int", 62 | "border_line_join" = "line_join", 63 | "border_line_width" = "num_data_spec", 64 | "glyph_height" = "int", 65 | "glyph_width" = "int", 66 | "label_height" = "int", 67 | "label_standoff" = "int", 68 | "label_text_align" = "text_align", 69 | "label_text_alpha" = "num_data_spec", 70 | "label_text_baseline" = "text_baseline", 71 | "label_text_color" = "color", 72 | "label_text_font" = "string", 73 | "label_text_font_size" = "font_size_string", 74 | "label_text_font_style" = "font_style", 75 | "label_width" = "int", 76 | "legend_padding" = "int", 77 | "legend_spacing" = "int" 78 | ) 79 | -------------------------------------------------------------------------------- /R/fig_range.R: -------------------------------------------------------------------------------- 1 | #' Update x axis range in a Bokeh figure 2 | #' @param fig figure to modify 3 | #' @param dat either a vector (min, max) if the axis is numeric, or a vector of values if the axis is categorical. In the latter case, the order in which the values are supplied is how they will be arranged on the axis. 4 | #' @param callback TODO 5 | #' @family ranges 6 | #' @example man-roxygen/ex-range.R 7 | #' @export 8 | x_range <- function(fig, dat = NULL, callback = NULL) { 9 | update_range(fig, "x", dat, callback) 10 | } 11 | 12 | #' Update y axis range in a Bokeh figure 13 | #' @inheritParams x_range 14 | #' @family ranges 15 | #' @example man-roxygen/ex-range.R 16 | #' @export 17 | y_range <- function(fig, dat = NULL, callback = NULL) { 18 | update_range(fig, "y", dat, callback) 19 | } 20 | 21 | # range ref needs to be added to plot attributes as "x_range" or "y_range" 22 | # then range model added to object 23 | update_range <- function(fig, axis = "x", dat = NULL, callback = NULL) { 24 | 25 | range_name <- paste0(axis, "_range") 26 | id <- gen_id(fig, range_name) 27 | axis_name <- paste0(axis, "_axis_type") 28 | type <- ifelse(fig$x$spec[[axis_name]] == "categorical", "FactorRange", "Range1d") 29 | model <- base_model_object(type, id) 30 | 31 | # first get the model if it exists 32 | if (!is.null(fig$x$spec$model[[id]])) 33 | model$model <- fig$x$spec$model[[id]] 34 | 35 | if (!is.null(dat)) { 36 | if (inherits(dat, c("Date", "POSIXt"))) 37 | dat <- to_epoch(dat) 38 | 39 | if (type == "Range1d") { 40 | # preserve backward xlim/ylim specification 41 | if (!(length(dat) == 2 && dat[1] > dat[2])) 42 | dat <- range(dat, na.rm = TRUE) 43 | model$model$attributes$start <- dat[1] 44 | model$model$attributes$end <- dat[2] 45 | } else if (type == "FactorRange") { 46 | model$model$attributes$factors <- I(dat) 47 | } 48 | 49 | # this way we know a range was alredy specified 50 | # so we don't need to do it at the render time 51 | fig$x$spec[[paste0("has_", axis, "_range")]] <- TRUE 52 | } 53 | 54 | if (!is.null(callback)) { 55 | if (is.character(callback)) 56 | callback <- structure(list(code = callback, args = NULL, lnames = NULL), 57 | class = "customCallback") 58 | callback$args <- c(callback$args, list(range = model$ref)) 59 | callback <- handle_range_callback(callback, fig$x$spec$callback$layers) 60 | if (!is.null(callback)) { 61 | cb_id <- gen_id(fig, c(paste0(range_name, "_callback"), 62 | callback$args, callback$lname)) 63 | cb_model <- customjs_model(id = cb_id, 64 | code = callback$code, args = callback$args) 65 | fig$x$spec$model[[cb_id]] <- cb_model$model 66 | model$model$attributes$callback <- cb_model$ref 67 | } 68 | } 69 | 70 | fig$x$spec$model$plot$attributes[[range_name]] <- model$ref 71 | fig$x$spec$model[[id]] <- model$model 72 | 73 | fig 74 | } 75 | 76 | range_model <- function(type = "Range1d", id, dat) { 77 | res <- base_model_object(type, id) 78 | 79 | if (type == "Range1d") { 80 | res$model$attributes$start <- dat[1] 81 | res$model$attributes$end <- dat[2] 82 | } else if (type == "FactorRange") { 83 | res$model$attributes$factors <- I(dat) 84 | } 85 | 86 | res 87 | } 88 | -------------------------------------------------------------------------------- /R/fig_selection.R: -------------------------------------------------------------------------------- 1 | 2 | #' Add "selection" tool callback to a Bokeh figure 3 | #' 4 | #' This adds a selection callback to be used with the box select or lasso select tools. 5 | #' @param fig figure to modify 6 | #' @template callback 7 | #' @export 8 | tool_selection <- function(fig, callback, ref_layer) { 9 | 10 | nm <- paste(ref_layer, "data", sep = "_") 11 | did <- fig$x$spec$callback$layers[[ref_layer]][[nm]]$id 12 | 13 | callback <- handle_selection_callback(callback, fig$x$spec$callback$layers) 14 | 15 | cb_id <- gen_id(fig, c(did, "SelectionCallback", 16 | callback$args, callback$lnames)) 17 | 18 | cb_model <- customjs_model(id = cb_id, 19 | code = callback$code, args = callback$args) 20 | 21 | fig$x$spec$model[[did]]$attributes$callback <- cb_model$ref 22 | fig$x$spec$model[[cb_id]] <- cb_model$model 23 | 24 | fig 25 | } 26 | -------------------------------------------------------------------------------- /R/fig_tap.R: -------------------------------------------------------------------------------- 1 | 2 | add_url <- function(fig, url, renderer_ref) { 3 | 4 | tap_id <- gen_id(fig, c(renderer_ref$id, "TapTool")) 5 | tap_model <- tap_model(tap_id, fig$x$spec$ref, renderer_ref) 6 | 7 | if (is.null(fig$x$spec$model$toolbar)) { 8 | tbid <- gen_id(fig, "Toolbar") 9 | tbmodel <- toolbar_model(tbid) 10 | tbmodel$model$attributes["logo"] <- list(fig$x$spec$logo) 11 | fig$x$spec$model$plot$attributes$toolbar <- tbmodel$ref 12 | fig$x$spec$model$toolbar <- tbmodel$model 13 | fig$x$spec$model$plot$attributes$tool_events <- list() 14 | fig <- update_tool_events(fig) 15 | } 16 | 17 | url_id <- gen_id(fig, c(renderer_ref$id, "url")) 18 | url_model <- open_url_model(url_id, url) 19 | 20 | tap_model$model$attributes$callback <- url_model$ref 21 | 22 | fig$x$spec$model[[url_id]] <- url_model$model 23 | fig$x$spec$model$toolbar$attributes$tools[[tap_id]] <- tap_model$ref 24 | fig$x$spec$model[[tap_id]] <- tap_model$model 25 | 26 | fig 27 | } 28 | 29 | add_tap_callback <- function(fig, callback, ref_layer) { 30 | 31 | if (is.null(fig$x$spec$model$toolbar)) { 32 | tbid <- gen_id(fig, "Toolbar") 33 | tbmodel <- toolbar_model(tbid) 34 | tbmodel$model$attributes["logo"] <- list(fig$x$spec$logo) 35 | fig$x$spec$model$plot$attributes$toolbar <- tbmodel$ref 36 | fig$x$spec$model$toolbar <- tbmodel$model 37 | fig$x$spec$model$plot$attributes$tool_events <- list() 38 | fig <- update_tool_events(fig) 39 | } 40 | 41 | tap_id <- gen_id(fig, c(callback, ref_layer, "tap_callback")) 42 | 43 | nm <- paste(ref_layer, "glyph_rend", sep = "_") 44 | renderer_ref <- fig$x$spec$callback$layers[[ref_layer]][[nm]] 45 | 46 | tap_model <- tap_model(tap_id, fig$x$spec$ref, renderer_ref) 47 | 48 | callback <- handle_tap_callback(callback, fig$x$spec$callback$layers) 49 | 50 | cb_id <- gen_id(fig, c(renderer_ref$id, "TapCallback", 51 | callback$args, callback$lnames)) 52 | cb_model <- customjs_model(id = cb_id, 53 | code = callback$code, args = callback$args) 54 | tap_model$model$attributes$callback <- cb_model$ref 55 | fig$x$spec$model[[cb_id]] <- cb_model$model 56 | fig$x$spec$model$toolbar$attributes$tools[[tap_id]] <- tap_model$ref 57 | fig$x$spec$model[[tap_id]] <- tap_model$model 58 | 59 | fig 60 | } 61 | 62 | tap_model <- function(id, plot_ref, renderer_ref) { 63 | res <- base_model_object("TapTool", id) 64 | res$model$attributes$plot <- plot_ref 65 | res$model$attributes$renderers <- list(renderer_ref) 66 | res$model$attributes$names <- list() 67 | res 68 | } 69 | 70 | open_url_model <- function(id, url) { 71 | res <- base_model_object("OpenURL", id) 72 | res$model$attributes$url <- url 73 | res 74 | } 75 | -------------------------------------------------------------------------------- /R/fig_title.R: -------------------------------------------------------------------------------- 1 | # to add a title: 2 | # - create a title model 3 | # - add a model reference 4 | # - add a list of title items 5 | 6 | add_title <- function(fig, title, extra_pars = NULL) { 7 | title_id <- gen_id(fig, "title") 8 | titlemod <- title_model(title_id, fig$x$spec$ref, title, extra_pars) 9 | 10 | fig$x$spec$model$plot$attributes$title <- titlemod$ref 11 | fig$x$spec$model$title <- titlemod$model 12 | 13 | fig 14 | } 15 | 16 | title_model <- function(id, plot_ref, ttext, extra_pars) { 17 | res <- base_model_object("Title", id) 18 | res$model$attributes["plot"] <- list(NULL) 19 | res$model$attributes$text <- ttext 20 | 21 | res$model$attributes <- c(res$model$attributes, extra_pars) 22 | 23 | res 24 | } 25 | 26 | title_par_validator_map <- list( 27 | "align" = "align", 28 | "background_fill_alpha" = "num_data_spec", 29 | "background_fill_color" = "color", 30 | "border_line_alpha" = "num_data_spec", 31 | "border_line_cap" = "line_cap", 32 | "border_line_color" = "color", 33 | "border_line_dash" = "line_dash", 34 | "border_line_dash_offset" = "int", 35 | "border_line_dash_join" = "line_join", 36 | "border_line_width" = "num_data_spec", 37 | "offset" = "num_data_spec", 38 | "text_alpha" = "num_data_spec", 39 | "text_color" = "color", 40 | "text_font" = "string", 41 | "text_font_size" = "font_size_string", 42 | "text_font_style" = "font_style" 43 | ) 44 | -------------------------------------------------------------------------------- /R/json_helpers.R: -------------------------------------------------------------------------------- 1 | base_model_object <- function(type, id) { 2 | list( 3 | model = list( 4 | type = type, 5 | id = id, 6 | attributes = list( 7 | id = id, 8 | tags = list() 9 | ) 10 | ), 11 | ref = list( 12 | type = type, 13 | id = id 14 | ) 15 | ) 16 | } 17 | 18 | #' @importFrom digest digest 19 | gen_id <- function(obj, name = NULL) { 20 | digest(c(name, obj$x$spec$time)) 21 | } 22 | 23 | remove_model_names <- function(obj) { 24 | names(obj$toolbar$attributes$tools) <- NULL 25 | names(obj$plot$attributes$renderers) <- NULL 26 | names(obj) <- NULL 27 | obj 28 | } 29 | 30 | underscore2camel <- function(x) { 31 | x <- gsub("^([a-zA-Z])", "\\U\\1", x, perl = TRUE) 32 | gsub("_([a-zA-Z])", "\\U\\1", x, perl = TRUE) 33 | } 34 | 35 | # bokeh2codepen <- function(fig, title = "rbokeh plot", description = "rbokeh plot", private = FALSE, tags = c("bokeh", "rbokeh")) { 36 | 37 | # all_models <- fig$x$spec$model 38 | # elementid <- digest(Sys.time()) 39 | # modelid <- fig$x$spec$model$plot$id 40 | # type <- fig$x$modeltype 41 | 42 | # fig <- rbokeh_prerender(fig) 43 | # fig <- toJSON(fig$x$all_models, pretty = pretty, 44 | # auto_unbox = TRUE, null = "null", na = "null") 45 | 46 | # ver <- get_bokeh_version() 47 | 48 | # data <- list( 49 | # title = title, 50 | # description = description, 51 | # private = private, 52 | # tags = I(tags), 53 | # html = paste0('
'), 54 | # js = paste0('Bokeh.$(function() {\n', 55 | # 'var modelid = "', modelid, '";\n', 56 | # 'var modeltype = "', type,'";\n', 57 | # 'var elementid = "', elementid,'";\n', 58 | # 'Bokeh.logger.info("Realizing plot:");\n', 59 | # 'Bokeh.logger.info(" - modeltype: ', type, '");\n', 60 | # 'Bokeh.logger.info(" - modelid: ', modelid, '");\n', 61 | # 'Bokeh.logger.info(" - elementid: ', elementid, '");\n', 62 | # 'var all_models = ', fig, ';\n', 63 | # 'Bokeh.load_models(all_models);\n', 64 | # 'var model = Bokeh.Collections(modeltype).get(modelid);\n', 65 | # 'var view = new model.default_view({model: model, el: \'#', elementid, '\'});\n', 66 | # 'Bokeh.index[modelid] = view;\n'), 67 | # css_external = paste0("https://cdn.pydata.org/bokeh/release/bokeh-", ver, ".min.css"), 68 | # js_external = paste0("https://cdn.pydata.org/bokeh/release/bokeh-", ver, ".min.js") 69 | # ) 70 | # library(httr) 71 | # a <- POST("https://codepen.io/pen/define/", body = list(data = data), encode = "json") 72 | # } 73 | -------------------------------------------------------------------------------- /R/layer_map.R: -------------------------------------------------------------------------------- 1 | 2 | #' Add a "map" layer to a Bokeh figure 3 | #' 4 | #' Draws lines and polygons as specified by a map database 5 | #' @param fig figure to modify 6 | #' @param database,regions parameters passed to \code{\link[maps]{map}} 7 | #' @template par-coloralpha 8 | #' @template par-lnamegroup 9 | #' @template dots-fillline 10 | #' @family layer functions 11 | #' @import maps 12 | #' @export 13 | ly_map <- function(fig, database = "world", regions = ".", 14 | color = NULL, alpha = 1, lname = NULL, lgroup = NULL, ...) { 15 | 16 | validate_fig(fig, "ly_map") 17 | 18 | args <- sub_names(fig, data = NULL, 19 | grab( 20 | color, 21 | alpha, 22 | lname, 23 | lgroup, 24 | dots = lazy_dots(...), 25 | null_data = TRUE 26 | ) 27 | ) 28 | args$info$x_name <- "longitude" 29 | args$info$y_name <- "latitude" 30 | 31 | dd <- map2df(map(database = database, 32 | regions = regions, fill = TRUE, plot = FALSE)) 33 | 34 | args$params <- resolve_color_alpha(args$params, has_line = TRUE, has_fill = TRUE, 35 | fig$x$spec$layers[[args$info$lgroup]], theme = fig$x$spec$theme) 36 | 37 | do.call(ly_polygons, 38 | c( 39 | list( 40 | fig = fig, 41 | xs = dd$lon, ys = dd$lat, group = dd$group, 42 | lname = args$info$lname, lgroup = args$info$lgroup, 43 | xlab = args$info$x_name, ylab = args$info$y_name 44 | ), 45 | args$params 46 | ) 47 | ) 48 | } 49 | -------------------------------------------------------------------------------- /R/layer_text.R: -------------------------------------------------------------------------------- 1 | 2 | #' Add a "text" layer to a Bokeh figure 3 | #' @param fig figure to modify 4 | #' @param x x coordinates of text anchors 5 | #' @param y y coordinates of text anchors 6 | #' @param text text values to render 7 | #' @param data an optional data frame, providing the source for inputs x, y, text, and other glyph properties 8 | #' @param color text color values for the text 9 | #' @param alpha text alpha values for the text 10 | #' @param angle angle to rotate the text in radians 11 | #' @param align text align values for the text ("left", "right", "center") 12 | #' @param baseline text baseline values for the text ("top", "middle", "bottom", "alphabetic", "hanging") 13 | #' @param font text font values for the text 14 | #' @param font_size text font size values for the text 15 | #' @param font_style text font style values for the text ("normal", "italic", "bold") 16 | #' @param x_offset offset values to apply to the x-coordinates 17 | #' @param y_offset offset values to apply to the y-coordinates 18 | #' @template par-legend 19 | #' @template par-lnamegroup 20 | #' @example man-roxygen/ex-elements.R 21 | #' @family layer functions 22 | #' @export 23 | ly_text <- function( 24 | fig, 25 | x, y = NULL, 26 | text = NULL, data = figure_data(fig), 27 | color = "black", alpha = 1, 28 | angle = 0, align = NULL, baseline = NULL, 29 | font = NULL, font_size = NULL, font_style = NULL, 30 | x_offset = NULL, y_offset = NULL, 31 | legend = NULL, lname = NULL, lgroup = NULL 32 | ) { 33 | 34 | validate_fig(fig, "ly_text") 35 | 36 | args <- sub_names(fig, data, 37 | grab( 38 | x, y, text, 39 | color, 40 | alpha, 41 | angle, 42 | font_size, 43 | x_offset, 44 | y_offset, 45 | legend, 46 | lname, 47 | lgroup, 48 | dots = lazy_dots() 49 | ) 50 | ) 51 | 52 | arg_params <- list(glyph = "text") 53 | 54 | arg_params$glyph <- "text" 55 | arg_params$text_color <- args$params$color 56 | arg_params$angle <- args$params$angle 57 | arg_params$text_alpha <- args$params$alpha 58 | arg_params$text_font_size <- args$params$font_size 59 | arg_params$x_offset <- args$params$x_offset 60 | arg_params$y_offset <- args$params$y_offset 61 | 62 | arg_params$text_font <- font 63 | arg_params$text_font_style <- font_style 64 | arg_params$text_align <- align 65 | arg_params$text_baseline <- baseline 66 | 67 | if (is.null(args$params$text)) { 68 | args$params$text <- seq_along(args$data$x) 69 | } 70 | 71 | axis_type_range <- get_glyph_axis_type_range(args$data$x, args$data$y) 72 | 73 | mc <- lapply(match.call(), deparse) 74 | 75 | make_glyph( 76 | fig, type = "text", 77 | lname = args$info$lname, lgroup = args$info$lgroup, 78 | data = c(args$data, list(text = args$params$text, angle = args$params$angle)), 79 | legend = args$info$legend, 80 | xname = args$info$x_name, yname = args$info$y_name, 81 | args = arg_params, axis_type_range = axis_type_range, 82 | ly_call = mc 83 | ) 84 | } 85 | -------------------------------------------------------------------------------- /R/misc.R: -------------------------------------------------------------------------------- 1 | #' Add a small amount of (rbokeh-compatible) noise to a character vector 2 | #' 3 | #' @param x numeric vector to which jitter should be added 4 | #' @param factor a factor between 0 and 1 that 5 | #' @export 6 | #' @importFrom stats runif 7 | #' @examples 8 | #' figure(data = lattice::singer) %>% 9 | #' ly_points(catjitter(voice.part), jitter(height), color = "black") %>% 10 | #' ly_boxplot(voice.part, height, with_outliers = FALSE) 11 | catjitter <- function(x, factor = 0.5) { 12 | # validate factor and x 13 | paste0(x, ":", stats::runif(min = 0.5 * (1 - factor), 14 | max = 0.5 + 0.5 * factor, length(x))) 15 | } 16 | 17 | #' Get object ids and types from a figure 18 | #' 19 | #' @param fig a figure object 20 | #' @export 21 | get_object_refs <- function(fig) { 22 | tmp <- lapply(fig$x$spec$model, function(x) { 23 | data.frame(id = x$id, type = x$type, stringsAsFactors = FALSE) 24 | }) 25 | res <- do.call(rbind, unname(tmp)) 26 | res$name <- names(tmp) 27 | res 28 | } 29 | -------------------------------------------------------------------------------- /R/output_html.R: -------------------------------------------------------------------------------- 1 | #' Get the HTML content required to embed a Bokeh figure 2 | #' @param fig figure 3 | #' @param file html file name to write the figure to 4 | #' @param pretty should the json model be pretty printed to the html file? 5 | #' @param secure should https be used for cdn links? 6 | #' @examples 7 | #' p <- figure() %>% ly_points(1:10) 8 | #' rbokeh2html(p) 9 | #' @export 10 | rbokeh2html <- function(fig, file = tempfile(fileext = ".html"), pretty = FALSE, 11 | secure = TRUE) { 12 | 13 | if (is.null(fig$width)) 14 | fig$width <- 500 15 | if (is.null(fig$height)) 16 | fig$height <- 500 17 | 18 | width <- fig$width 19 | height <- fig$height 20 | 21 | fig <- rbokeh_prerender(fig) 22 | modelid <- fig$x$modelid 23 | elementid <- fig$x$elementid 24 | docid <- fig$x$docid 25 | 26 | fig <- jsonlite::toJSON(fig$x$docs_json, pretty = pretty, 27 | dataframe = "columns", null = "null", na = "null", auto_unbox = TRUE, 28 | digits = getOption("shiny.json.digits", 16), use_signif = TRUE, 29 | force = TRUE, POSIXt = "ISO8601", UTC = TRUE, rownames = FALSE, 30 | keep_vec_names = TRUE) 31 | 32 | ver <- get_bokeh_version() 33 | 34 | sc <- ifelse(secure, "s", "") 35 | 36 | a <- paste0(" 37 | 38 | 39 | 40 | 41 | 42 | 43 |
45 |
46 |
47 | 80 | 81 | ") 82 | 83 | cat(a, file = file) 84 | message("html file written to: ", file) 85 | 86 | return(invisible(file)) 87 | } 88 | -------------------------------------------------------------------------------- /R/output_json.R: -------------------------------------------------------------------------------- 1 | #' Print the JSON of a Bokeh figure 2 | #' @param fig figure to print 3 | #' @param prepare logical - should the figure be sent through preparations that need to be done prior to plotting (TRUE), or printed as-is (FALSE) 4 | #' @param pretty parameter passed on to \code{\link[jsonlite]{toJSON}} 5 | #' @param file parameter passed on to \code{\link[base]{cat}} 6 | #' @param pbcopy logical - if on OSX, should the results be passed to the clipboard (TRUE) instead of printed to the screen (FALSE)? 7 | #' @examples 8 | #' \dontrun{ 9 | #' p <- figure() %>% ly_points(1:10) %>% 10 | #' tool_pan(dimensions = "height") 11 | #' print_model_json(p) 12 | #' } 13 | #' @importFrom jsonlite toJSON 14 | #' @export 15 | print_model_json <- function(fig, prepare = TRUE, pretty = TRUE, file = "", pbcopy = FALSE) { 16 | if (prepare) { 17 | fig <- rbokeh_prerender(fig) 18 | } 19 | 20 | if (pbcopy) 21 | file <- pipe("pbcopy") 22 | cat(jsonlite::toJSON(fig$x$docs_json, pretty = pretty, 23 | auto_unbox = TRUE, null = "null", na = "null"), "\n", file = file) 24 | } 25 | -------------------------------------------------------------------------------- /R/output_prerender.R: -------------------------------------------------------------------------------- 1 | rbokeh_prerender <- function(fig) { 2 | 3 | fig$x$debug <- getOption("rbokeh_debug", FALSE) 4 | 5 | if (fig$x$modeltype %in% c("Plot", "GMapPlot")) { 6 | if (length(fig$x$spec$layers) == 0 && fig$x$spec$model$plot$type != "GMapPlot") { 7 | message("This figure is empty...") 8 | return(NULL) 9 | } else { 10 | fig <- prepare_figure(fig) 11 | } 12 | } else if (fig$x$modeltype == "GridPlot") { 13 | fig <- prepare_gridplot(fig) 14 | } else { 15 | stop("Unsupported model type: ", fig$x$modeltype) 16 | } 17 | 18 | # sapply(fig$x$spec$model, function(x) { 19 | # # x$type 20 | # x$id 21 | # }) 22 | 23 | fig$x$docs_json[[1]]$roots$references <- fig$x$spec$model 24 | fig$x$docs_json[[1]]$roots$references <- remove_model_names(fig$x$docs_json[[1]]$roots$references) 25 | fig$x$spec <- NULL 26 | fig$preRenderHook <- NULL # nolint 27 | 28 | # attr(fig$x, "TOJSON_ARGS") <- list(auto_unbox = FALSE) 29 | 30 | ## we need to preserve "NaN" (which is NA in R) for bokeh to render properly 31 | # attr(fig$x, "TOJSON_ARGS") <- list(na = "string") 32 | ## actually this causes problems with categorical and date data 33 | ## so we'll handle it in the js prior to rendering 34 | 35 | fig 36 | } 37 | -------------------------------------------------------------------------------- /R/output_save.R: -------------------------------------------------------------------------------- 1 | #' Make a static png file for an htmlwidget 2 | #' 3 | #' @param p htmlwidget object 4 | #' @param file where to save png file 5 | #' @param timeout plot render timeout in milliseconds (see details) 6 | #' @details This uses phantomjs (\url{https://phantomjs.org}) to render your htmlwidget in a headless browser and take a screenshot of it, creating a static output. This assumes that phantomjs has been installed on your machine and is available as a system call. For plots that take longer to load and render, you may need to increase the value of \code{timeout}. Note that this function is experimental. 7 | #' @examples 8 | #' \dontrun{ 9 | #' path <- tempfile(fileext = ".png") 10 | #' figure(tools = NULL) %>% 11 | #' ly_points(1:10) %>% 12 | #' widget2png(path) 13 | #' } 14 | #' @export 15 | widget2png <- function(p, file, timeout = 500) { 16 | phantom <- find_phantom() 17 | file <- path.expand(file) 18 | 19 | if (phantom == "") { 20 | message( 21 | "** phantomjs dependency could not be found - static plot cannot be generated ", 22 | "(run phantom_install() for details)") 23 | } else { 24 | res <- try({ 25 | ff <- tempfile(fileext = ".html") 26 | ffjs <- tempfile(fileext = ".js") 27 | 28 | if (inherits(p, "rbokeh")) { 29 | # don't want any padding 30 | p$sizingPolicy$padding <- 0 # nolint 31 | suppressMessages(rbokeh2html(p, file = ff)) 32 | } else if (inherits(p, "htmlwidget")) { 33 | suppressMessages(htmlwidgets::saveWidget(p, file = ff)) 34 | } 35 | 36 | js <- paste0("var page = require('webpage').create(); 37 | page.open('file://", ff, "', function() { 38 | // $('html').style.zoom = 2; 39 | window.setTimeout(function () { 40 | page.render('", file, "'); 41 | phantom.exit(); 42 | }, ", timeout, "); 43 | });") 44 | cat(js, file = ffjs) 45 | system2(phantom, ffjs, stdout = TRUE, stderr = TRUE) 46 | }) 47 | if (inherits(res, "try-error")) 48 | message("** could not create static plot...") 49 | 50 | # system(paste("open ", ffjs)) 51 | # system(paste("open ", dirname(ffjs))) 52 | } 53 | invisible(res) 54 | } 55 | 56 | #' Instructions for installing phantomjs 57 | #' @export 58 | phantom_install <- function() { 59 | message( 60 | "Please visit this page to install phantomjs on your system: ", 61 | "https://phantomjs.org/download.html") 62 | } 63 | 64 | # similar to webshot 65 | find_phantom <- function() { 66 | phantom <- Sys.which("phantomjs") 67 | if (Sys.which("phantomjs") == "") { 68 | if (identical(.Platform$OS.type, "windows")) { 69 | phantom <- Sys.which(file.path(Sys.getenv("APPDATA"), "npm", "phantomjs.cmd")) 70 | } 71 | } 72 | phantom 73 | } 74 | -------------------------------------------------------------------------------- /R/point_types.R: -------------------------------------------------------------------------------- 1 | 2 | #' Display glyph types available for ly_points() 3 | #' @param size size of the glyph 4 | #' @param color color to use for line and fill properties 5 | #' @param width,height dimensions of output plot 6 | #' @examples 7 | #' point_types() 8 | #' @export 9 | point_types <- function(size = 25, color = "blue", width = 800, height = 450) { 10 | 11 | types <- c(as.list(marker_pch_types), as.list(marker_names)) 12 | 13 | f <- figure(ylim = as.character(5:1), width = width, height = height, xlab = NULL, ylab = NULL) 14 | grid <- expand.grid(1:8, 1:5) 15 | for (ii in seq_along(types)) { 16 | cur_grid <- as.character(grid[ii, ]) 17 | f <- f %>% 18 | ly_points(cur_grid[1], cur_grid[2], 19 | glyph = types[[ii]], color = color, size = size) 20 | } 21 | 22 | f %>% 23 | ly_text(as.character(grid[, 1]), 24 | paste(as.character(grid[, 2]), ":0.1", sep = ""), 25 | unlist(types), font_size = "12px", 26 | align = "center", baseline = "bottom") 27 | } 28 | -------------------------------------------------------------------------------- /R/rbokeh-package.R: -------------------------------------------------------------------------------- 1 | #' @importFrom stats aggregate complete.cases is.ts ppoints quantile qunif runif time 2 | #' @importFrom grDevices rgb2hsv hsv boxplot.stats col2rgb contourLines hsv rgb2hsv 3 | #' @importFrom pryr named_dots 4 | #' @importFrom utils head tail 5 | NULL 6 | 7 | #' rbokeh: R interface for Bokeh 8 | #' 9 | #' R interface for creating plots in Bokeh. Bokeh by Continuum Analytics, \url{https://docs.bokeh.org/en/latest/} 10 | #' 11 | #' For full documentation on the package, visit \url{https://hafen.github.io/rbokeh/} 12 | #' @name rbokeh-package 13 | #' @aliases rbokeh 14 | #' @docType package 15 | NULL 16 | 17 | #' "Periodic Table" dataset 18 | #' 19 | #' @name elements 20 | #' @docType data 21 | #' @description 22 | #' Data for periodic table of the elements 23 | #' @usage elements 24 | #' @keywords data 25 | #' @example man-roxygen/ex-elements.R 26 | NULL 27 | 28 | #' Flight frequency dataset 29 | #' 30 | #' @name flightfreq 31 | #' @docType data 32 | #' @description 33 | #' Daily counts of domestic flights in the U.S. from 1999 to mid-2008 34 | #' @usage flightfreq 35 | #' @keywords data 36 | #' @example man-roxygen/ex-flightfreq.R 37 | NULL 38 | 39 | #' Hexagon binned counts of NYC taxi pickup locations 40 | #' 41 | #' @name nyctaxihex 42 | #' @docType data 43 | #' @description 44 | #' Counts of NYC taxi pickups by location for January 2013, obtained from \href{https://chriswhong.com/open-data/foil_nyc_taxi/}{here}. 45 | #' @usage nyctaxihex 46 | #' @keywords data 47 | #' @examples 48 | #' \dontrun{ 49 | #' gmap(title = "NYC taxi pickups January 2013", 50 | #' lat = 40.74, lng = -73.95, zoom = 11, 51 | #' map_type = "roadmap", width = 1000, height = 800) %>% 52 | #' ly_hexbin(nyctaxihex, alpha = 0.5, 53 | #' palette = "Spectral10", trans = log, inv = exp) 54 | #' } 55 | NULL 56 | 57 | #' Pipe figures 58 | #' 59 | #' @importFrom magrittr %>% 60 | #' @name %>% 61 | #' @rdname pipe 62 | #' @export 63 | #' @param lhs a Bokeh figure 64 | #' @param rhs a layer to add to the figure 65 | NULL 66 | -------------------------------------------------------------------------------- /R/shiny.R: -------------------------------------------------------------------------------- 1 | # nolint start 2 | #' Widget output function for use in Shiny 3 | #' @param outputId output variable to read from 4 | #' @param width a valid CSS unit for the width or a number, which will be coerced to a string and have "px" appended. 5 | #' @param height a valid CSS unit for the height or a number, which will be coerced to a string and have "px" appended. 6 | #' 7 | #' @example man-roxygen/ex-shiny.R 8 | #' 9 | #' @export 10 | rbokehOutput <- function(outputId, width = "100%", height = "400px") { 11 | htmlwidgets::shinyWidgetOutput(outputId, "rbokeh", width, height, package = "rbokeh") 12 | } 13 | 14 | #' Widget render function for use in Shiny 15 | #' @param expr an expression that generates a rbokeh figure 16 | #' @param env the environment in which to evaluate expr. 17 | #' @param quoted is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable. 18 | #' 19 | #' @seealso \code{\link{rbokehOutput}} for an example in Shiny 20 | #' 21 | #' @export 22 | renderRbokeh <- function(expr, env = parent.frame(), quoted = FALSE) { 23 | if (!quoted) expr <- substitute(expr) 24 | htmlwidgets::shinyRenderWidget(expr, rbokehOutput, env, quoted = TRUE) 25 | } 26 | # nolint end 27 | -------------------------------------------------------------------------------- /R/theme_title.R: -------------------------------------------------------------------------------- 1 | #' Override theme parameters for general plot attributes 2 | #' 3 | #' @param fig figure to modify 4 | #' @param background_fill_color (color) background color of plot 5 | #' @param background_fill_alpha (numeric) background color alpha of plot 6 | #' @param border_fill_color (color) fill color of border area of plot 7 | #' @param border_fill_alpha (numeric) fill color alpha of border area of plot 8 | #' @param align ('left', 'right', 'center') The text align for the plot title. 9 | #' @param text_alpha The text alpha for the plot title. 10 | #' @param text_baseline ('top', 'middle', 'bottom', 'alphabetic', 'hanging') The text baseline for the plot title. 11 | #' @param text_color (color) The text color for the plot title. 12 | #' @param text_font (string) The text font for the plot title. 13 | #' @param text_font_size (string - e.g. '12pt') The text font size for the plot title. 14 | #' @param text_font_style ('normal', 'italic', 'bold') The text font style for the plot title. 15 | #' @param pars optionally specify a named list of all parameters - useful when dealing with theme lists 16 | #' @examples 17 | #' figure(title = "asdf") %>% 18 | #' ly_points(1:10) %>% 19 | #' theme_title(text_color = "red") 20 | #' @export 21 | theme_title <- function(fig, 22 | pars = NULL, 23 | background_fill_color = "white", 24 | background_fill_alpha = 1, 25 | border_fill_color = "white", 26 | border_fill_alpha = 1, 27 | align = "left", 28 | text_alpha = 1, 29 | text_baseline = "bottom", 30 | text_color = "#444444", 31 | text_font = "Helvetica", 32 | text_font_size = "12pt", 33 | text_font_style = "normal" 34 | ) { 35 | 36 | # this will provide a list of all user-specified arguments 37 | # (can ignore the defaults for the ones they don't specify 38 | # because they are defaults if not specified in bokeh) 39 | if (is.null(pars)) { 40 | specified <- names(as.list(match.call())[-1]) 41 | pars <- as.list(environment())[specified] 42 | } 43 | pars <- pars[names(pars) %in% names(title_par_validator_map)] 44 | 45 | pars <- handle_extra_pars(pars, title_par_validator_map) 46 | parnames <- names(pars) 47 | 48 | if (!is.null(fig$x$modeltype) && fig$x$modeltype == "GridPlot") { 49 | for (ii in seq_along(fig$x$spec$figs)) { 50 | if (!is.null(fig$x$spec$figs[[ii]]$x$spec$model$title)) 51 | for (nm in parnames) 52 | fig$x$spec$figs[[ii]]$x$spec$model$title$attributes[[nm]] <- pars[[nm]] 53 | } 54 | } else { 55 | if (!is.null(fig$x$spec$model$title)) { 56 | for (nm in parnames) 57 | fig$x$spec$model$title$attributes[[nm]] <- pars[[nm]] 58 | } else { 59 | message("Note: there isn't a title to appy a theme to...") 60 | } 61 | } 62 | 63 | fig 64 | } 65 | 66 | title_par_validator_map <- list( 67 | "background_fill_color" = "color", 68 | "background_fill_alpha" = "num_data_spec", 69 | "border_fill_color" = "color", 70 | "border_fill_alpha" = "alpha", 71 | "text_color" = "color", 72 | "text_alpha" = "num_data_spec", 73 | "align" = "align", 74 | "text_baseline" = "text_baseline", 75 | "text_font_style" = "font_style", 76 | "text_font" = "string", 77 | "text_font_size" = "font_size_string" 78 | ) 79 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onLoad <- function(libname, pkgname){ 2 | options(bokeh_theme = bk_default_theme()) 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![R-CMD-check](https://github.com/hafen/rbokeh/workflows/R-CMD-check/badge.svg)](https://github.com/hafen/rbokeh/actions) 2 | 3 | [![codecov.io](https://codecov.io/github/hafen/rbokeh/coverage.svg?branch=master)](https://codecov.io/github/hafen/rbokeh?branch=master) 4 | [![CRAN](https://www.r-pkg.org/badges/version/rbokeh)](https://cran.r-project.org/package=rbokeh) 5 | [![](https://cranlogs.r-pkg.org/badges/rbokeh)](https://cran.r-project.org/package=rbokeh) 6 | # rbokeh 7 | 8 | A native R plotting library that provides a flexible declarative interface for creating interactive web-based graphics, backed by the Bokeh visualization library. 9 | 10 | ### Install 11 | 12 | ```r 13 | # from CRAN: 14 | install.packages("rbokeh") 15 | 16 | # from github: 17 | remotes::install_github("bokeh/rbokeh") 18 | ``` 19 | 20 | ### Use 21 | 22 | Please see [here](https://hafen.github.io/rbokeh/articles/rbokeh.html). 23 | -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | navbar: 2 | structure: 3 | left: [home, intro, reference, news] 4 | right: [github] 5 | components: 6 | articles: ~ 7 | 8 | destination: docs 9 | 10 | reference: 11 | - title: "rbokeh" 12 | contents: 13 | - rbokeh-package 14 | - title: "Plots" 15 | contents: 16 | - figure 17 | - gmap 18 | - grid_plot 19 | - title: "Layer Functions" 20 | contents: 21 | - ly_annular_wedge 22 | - ly_annulus 23 | - ly_arc 24 | - ly_bezier 25 | - ly_crect 26 | - ly_image 27 | - ly_image_url 28 | - ly_lines 29 | - ly_multi_line 30 | - ly_oval 31 | - ly_patch 32 | - ly_points 33 | - ly_polygons 34 | - ly_quadratic 35 | - ly_ray 36 | - ly_rect 37 | - ly_segments 38 | - ly_text 39 | - ly_wedge 40 | - title: "Higher-Level Layer Functions" 41 | contents: 42 | - ly_quantile 43 | - ly_density 44 | - ly_hist 45 | - ly_hexbin 46 | - ly_boxplot 47 | - ly_abline 48 | - ly_contour 49 | - ly_curve 50 | - ly_map 51 | - ly_bar 52 | - title: "Higher-Level Layer Functions" 53 | contents: 54 | - x_axis 55 | - x_range 56 | - y_axis 57 | - y_range 58 | - title: "Themes" 59 | contents: 60 | - set_theme 61 | - theme_axis 62 | - theme_grid 63 | - theme_legend 64 | - theme_plot 65 | - theme_title 66 | - set_palette 67 | - bk_default_theme 68 | - pal_color 69 | # - 70 | # file: themes.Rd 71 | # title: "themes" 72 | # - 73 | # file: palettes.Rd 74 | # title: "palettes" 75 | - title: "Interaction Tools" 76 | contents: 77 | - tool_hover 78 | - tool_selection 79 | - tool_tap 80 | - tool_box_select 81 | - tool_box_zoom 82 | - tool_crosshair 83 | - tool_lasso_select 84 | - tool_pan 85 | - tool_reset 86 | - tool_resize 87 | - tool_save 88 | - tool_wheel_zoom 89 | - title: "Callback Interactivity" 90 | contents: 91 | - console_callback 92 | - custom_callback 93 | - debug_callback 94 | - shiny_callback 95 | - title: "Output" 96 | contents: 97 | - print_model_json 98 | - bokeh_render_json 99 | - rbokehOutput 100 | - renderRbokeh 101 | - widget2gist 102 | - widget2png 103 | - rbokeh2html 104 | - title: "Misc" 105 | contents: 106 | - flightfreq 107 | - elements 108 | - nyctaxihex 109 | - catjitter 110 | - get_object_refs 111 | - phantom_install 112 | - "%>%" 113 | - point_types 114 | - gmap_style 115 | - figure_data 116 | - sub_names 117 | - data_name_list 118 | - b_eval 119 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | ## Submission comments 2 | 3 | Fixed issue that resulted in package being removed from CRAN: 4 | 5 | > This creates and leaves behind a file test.png in /tmp during R CMD check --as-cran, in the \donttest part of the widget2png example (which is run by example()). 6 | > 7 | > This is a serious violation of the CRAN policy. 8 | 9 | ## Test environments 10 | 11 | * local OS X install, R 4.1.0 12 | * win-builder: oldrelease, release, devel 13 | * GitHub Actions - (ubuntu-20.04): release, devel 14 | * GitHub Actions (windows): release 15 | * Github Actions (macOS): release 16 | 17 | ## R CMD check results 18 | 19 | 0 errors | 0 warnings | 0 notes 20 | -------------------------------------------------------------------------------- /data/elements.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/data/elements.rda -------------------------------------------------------------------------------- /data/flightFreq.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/data/flightFreq.rda -------------------------------------------------------------------------------- /data/nyctaxihex.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/data/nyctaxihex.rda -------------------------------------------------------------------------------- /docs/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/label.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/resultset_next.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/resultset_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/icons-classic/resultset_previous.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/actions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/actions.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ajax-loader-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ajax-loader-small.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_redo.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_right_peppermint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_right_peppermint.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_right_spearmint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_right_spearmint.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/arrow_undo.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_blue.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_star.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_toggle_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_toggle_minus.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_toggle_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/bullet_toggle_plus.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/calendar.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/collapse.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/comment_yellow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/comment_yellow.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/down.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/drag-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/drag-handle.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/editor-helper-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/editor-helper-bg.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/expand.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-bg.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-columns-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-columns-bg.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-columns-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/header-columns-over-bg.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/help.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/info.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/listview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/listview.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/pencil.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/pencil.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/row-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/row-over-bg.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-asc.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-asc.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-desc.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/sort-desc.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/stripes.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/tag_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/tag_red.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/tick.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/user_identity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/user_identity.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/images/user_identity_plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/images/user_identity_plus.gif -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/loader.css: -------------------------------------------------------------------------------- 1 | .bk-loader { 2 | margin: auto; 3 | font-size: 10px; 4 | position: relative; 5 | text-indent: -9999em; 6 | border-top: 8px solid rgba(102,102,102, 0.2); 7 | border-right: 8px solid rgba(102,102,102, 0.2); 8 | border-bottom: 8px solid rgba(102,102,102, 0.2); 9 | border-left: 8px solid #666666; 10 | -webkit-transform: translateZ(0); 11 | -ms-transform: translateZ(0); 12 | transform: translateZ(0); 13 | -webkit-animation: bk-load8 1.1s infinite linear; 14 | animation: bk-load8 1.1s infinite linear; 15 | -webkit-transition: opacity 0.7s step-end; 16 | transition: opacity 0.7s step-end; 17 | position: absolute; 18 | } 19 | .bk-loader, 20 | .bk-loader:after { 21 | border-radius: 50%; 22 | width: 70px; 23 | height: 70px; 24 | } 25 | @-webkit-keyframes bk-load8 { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(360deg); 32 | transform: rotate(360deg); 33 | } 34 | } 35 | @keyframes bk-load8 { 36 | 0% { 37 | -webkit-transform: rotate(0deg); 38 | transform: rotate(0deg); 39 | } 40 | 100% { 41 | -webkit-transform: rotate(360deg); 42 | transform: rotate(360deg); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/notused/bokeh-tables.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/notused/bokeh-tables.min.css -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/prev/cdn.txt: -------------------------------------------------------------------------------- 1 | ver="1.4.0" 2 | wget http://cdn.pydata.org/bokeh/release/bokeh-$ver.min.css 3 | wget http://cdn.pydata.org/bokeh/release/bokeh-$ver.min.js 4 | wget http://cdn.pydata.org/bokeh/release/bokeh-gl-$ver.min.js 5 | wget http://cdn.pydata.org/bokeh/release/bokeh-tables-$ver.min.css 6 | wget http://cdn.pydata.org/bokeh/release/bokeh-tables-$ver.min.js 7 | wget http://cdn.pydata.org/bokeh/release/bokeh-widgets-$ver.min.css 8 | wget http://cdn.pydata.org/bokeh/release/bokeh-widgets-$ver.min.js 9 | # http://cdn.pydata.org/bokeh/release/bokeh-api-$ver.min.js 10 | 11 | 12 | mv bokeh-$ver.min.css bokeh.min.css 13 | mv bokeh-$ver.min.js bokeh.min.js 14 | mv bokeh-gl-$ver.min.js bokeh-gl.min.js 15 | mv bokeh-tables-$ver.min.css bokeh-tables.min.css 16 | mv bokeh-tables-$ver.min.js bokeh-tables.min.js 17 | mv bokeh-widgets-$ver.min.css bokeh-widgets.min.css 18 | mv bokeh-widgets-$ver.min.js bokeh-widgets.min.js 19 | 20 | 21 | http://cdn.pydata.org/bokeh/release/bokeh-x.y.z.min.js 22 | 23 | # wget http://cdn.pydata.org/bokeh/release/bokeh-$ver.min.css 24 | # mv bokeh-$ver.min.css bokeh.min.css 25 | # wget http://cdn.pydata.org/bokeh/release/bokeh-$ver.min.js 26 | # mv bokeh-$ver.min.js bokeh.min.js 27 | # wget http://cdn.pydata.org/bokeh/release/bokeh-widgets-$ver.min.css 28 | # mv bokeh-widgets-$ver.min.css bokeh-widgets.min.css 29 | # wget http://cdn.pydata.org/bokeh/release/bokeh-widgets-$ver.min.js 30 | # mv bokeh-widgets-$ver.min.js bokeh-widgets.min.js 31 | # wget http://cdn.pydata.org/bokeh/release/bokeh-compiler-$ver.min.js 32 | # mv bokeh-compiler-$ver.min.js bokeh-compiler.min.js 33 | -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/prev/v0.12.1/loader.css: -------------------------------------------------------------------------------- 1 | .bk-loader { 2 | margin: auto; 3 | font-size: 10px; 4 | position: relative; 5 | text-indent: -9999em; 6 | border-top: 8px solid rgba(102,102,102, 0.2); 7 | border-right: 8px solid rgba(102,102,102, 0.2); 8 | border-bottom: 8px solid rgba(102,102,102, 0.2); 9 | border-left: 8px solid #666666; 10 | -webkit-transform: translateZ(0); 11 | -ms-transform: translateZ(0); 12 | transform: translateZ(0); 13 | -webkit-animation: bk-load8 1.1s infinite linear; 14 | animation: bk-load8 1.1s infinite linear; 15 | -webkit-transition: opacity 0.7s step-end; 16 | transition: opacity 0.7s step-end; 17 | position: absolute; 18 | } 19 | .bk-loader, 20 | .bk-loader:after { 21 | border-radius: 50%; 22 | width: 70px; 23 | height: 70px; 24 | } 25 | @-webkit-keyframes bk-load8 { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(360deg); 32 | transform: rotate(360deg); 33 | } 34 | } 35 | @keyframes bk-load8 { 36 | 0% { 37 | -webkit-transform: rotate(0deg); 38 | transform: rotate(0deg); 39 | } 40 | 100% { 41 | -webkit-transform: rotate(360deg); 42 | transform: rotate(360deg); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/prev/v1.3.4/bokeh-widgets.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/prev/v1.3.4/bokeh-widgets.min.css -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/bokehjs-0.12.5/prev/v1.3.4/bokeh.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/articles/rbokeh_files/bokehjs-0.12.5/prev/v1.3.4/bokeh.min.css -------------------------------------------------------------------------------- /docs/articles/rbokeh_files/rbokeh-binding-0.5.1/rbokeh.js: -------------------------------------------------------------------------------- 1 | HTMLWidgets.widget({ 2 | name: 'rbokeh', 3 | 4 | type: 'output', 5 | 6 | initialize: function(el, width, height) { 7 | return { 8 | modelid: '', 9 | elementid: '', 10 | width: width, 11 | height: height 12 | }; 13 | }, 14 | 15 | renderValue: function(el, x, instance) { 16 | 17 | //clear el for Shiny/dynamic contexts 18 | el.innerHTML = ''; 19 | 20 | if(x.isJSON === true) { 21 | x.docs_json = JSON.parse(x.docs_json); 22 | } 23 | 24 | var refkey = Object.keys(x.docs_json)[0]; 25 | var refs = x.docs_json[refkey].roots.references; 26 | 27 | instance.modelid = x.modelid; 28 | instance.elementid = x.elementid; 29 | 30 | if(x.debug === true) { 31 | console.log(refs); 32 | console.log(JSON.stringify(refs)); 33 | } 34 | 35 | // change 'nulls' in data to NaN 36 | function traverseObject(obj) { 37 | for(var key in obj) { 38 | if(obj[key].constructor === Object) { 39 | traverseObject(obj[key]); 40 | } else if(obj[key].constructor === Array) { 41 | for (var i = 0; i < obj[key].length; i++) { 42 | if(obj[key][i] === null) 43 | obj[key][i] = NaN; 44 | } 45 | } 46 | } 47 | } 48 | for(var i = 0; i < refs.length; i++) { 49 | if(refs[i].type === 'ColumnDataSource') 50 | traverseObject(refs[i].attributes.data); 51 | } 52 | 53 | var dv1 = document.createElement('div'); 54 | dv1.setAttribute('class', 'bk-root'); 55 | var spinner = document.createElement('div'); 56 | spinner.setAttribute('class', 'bk-loader'); 57 | spinner.style.opacity = 0; 58 | spinner.style.left = (instance.width / 2 - 35) + 'px'; 59 | spinner.style.top = (instance.height / 2 - 35) + 'px'; 60 | 61 | var dv = document.createElement('div'); 62 | dv.id = x.elementid; 63 | dv.setAttribute('class', 'plotdiv'); 64 | dv1.appendChild(dv); 65 | dv1.appendChild(spinner); 66 | el.appendChild(dv1); 67 | 68 | window.getComputedStyle(spinner).opacity; 69 | spinner.style.opacity = 1; 70 | 71 | var render_items = [{ 72 | 'docid': x.docid, 73 | 'elementid': x.elementid, 74 | 'modelid': x.modelid 75 | }]; 76 | 77 | if(x.debug !== true) { 78 | Bokeh.set_log_level('info'); 79 | } 80 | 81 | Bokeh.embed.embed_items(x.docs_json, render_items); 82 | 83 | var timer = function() { 84 | if (dv1.childNodes[0].childNodes.length > 0) { 85 | dv1.removeChild(spinner); 86 | } else { 87 | window.setTimeout(timer, 200); 88 | } 89 | }; 90 | timer(); 91 | 92 | }, 93 | 94 | resize: function(el, width, height, instance) { 95 | } 96 | }); 97 | 98 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /docs/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/favicon-16x16.png -------------------------------------------------------------------------------- /docs/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/favicon-32x32.png -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/favicon.ico -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/logo.png -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.2.3.2 2 | pkgdown: 1.5.1 3 | pkgdown_sha: ~ 4 | articles: 5 | rbokeh-pkg: rbokeh-pkg.html 6 | rbokeh: rbokeh.html 7 | last_built: 2020-05-26T18:41Z 8 | 9 | -------------------------------------------------------------------------------- /docs/reference/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/docs/reference/figures/logo.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/icons-classic/label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/icons-classic/label.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/icons-classic/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/icons-classic/resultset_next.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/icons-classic/resultset_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/icons-classic/resultset_previous.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/actions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/actions.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ajax-loader-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ajax-loader-small.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/arrow_redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/arrow_redo.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/arrow_right_peppermint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/arrow_right_peppermint.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/arrow_right_spearmint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/arrow_right_spearmint.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/arrow_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/arrow_undo.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/bullet_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/bullet_blue.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/bullet_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/bullet_star.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/bullet_toggle_minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/bullet_toggle_minus.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/bullet_toggle_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/bullet_toggle_plus.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/calendar.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/collapse.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/comment_yellow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/comment_yellow.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/down.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/drag-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/drag-handle.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/editor-helper-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/editor-helper-bg.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/expand.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/header-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/header-bg.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/header-columns-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/header-columns-bg.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/header-columns-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/header-columns-over-bg.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/help.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/info.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/info.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/listview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/listview.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/pencil.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/pencil.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/row-over-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/row-over-bg.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/sort-asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/sort-asc.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/sort-asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/sort-asc.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/sort-desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/sort-desc.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/sort-desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/sort-desc.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/stripes.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/tag_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/tag_red.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/tick.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/user_identity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/user_identity.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/images/user_identity_plus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/inst/htmlwidgets/lib/bokehjs/images/user_identity_plus.gif -------------------------------------------------------------------------------- /inst/htmlwidgets/lib/bokehjs/loader.css: -------------------------------------------------------------------------------- 1 | .bk-loader { 2 | margin: auto; 3 | font-size: 10px; 4 | position: relative; 5 | text-indent: -9999em; 6 | border-top: 8px solid rgba(102,102,102, 0.2); 7 | border-right: 8px solid rgba(102,102,102, 0.2); 8 | border-bottom: 8px solid rgba(102,102,102, 0.2); 9 | border-left: 8px solid #666666; 10 | -webkit-transform: translateZ(0); 11 | -ms-transform: translateZ(0); 12 | transform: translateZ(0); 13 | -webkit-animation: bk-load8 1.1s infinite linear; 14 | animation: bk-load8 1.1s infinite linear; 15 | -webkit-transition: opacity 0.7s step-end; 16 | transition: opacity 0.7s step-end; 17 | position: absolute; 18 | } 19 | .bk-loader, 20 | .bk-loader:after { 21 | border-radius: 50%; 22 | width: 70px; 23 | height: 70px; 24 | } 25 | @-webkit-keyframes bk-load8 { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(360deg); 32 | transform: rotate(360deg); 33 | } 34 | } 35 | @keyframes bk-load8 { 36 | 0% { 37 | -webkit-transform: rotate(0deg); 38 | transform: rotate(0deg); 39 | } 40 | 100% { 41 | -webkit-transform: rotate(360deg); 42 | transform: rotate(360deg); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /inst/htmlwidgets/rbokeh.js: -------------------------------------------------------------------------------- 1 | HTMLWidgets.widget({ 2 | name: 'rbokeh', 3 | 4 | type: 'output', 5 | 6 | initialize: function(el, width, height) { 7 | return { 8 | modelid: '', 9 | elementid: '', 10 | width: width, 11 | height: height 12 | }; 13 | }, 14 | 15 | renderValue: function(el, x, instance) { 16 | 17 | //clear el for Shiny/dynamic contexts 18 | el.innerHTML = ''; 19 | 20 | if(x.isJSON === true) { 21 | x.docs_json = JSON.parse(x.docs_json); 22 | } 23 | 24 | var refkey = Object.keys(x.docs_json)[0]; 25 | var refs = x.docs_json[refkey].roots.references; 26 | 27 | instance.modelid = x.modelid; 28 | instance.elementid = x.elementid; 29 | 30 | if(x.debug === true) { 31 | console.log(refs); 32 | console.log(JSON.stringify(refs)); 33 | } 34 | 35 | // change 'nulls' in data to NaN 36 | function traverseObject(obj) { 37 | for(var key in obj) { 38 | if(obj[key].constructor === Object) { 39 | traverseObject(obj[key]); 40 | } else if(obj[key].constructor === Array) { 41 | for (var i = 0; i < obj[key].length; i++) { 42 | if(obj[key][i] === null) 43 | obj[key][i] = NaN; 44 | } 45 | } 46 | } 47 | } 48 | for(var i = 0; i < refs.length; i++) { 49 | if(refs[i].type === 'ColumnDataSource') 50 | traverseObject(refs[i].attributes.data); 51 | } 52 | 53 | var dv1 = document.createElement('div'); 54 | dv1.setAttribute('class', 'bk-root'); 55 | var spinner = document.createElement('div'); 56 | spinner.setAttribute('class', 'bk-loader'); 57 | spinner.style.opacity = 0; 58 | spinner.style.left = (instance.width / 2 - 35) + 'px'; 59 | spinner.style.top = (instance.height / 2 - 35) + 'px'; 60 | 61 | var dv = document.createElement('div'); 62 | dv.id = x.elementid; 63 | dv.setAttribute('class', 'plotdiv'); 64 | dv1.appendChild(dv); 65 | dv1.appendChild(spinner); 66 | el.appendChild(dv1); 67 | 68 | window.getComputedStyle(spinner).opacity; 69 | spinner.style.opacity = 1; 70 | 71 | var render_items = [{ 72 | 'docid': x.docid, 73 | 'elementid': x.elementid, 74 | 'modelid': x.modelid 75 | }]; 76 | 77 | if(x.debug !== true) { 78 | Bokeh.set_log_level('info'); 79 | } 80 | 81 | Bokeh.embed.embed_items(x.docs_json, render_items); 82 | 83 | var timer = function() { 84 | if (dv1.childNodes[0].childNodes.length > 0) { 85 | dv1.removeChild(spinner); 86 | } else { 87 | window.setTimeout(timer, 200); 88 | } 89 | }; 90 | timer(); 91 | 92 | }, 93 | 94 | resize: function(el, width, height, instance) { 95 | } 96 | }); 97 | 98 | -------------------------------------------------------------------------------- /inst/htmlwidgets/rbokeh.yaml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: bokehjs 3 | version: 0.12.5 4 | src: htmlwidgets/lib/bokehjs 5 | script: 6 | - bokeh.min.js 7 | # - bokeh-widgets.min.js 8 | stylesheet: 9 | - bokeh.min.css 10 | - loader.css 11 | # - bokeh-widgets.min.css 12 | -------------------------------------------------------------------------------- /man-roxygen/callback.R: -------------------------------------------------------------------------------- 1 | #' @param callback a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}} 2 | #' @param ref_layer name of the layer that the callback should be applied to 3 | -------------------------------------------------------------------------------- /man-roxygen/dots-fillline.R: -------------------------------------------------------------------------------- 1 | #' @param \ldots additional parameters for fine control over fill and line properties (see "Additional parameters" below) 2 | #' @section Additional parameters: 3 | #' \tabular{ll}{ 4 | #' \code{fill_color} \tab color to use to fill the glyph with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo' \cr 5 | #' \code{fill_alpha} \tab transparency value between 0 (transparent) and 1 (opaque) \cr 6 | #' \code{line_color} \tab color to use to stroke lines with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo' \cr 7 | #' \code{line_width} \tab stroke width in units of pixels \cr 8 | #' \code{line_alpha} \tab transparency value between 0 (transparent) and 1 (opaque) \cr 9 | #' \code{line_join} \tab how path segments should be joined together 'miter' 'round' 'bevel' \cr 10 | #' \code{line_cap} \tab how path segments should be terminated 'butt' 'round' 'square' \cr 11 | #' \code{line_dash} \tab array of integer pixel distances that describe the on-off pattern of dashing to use \cr 12 | #' \code{line_dash_offset} \tab the distance in pixels into the line_dash that the pattern should start from 13 | #' } 14 | -------------------------------------------------------------------------------- /man-roxygen/dots-line.R: -------------------------------------------------------------------------------- 1 | #' @param \ldots additional parameters for fine control over line properties (see "Additional parameters" below) 2 | #' @section Additional parameters: 3 | #' \tabular{ll}{ 4 | #' \code{line_join} \tab how path segments should be joined together 'miter' 'round' 'bevel' \cr 5 | #' \code{line_cap} \tab how path segments should be terminated 'butt' 'round' 'square' \cr 6 | #' \code{line_dash} \tab an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use \cr 7 | #' \code{line_dash_offset} \tab the distance in pixels into the line_dash that the pattern should start from 8 | #' } 9 | -------------------------------------------------------------------------------- /man-roxygen/ex-axis.R: -------------------------------------------------------------------------------- 1 | figure() %>% 2 | ly_points(rexp(1000), rexp(1000)) %>% 3 | x_axis(label = "x", log = TRUE) %>% 4 | y_axis(label = "y", log = TRUE) 5 | 6 | figure() %>% 7 | ly_points(2 ^ (1:10)) %>% 8 | y_axis(log = 2) 9 | 10 | # disable scientific tick labels 11 | figure() %>% 12 | ly_points(rnorm(10), rnorm(10) / 1000) %>% 13 | y_axis(use_scientific = FALSE) 14 | 15 | # specify datetime tick labels 16 | # the appropriate datetime units are automatically chosen 17 | big_range <- seq(as.Date("2012-01-01"), as.Date("2012-12-31"), by = "days") 18 | small_range <- seq(as.Date("2012-01-01"), as.Date("2012-02-01"), by = "days") 19 | 20 | figure() %>% 21 | ly_lines(big_range, rnorm(366)) %>% 22 | x_axis(label = "Date", format = list(months = "%b-%Y", days = "%d")) 23 | 24 | figure() %>% 25 | ly_lines(small_range, rnorm(32)) %>% 26 | x_axis(label = "Date", format = list(months = "%b-%Y", days = "%d")) 27 | 28 | # specify numeric tick labels 29 | figure() %>% 30 | ly_points(rnorm(10), rnorm(10) * 10000) %>% 31 | y_axis(number_formatter = "numeral", format = "0,000") 32 | 33 | figure() %>% 34 | ly_points(rnorm(10), rnorm(10) * 100) %>% 35 | y_axis(number_formatter = "printf", format = "%0.1f%%") 36 | -------------------------------------------------------------------------------- /man-roxygen/ex-bar.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # count of variety 3 | figure() %>% 4 | ly_bar(variety, data = lattice::barley) %>% 5 | theme_axis("x", major_label_orientation = 90) 6 | 7 | # total yield per variety 8 | figure() %>% 9 | ly_bar(variety, yield, data = lattice::barley, hover = TRUE) %>% 10 | theme_axis("x", major_label_orientation = 90) 11 | 12 | # swap axes and add hover 13 | figure() %>% 14 | ly_bar(yield, variety, data = lattice::barley, hover = TRUE) 15 | 16 | # stack by year 17 | figure() %>% 18 | ly_bar(variety, yield, color = year, data = lattice::barley, hover = TRUE) %>% 19 | theme_axis("x", major_label_orientation = 90) 20 | 21 | # proportional bars 22 | figure() %>% 23 | ly_bar(variety, yield, color = year, 24 | data = lattice::barley, position = "fill", width = 1) %>% 25 | theme_axis("x", major_label_orientation = 90) %>% 26 | set_palette(discrete_color = pal_color(c("red", "blue"))) 27 | 28 | # swap axes and use different palette 29 | figure() %>% 30 | ly_bar(yield, variety, color = year, 31 | data = lattice::barley, position = "fill") %>% 32 | set_palette(discrete_color = pal_color(c("red", "blue"))) 33 | 34 | # side by side bars 35 | figure() %>% 36 | ly_bar(variety, yield, color = year, 37 | data = lattice::barley, position = "dodge") %>% 38 | theme_axis("x", major_label_orientation = 90) 39 | 40 | # use a different theme 41 | figure() %>% 42 | ly_bar(variety, yield, color = year, 43 | data = lattice::barley, position = "dodge") %>% 44 | theme_axis("x", major_label_orientation = 90) 45 | } 46 | -------------------------------------------------------------------------------- /man-roxygen/ex-boxplot.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | figure(ylab = "Height (inches)", width = 600) %>% 3 | ly_boxplot(voice.part, height, data = lattice::singer) 4 | 5 | # change orientation of x axis labels 6 | figure(ylab = "Height (inches)", width = 600) %>% 7 | ly_boxplot(voice.part, height, data = lattice::singer) %>% 8 | theme_axis("x", major_label_orientation = 90) 9 | } 10 | -------------------------------------------------------------------------------- /man-roxygen/ex-elements.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # prepare data 3 | elements <- subset(elements, !is.na(group)) 4 | elements$group <- as.character(elements$group) 5 | elements$period <- as.character(elements$period) 6 | 7 | # add colors for groups 8 | metals <- c("alkali metal", "alkaline earth metal", "halogen", 9 | "metal", "metalloid", "noble gas", "nonmetal", "transition metal") 10 | colors <- c("#a6cee3", "#1f78b4", "#fdbf6f", "#b2df8a", "#33a02c", 11 | "#bbbb88", "#baa2a6", "#e08e79") 12 | elements$color <- colors[match(elements$metal, metals)] 13 | elements$type <- elements$metal 14 | 15 | # make coordinates for labels 16 | elements$symx <- paste(elements$group, ":0.1", sep = "") 17 | elements$numbery <- paste(elements$period, ":0.8", sep = "") 18 | elements$massy <- paste(elements$period, ":0.15", sep = "") 19 | elements$namey <- paste(elements$period, ":0.3", sep = "") 20 | 21 | # create figure 22 | p <- figure(title = "Periodic Table", tools = "", 23 | ylim = as.character(c(7:1)), xlim = as.character(1:18), 24 | xgrid = FALSE, ygrid = FALSE, xlab = "", ylab = "", 25 | height = 600, width = 1200) %>% 26 | 27 | # plot rectangles 28 | ly_crect(group, period, data = elements, 0.9, 0.9, 29 | fill_color = color, line_color = color, fill_alpha = 0.6, 30 | hover = list(name, atomic.number, type, atomic.mass, 31 | electronic.configuration)) %>% 32 | 33 | # add symbol text 34 | ly_text(symx, period, text = symbol, data = elements, 35 | font_style = "bold", font_size = "15pt", 36 | align = "left", baseline = "middle") %>% 37 | 38 | # add atomic number text 39 | ly_text(symx, numbery, text = atomic.number, data = elements, 40 | font_size = "9pt", align = "left", baseline = "middle") %>% 41 | 42 | # add name text 43 | ly_text(symx, namey, text = name, data = elements, 44 | font_size = "6pt", align = "left", baseline = "middle") %>% 45 | 46 | # add atomic mass text 47 | ly_text(symx, massy, text = atomic.mass, data = elements, 48 | font_size = "6pt", align = "left", baseline = "middle") 49 | 50 | p 51 | } 52 | -------------------------------------------------------------------------------- /man-roxygen/ex-flightfreq.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | p <- figure(width = 1000) %>% 3 | ly_points(date, Freq, data = flightfreq, 4 | hover = list(date, Freq, dow), size = 5) %>% 5 | ly_abline(v = as.Date("2001-09-11")) 6 | p 7 | } 8 | -------------------------------------------------------------------------------- /man-roxygen/ex-gmap.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # custom map style 3 | gmap(lat = 40.74, lng = -73.95, zoom = 11, 4 | width = 600, height = 600, 5 | map_style = gmap_style("blue_water")) 6 | } 7 | \dontrun{ 8 | gmap(title = "NYC taxi pickups January 2013", 9 | lat = 40.74, lng = -73.95, zoom = 11, 10 | map_type = "roadmap", width = 1000, height = 800) %>% 11 | ly_hexbin(nyctaxihex, alpha = 0.5, 12 | palette = "Spectral10", trans = log, inv = exp) 13 | } 14 | -------------------------------------------------------------------------------- /man-roxygen/ex-grid.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | idx <- split(1:150, iris$Species) 3 | figs <- lapply(idx, function(x) { 4 | figure(width = 300, height = 300) %>% 5 | ly_points(Sepal.Length, Sepal.Width, data = iris[x, ], 6 | hover = list(Sepal.Length, Sepal.Width)) 7 | }) 8 | 9 | # 1 row, 3 columns 10 | grid_plot(figs) 11 | # specify xlim and ylim to be applied to all panels 12 | grid_plot(figs, xlim = c(4, 8), ylim = c(1.5, 4.5)) 13 | # unnamed list will remove labels 14 | grid_plot(unname(figs)) 15 | # 2 rows, 2 columns 16 | grid_plot(figs, nrow = 2) 17 | # x and y axis with same (and linked) limits 18 | grid_plot(figs, same_axes = TRUE) 19 | # x axis with same (and linked) limits 20 | grid_plot(figs, same_axes = c(TRUE, FALSE), nrow = 2) 21 | # x axis with same (and linked) limits and custom xlim 22 | grid_plot(figs, same_axes = c(TRUE, FALSE), xlim = c(5, 7), nrow = 2) 23 | # send lists instead of specifying nrow and ncol 24 | grid_plot(list( 25 | c(list(figs[[1]]), list(figs[[3]])), 26 | c(list(NULL), list(figs[[2]])) 27 | )) 28 | # a null entry will be skipped in the grid 29 | figs2 <- figs 30 | figs2[1] <- list(NULL) 31 | grid_plot(figs2, nrow = 2) 32 | # with themes 33 | grid_plot(figs) %>% 34 | theme_title(text_color = "red") %>% 35 | theme_plot(background_fill_color = "#E6E6E6", 36 | outline_line_color = "white") %>% 37 | theme_grid(c("x", "y"), grid_line_color = "white", 38 | minor_grid_line_color = "white", 39 | minor_grid_line_alpha = 0.4) %>% 40 | theme_axis(c("x", "y"), axis_line_color = "white", 41 | major_label_text_color = "#7F7F7F", 42 | major_tick_line_color = "#7F7F7F", 43 | minor_tick_line_alpha = 0, num_minor_ticks = 2) 44 | # themes again 45 | grid_plot(figs) %>% 46 | set_theme(bk_ggplot_theme) 47 | 48 | # link data across plots in the grid (try box_select tool) 49 | # (data sources must be the same) 50 | tools <- c("pan", "wheel_zoom", "box_zoom", "box_select", "reset") 51 | p1 <- figure(tools = tools, width = 500, height = 500) %>% 52 | ly_points(Sepal.Length, Sepal.Width, data = iris, color = Species) 53 | p2 <- figure(tools = tools, width = 500, height = 500) %>% 54 | ly_points(Petal.Length, Petal.Width, data = iris, color = Species) 55 | grid_plot(list(p1, p2), same_axes = TRUE, link_data = TRUE) 56 | } 57 | -------------------------------------------------------------------------------- /man-roxygen/ex-hover-callback.R: -------------------------------------------------------------------------------- 1 | library(rbokeh) 2 | 3 | D <- data.frame( 4 | x = c(2, 3, 5, 6, 8, 7), 5 | y = c(6, 4, 3, 8, 7, 5)) 6 | 7 | links <- list( 8 | "0" = c(1, 2), 9 | "1" = c(0, 3, 4), 10 | "2" = c(0, 5), 11 | "3" = c(1, 4), 12 | "4" = c(1, 3), 13 | "5" = c(2, 3, 4) 14 | ) 15 | 16 | src <- data.frame( 17 | x0 = numeric(0), y0 = numeric(0), 18 | x1 = numeric(0), y1 = numeric(0)) 19 | 20 | p <- figure(width = 400, height = 500, toolbar_location = NULL, 21 | title = "Hover Over Points", tools = NULL) %>% 22 | ly_segments(x0 = x0, y0 = y0, x1 = x1, y1 = y1, color = "olive", 23 | alpha = 0.6, line_width = 3, data = src, lname = "segment") %>% 24 | ly_points(x = x, y = y, data = D, color = "olive", size = 30, 25 | alpha = 0.4, lname = "circle") 26 | 27 | callback <- custom_callback(code = sprintf(" 28 | var links=%s; 29 | var data = {'x0': [], 'y0': [], 'x1': [], 'y1': []}; 30 | var cdata = circle_data.get('data'); 31 | var indices = cb_data.index['1d'].indices; 32 | for (i=0; i < indices.length; i++) { 33 | ind0 = indices[i] 34 | for (j=0; j < links[ind0].length; j++) { 35 | ind1 = links[ind0][j]; 36 | data['x0'].push(cdata.x[ind0]); 37 | data['y0'].push(cdata.y[ind0]); 38 | data['x1'].push(cdata.x[ind1]); 39 | data['y1'].push(cdata.y[ind1]); 40 | } 41 | } 42 | segment_data.set('data', data); 43 | ", jsonlite::toJSON(links)), lnames = c("circle", "segment")) 44 | 45 | p <- tool_hover(p, callback = callback, c("circle")) 46 | p 47 | -------------------------------------------------------------------------------- /man-roxygen/ex-hover-custom-callback.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # hover over the blue points and make the orange points move 3 | figure(title = "hover a blue point") %>% 4 | ly_points(1:10, lname = "blue", lgroup = "g1") %>% 5 | ly_points(2:12, lname = "orange", lgroup = "g1") %>% 6 | tool_hover(custom_callback( 7 | code = "debugger;if(cb_data.index['1d'].indices.length > 0) 8 | orange_data.get('data').x[cb_data.index['1d'].indices] += 0.1 9 | orange_data.trigger('change')", "orange"), "blue") 10 | } 11 | -------------------------------------------------------------------------------- /man-roxygen/ex-image.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | p <- figure(xlim = c(0, 1), ylim = c(0, 1), title = "Volcano") %>% 3 | ly_image(volcano) %>% 4 | ly_contour(volcano) 5 | p 6 | } 7 | -------------------------------------------------------------------------------- /man-roxygen/ex-image_url.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | url <- c(" http://bokeh.pydata.org/en/latest/_static/images/logo.png", 3 | "http://developer.r-project.org/Logo/Rlogo-4.png") 4 | 5 | ss <- seq(0, 2*pi, length = 13)[-1] 6 | ws <- runif(12, 2.5, 5) * rep(c(1, 0.8), 6) 7 | 8 | imgdat <- data.frame( 9 | x = sin(ss) * 10, y = cos(ss) * 10, 10 | w = ws, h = ws * rep(c(1, 0.76), 6), 11 | url = rep(url, 6) 12 | ) 13 | 14 | p <- figure(xlab = "x", ylab = "y") %>% 15 | ly_image_url(x, y, w = w, h = h, image_url = url, data = imgdat, 16 | anchor = "center") %>% 17 | ly_lines(sin(c(ss, ss[1])) * 10, cos(c(ss, ss[1])) * 10, 18 | width = 15, alpha = 0.1) 19 | p 20 | } 21 | -------------------------------------------------------------------------------- /man-roxygen/ex-lines.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | z <- lm(dist ~ speed, data = cars) 3 | p <- figure() %>% 4 | ly_points(cars, hover = cars) %>% 5 | ly_lines(lowess(cars), legend = "lowess") %>% 6 | ly_abline(z, type = 2, legend = "lm", width = 2) 7 | p 8 | } 9 | -------------------------------------------------------------------------------- /man-roxygen/ex-points.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | figure() %>% 3 | ly_points(Sepal.Length, Sepal.Width, data = iris, 4 | color = Species, glyph = Species, 5 | hover = list(Sepal.Length, Sepal.Width)) 6 | 7 | # custom hover 8 | mtcars$model <- row.names(mtcars) 9 | figure() %>% 10 | ly_points(disp, mpg, data = mtcars, color = cyl, 11 | hover = "This @model
has @hp horsepower!") 12 | } 13 | -------------------------------------------------------------------------------- /man-roxygen/ex-range.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # get data from Duluth site in 'barley' data 3 | du <- subset(lattice::barley, site == "Duluth") 4 | 5 | # plot with default ranges 6 | p <- figure(width = 600) %>% 7 | ly_points(yield, variety, color = year, data = du) 8 | p 9 | # y axis is alphabetical 10 | 11 | # manually set x and y axis (y in order of 1932 yield) 12 | p %>% 13 | x_range(c(20, 40)) %>% 14 | y_range(du$variety[order(subset(du, year == 1932)$yield)]) 15 | } 16 | -------------------------------------------------------------------------------- /man-roxygen/ex-selection-callback.R: -------------------------------------------------------------------------------- 1 | 2 | 3 | dat <- data.frame(x = runif(500), y = runif(500)) 4 | 5 | p <- figure(title = "select points to adjust mean line", 6 | tools = "lasso_select") %>% 7 | ly_points(x, y, data = dat, lname = "points") %>% 8 | ly_lines(x = c(0, 1), y = rep(mean(dat$y), 2), line_width = 6, 9 | color = "orange", alpha = 0.75, lname = "mean") 10 | 11 | code <- " 12 | var inds = cb_obj.get('selected')['1d'].indices; 13 | var d = cb_obj.get('data'); 14 | var ym = 0; 15 | 16 | if (inds.length == 0) { return; } 17 | 18 | for (i = 0; i < inds.length; i++) { 19 | ym += d['y'][inds[i]]; 20 | } 21 | ym /= inds.length; 22 | 23 | mean_data.get('data').y = [ym, ym]; 24 | 25 | cb_obj.trigger('change'); 26 | mean_data.trigger('change'); 27 | " 28 | 29 | p %>% tool_lasso_select(custom_callback(code, "mean"), "points") 30 | -------------------------------------------------------------------------------- /man-roxygen/ex-shapes.R: -------------------------------------------------------------------------------- 1 | theta <- seq(0, 4 * pi, length = 40) 2 | r <- seq(0.5, 10, length = 40) 3 | 4 | d <- data.frame( 5 | x1 = r * cos(theta), 6 | y1 = r * sin(theta), 7 | x2 = 2 * r * cos(theta), 8 | y2 = 2 * r * sin(theta)) 9 | 10 | figure() %>% ly_rect(x1, y1, x2, y2, data = d) 11 | -------------------------------------------------------------------------------- /man-roxygen/ex-shiny.R: -------------------------------------------------------------------------------- 1 | \dontrun{ 2 | library("shiny") 3 | library("rbokeh") 4 | 5 | ui <- fluidPage( 6 | rbokehOutput("rbokeh") 7 | ) 8 | 9 | server <- function(input, output, session) { 10 | output$rbokeh <- renderRbokeh({ 11 | # Use invalidateLater() and jitter() to add some motion 12 | invalidateLater(1000, session) 13 | figure() %>% 14 | ly_points(jitter(cars$speed), jitter(cars$dist)) 15 | }) 16 | } 17 | 18 | shinyApp(ui, server) 19 | 20 | 21 | library("shiny") 22 | library("rbokeh") 23 | 24 | ui <- fluidPage( 25 | rbokehOutput("rbokeh", width = 500, height = 540), 26 | textOutput("x_range_text") 27 | ) 28 | 29 | server <- function(input, output, session) { 30 | output$rbokeh <- renderRbokeh({ 31 | figure() %>% ly_points(1:10) %>% 32 | x_range(callback = shiny_callback("x_range")) 33 | }) 34 | 35 | output$x_range_text <- reactive({ 36 | xrng <- input$x_range 37 | if(!is.null(xrng)) { 38 | paste0("factors: ", xrng$factors, ", start: ", xrng$start, 39 | ", end: ", xrng$end) 40 | } else { 41 | "waiting for axis event..." 42 | } 43 | }) 44 | } 45 | 46 | shinyApp(ui, server) 47 | } 48 | -------------------------------------------------------------------------------- /man-roxygen/ex-tap-debug-callback.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | figure() %>% 3 | ly_points(1:10, lname = "points") %>% 4 | tool_tap(debug_callback("points"), "points") 5 | } 6 | -------------------------------------------------------------------------------- /man-roxygen/ex-theme.R: -------------------------------------------------------------------------------- 1 | \donttest{ 2 | # manually specify a ggplot-like grid and background 3 | figure() %>% 4 | ly_points(1:10) %>% 5 | theme_plot(background_fill_color = "#E6E6E6", 6 | outline_line_color = "white") %>% 7 | theme_grid(c("x", "y"), grid_line_color = "white", 8 | minor_grid_line_color = "white", 9 | minor_grid_line_alpha = 0.4) %>% 10 | theme_axis(c("x", "y"), axis_line_color = "white", 11 | major_label_text_color = "#7F7F7F", 12 | major_tick_line_color = "#7F7F7F", 13 | minor_tick_line_alpha = 0, num_minor_ticks = 2) 14 | 15 | # or use the built in ggplot theme (under development) 16 | figure(data = iris, legend = "top_left", tools = NULL) %>% 17 | ly_points(Sepal.Length, Petal.Length, color = Species) %>% 18 | set_theme(bk_ggplot_theme) 19 | } 20 | \dontrun{ 21 | # or to set the theme for all future plots 22 | options(bokeh_theme = bk_ggplot_theme) 23 | 24 | figure() %>% 25 | ly_points(1:10) 26 | 27 | figure() %>% 28 | ly_boxplot(1:10) 29 | } 30 | -------------------------------------------------------------------------------- /man-roxygen/par-coloralpha.R: -------------------------------------------------------------------------------- 1 | #' @param color color for the glyph - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo' - for glyphs with both fill and line properties, see "Handling color" below 2 | #' @param alpha the alpha transparency of the glyph between 0 (transparent) and 1 (opaque) - if glyph has both fill and color properties, see "Handling alpha" below 3 | #' @section Handling color: The \code{color} parameter is a high-level plot attribute that provides default behavior for coloring glyphs. 4 | #' \itemize{ 5 | #' \item When using a glyph that only has line properties, this will be the color of the line. 6 | #' \item When using a glyph that has has line and fill properties, this will be the color of the line and the fill, with the alpha level of the fill reduced by 50\%. 7 | #' \item If full control over fill and line color is desired, the \code{fill_color} and \code{line_color} attributes can be specified explicitly and will override \code{color}. 8 | #' } 9 | #' When color is \code{NULL} and \code{fill_color} or \code{line_color} are not specified, the color will be chosen from the theme. 10 | #' @section Handling alpha: The \code{alpha} is a high-level plot attribute that sets the transparency of the glyph being plotted. 11 | #' \itemize{ 12 | #' \item When using a glyph that only has line properties, this will be the alpha of the line. 13 | #' \item When using a glyph that has has line and fill properties, this will be the alpha of the line and the alpha of the fill will be set to 50\% of this value. 14 | #' \item Individual fill and line alpha can be specified with \code{fill_alpha} and \code{line_alpha} and will override \code{alpha}. 15 | #' } 16 | -------------------------------------------------------------------------------- /man-roxygen/par-hover.R: -------------------------------------------------------------------------------- 1 | #' @param hover a data frame of variables to be displayed when hovering over the glyph or a vector of variable names that can be found and extracted from the \code{data} argument 2 | -------------------------------------------------------------------------------- /man-roxygen/par-legend.R: -------------------------------------------------------------------------------- 1 | #' @param legend either a logical specifying not to plot a legend for this layer (FALSE) or a string indicating the name of the legend entry for this layer (note that when mapping plot attributes to variables in \code{data}, a legend is automatically created and does not need to be specified - see "Mapped plot attributes and legends" below) 2 | #' @section Mapped plot attributes and legends: When specifying an input data frame for a layer through the \code{data} argument, columns of \code{data} can be used to specify various plot attributes such as \code{color}, etc. For example, with \code{ly_points(..., data = iris, color = Species)}, the \code{Species} variable is used to determine how to color the points. Here, \code{Species} is "mapped" to the \code{color} attribute. Both continuous and categorical variables can be mapped. In the case of continuous variables, the range is cut into slices and attributes are applied to each interval. The mapping from the values of the variable to the actual plot attributes is determined based on the theme. 3 | -------------------------------------------------------------------------------- /man-roxygen/par-lineprops.R: -------------------------------------------------------------------------------- 1 | 2 | #' @param color color to use to stroke lines with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo' 3 | #' @param alpha transparency value for the line between 0 (transparent) and 1 (opaque) 4 | #' @param width stroke width in units of pixels 5 | #' @param type an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use 6 | -------------------------------------------------------------------------------- /man-roxygen/par-lnamegroup.R: -------------------------------------------------------------------------------- 1 | #' @param lname layer name 2 | #' @param lgroup layer group 3 | -------------------------------------------------------------------------------- /man-roxygen/par-text.R: -------------------------------------------------------------------------------- 1 | #' @param text_font font name, e.g., 'times', 'helvetica' 2 | #' @param text_font_size font size in px, em, or pt, e.g., '12pt', '1.5em' 3 | #' @param text_font_style 'normal' 'italic' 'bold' 4 | #' @param text_color color to use to render text with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo' 5 | #' @param text_alpha transparency value between 0 (transparent) and 1 (opaque) 6 | #' @param text_align horizontal anchor point for text 'left' 'right' 'center' 7 | #' @param text_baseline - vertical anchor point for text 'top' 'middle' 'bottom' 'alphabetic' 'hanging' 8 | -------------------------------------------------------------------------------- /man-roxygen/par-url.R: -------------------------------------------------------------------------------- 1 | #' @param url a string of URLs or a single string that references a variable name (via @@var_name) that can be found and extracted from the \code{data} argument 2 | -------------------------------------------------------------------------------- /man-roxygen/tools.R: -------------------------------------------------------------------------------- 1 | #' @param fig figure to modify 2 | #' @family tools 3 | #' @note Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 4 | -------------------------------------------------------------------------------- /man/b_eval.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer__utils.R 3 | \name{b_eval} 4 | \alias{b_eval} 5 | \title{Eval lazy symbol} 6 | \usage{ 7 | b_eval(data) 8 | } 9 | \arguments{ 10 | \item{data}{data set to be used for evaluation. May be \code{NULL}} 11 | } 12 | \value{ 13 | a function that takes in one lazy argument to be evaluated 14 | } 15 | \description{ 16 | Evaluate the argument from the env it came from, or from within the data. The arg supplied to the returned function must be lazy. 17 | } 18 | -------------------------------------------------------------------------------- /man/bokeh_render_json.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/bokeh_render_json.R 3 | \name{bokeh_render_json} 4 | \alias{bokeh_render_json} 5 | \title{Plot a Bokeh JSON specification} 6 | \usage{ 7 | bokeh_render_json(json_file) 8 | } 9 | \arguments{ 10 | \item{json_file}{path to json file} 11 | } 12 | \description{ 13 | Take a path to a Bokeh JSON plot specification file and render it in the browser. 14 | } 15 | \note{ 16 | This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_model_json}}. 17 | } 18 | \seealso{ 19 | \code{\link{print_model_json}} 20 | } 21 | -------------------------------------------------------------------------------- /man/catjitter.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/misc.R 3 | \name{catjitter} 4 | \alias{catjitter} 5 | \title{Add a small amount of (rbokeh-compatible) noise to a character vector} 6 | \usage{ 7 | catjitter(x, factor = 0.5) 8 | } 9 | \arguments{ 10 | \item{x}{numeric vector to which jitter should be added} 11 | 12 | \item{factor}{a factor between 0 and 1 that} 13 | } 14 | \description{ 15 | Add a small amount of (rbokeh-compatible) noise to a character vector 16 | } 17 | \examples{ 18 | figure(data = lattice::singer) \%>\% 19 | ly_points(catjitter(voice.part), jitter(height), color = "black") \%>\% 20 | ly_boxplot(voice.part, height, with_outliers = FALSE) 21 | } 22 | -------------------------------------------------------------------------------- /man/console_callback.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_callback.R 3 | \name{console_callback} 4 | \alias{console_callback} 5 | \title{Specify a console callback} 6 | \usage{ 7 | console_callback() 8 | } 9 | \description{ 10 | This registers a callback that simply prints the callback objects in the javascript console of your web browser. A probalby more useful callback is the \code{\link{debug_callback}} which will place you inside a debugger in your web browser allowing you to inspect the callback objects. 11 | } 12 | \examples{ 13 | \donttest{ 14 | figure() \%>\% 15 | ly_points(1:10) \%>\% 16 | x_range(callback = console_callback()) \%>\% 17 | y_range(callback = console_callback()) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /man/custom_callback.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_callback.R 3 | \name{custom_callback} 4 | \alias{custom_callback} 5 | \title{Specify a custom callback} 6 | \usage{ 7 | custom_callback(code, lnames = NULL, args = NULL) 8 | } 9 | \arguments{ 10 | \item{code}{a string of javascript callback code} 11 | 12 | \item{lnames}{vector of layer names to be made available inside the callback in addition to the default callback objects (see details)} 13 | 14 | \item{args}{named list of additional references to objects to be addressable in the callback} 15 | } 16 | \description{ 17 | This registers a callback that allows you to specify your own custom callback javascript code. A probalby more useful callback to use in conjunction with this for working on the javascript code is the \code{\link{debug_callback}} which will place you inside a debugger in your web browser allowing you to inspect the callback objects. 18 | } 19 | \details{ 20 | If we add a layer and provide it, for example the \code{lname} "points", then if we refer to it using the \code{lnames} parameter to the callback, several objects will be made available inside the callback for you to access, given the names "points_data", "points_glyph", "points_glyph_rend", "points_hov_glyph", "points_ns_glyph", all pointers to different objects associated with the "points" layer that your callback can manipulate. 21 | } 22 | \examples{ 23 | \donttest{ 24 | # hover over the blue points and make the orange points move 25 | figure(title = "hover a blue point") \%>\% 26 | ly_points(1:10, lname = "blue", lgroup = "g1") \%>\% 27 | ly_points(2:12, lname = "orange", lgroup = "g1") \%>\% 28 | tool_hover(custom_callback( 29 | code = "debugger;if(cb_data.index['1d'].indices.length > 0) 30 | orange_data.get('data').x[cb_data.index['1d'].indices] += 0.1 31 | orange_data.trigger('change')", "orange"), "blue") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /man/data_name_list.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer__utils.R 3 | \name{data_name_list} 4 | \alias{data_name_list} 5 | \title{List of all types of data name structures that could appear} 6 | \usage{ 7 | data_name_list() 8 | } 9 | \description{ 10 | List of all types of data name structures that could appear 11 | } 12 | -------------------------------------------------------------------------------- /man/debug_callback.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_callback.R 3 | \name{debug_callback} 4 | \alias{debug_callback} 5 | \title{Specify a "debug" callback} 6 | \usage{ 7 | debug_callback(lnames = NULL, args = NULL) 8 | } 9 | \arguments{ 10 | \item{lnames}{vector of layer names to be made available inside the callback in addition to the default callback objects (see \code{\link{custom_callback}} for details)} 11 | 12 | \item{args}{named list of additional references to objects to be addressable in the callback} 13 | } 14 | \description{ 15 | This registers a callback that simply places you inside a debugger in your web browser allowing you to inspect the callback objects. 16 | } 17 | \examples{ 18 | \donttest{ 19 | figure() \%>\% 20 | ly_points(1:10, lname = "points") \%>\% 21 | tool_tap(debug_callback("points"), "points") 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /man/elements.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/rbokeh-package.R 3 | \docType{data} 4 | \name{elements} 5 | \alias{elements} 6 | \title{"Periodic Table" dataset} 7 | \usage{ 8 | elements 9 | } 10 | \description{ 11 | Data for periodic table of the elements 12 | } 13 | \examples{ 14 | \donttest{ 15 | # prepare data 16 | elements <- subset(elements, !is.na(group)) 17 | elements$group <- as.character(elements$group) 18 | elements$period <- as.character(elements$period) 19 | 20 | # add colors for groups 21 | metals <- c("alkali metal", "alkaline earth metal", "halogen", 22 | "metal", "metalloid", "noble gas", "nonmetal", "transition metal") 23 | colors <- c("#a6cee3", "#1f78b4", "#fdbf6f", "#b2df8a", "#33a02c", 24 | "#bbbb88", "#baa2a6", "#e08e79") 25 | elements$color <- colors[match(elements$metal, metals)] 26 | elements$type <- elements$metal 27 | 28 | # make coordinates for labels 29 | elements$symx <- paste(elements$group, ":0.1", sep = "") 30 | elements$numbery <- paste(elements$period, ":0.8", sep = "") 31 | elements$massy <- paste(elements$period, ":0.15", sep = "") 32 | elements$namey <- paste(elements$period, ":0.3", sep = "") 33 | 34 | # create figure 35 | p <- figure(title = "Periodic Table", tools = "", 36 | ylim = as.character(c(7:1)), xlim = as.character(1:18), 37 | xgrid = FALSE, ygrid = FALSE, xlab = "", ylab = "", 38 | height = 600, width = 1200) \%>\% 39 | 40 | # plot rectangles 41 | ly_crect(group, period, data = elements, 0.9, 0.9, 42 | fill_color = color, line_color = color, fill_alpha = 0.6, 43 | hover = list(name, atomic.number, type, atomic.mass, 44 | electronic.configuration)) \%>\% 45 | 46 | # add symbol text 47 | ly_text(symx, period, text = symbol, data = elements, 48 | font_style = "bold", font_size = "15pt", 49 | align = "left", baseline = "middle") \%>\% 50 | 51 | # add atomic number text 52 | ly_text(symx, numbery, text = atomic.number, data = elements, 53 | font_size = "9pt", align = "left", baseline = "middle") \%>\% 54 | 55 | # add name text 56 | ly_text(symx, namey, text = name, data = elements, 57 | font_size = "6pt", align = "left", baseline = "middle") \%>\% 58 | 59 | # add atomic mass text 60 | ly_text(symx, massy, text = atomic.mass, data = elements, 61 | font_size = "6pt", align = "left", baseline = "middle") 62 | 63 | p 64 | } 65 | } 66 | \keyword{data} 67 | -------------------------------------------------------------------------------- /man/figure_data.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/figure.R 3 | \name{figure_data} 4 | \alias{figure_data} 5 | \title{Retrieve rbokeh figure data} 6 | \usage{ 7 | figure_data(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{rbokeh figure} 11 | } 12 | \description{ 13 | Retrieve rbokeh figure data 14 | } 15 | -------------------------------------------------------------------------------- /man/figures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/man/figures/logo.png -------------------------------------------------------------------------------- /man/flightfreq.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/rbokeh-package.R 3 | \docType{data} 4 | \name{flightfreq} 5 | \alias{flightfreq} 6 | \title{Flight frequency dataset} 7 | \usage{ 8 | flightfreq 9 | } 10 | \description{ 11 | Daily counts of domestic flights in the U.S. from 1999 to mid-2008 12 | } 13 | \examples{ 14 | \donttest{ 15 | p <- figure(width = 1000) \%>\% 16 | ly_points(date, Freq, data = flightfreq, 17 | hover = list(date, Freq, dow), size = 5) \%>\% 18 | ly_abline(v = as.Date("2001-09-11")) 19 | p 20 | } 21 | } 22 | \keyword{data} 23 | -------------------------------------------------------------------------------- /man/get_object_refs.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/misc.R 3 | \name{get_object_refs} 4 | \alias{get_object_refs} 5 | \title{Get object ids and types from a figure} 6 | \usage{ 7 | get_object_refs(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{a figure object} 11 | } 12 | \description{ 13 | Get object ids and types from a figure 14 | } 15 | -------------------------------------------------------------------------------- /man/gmap_style.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_gmap.R 3 | \name{gmap_style} 4 | \alias{gmap_style} 5 | \title{Get a Google Map Style} 6 | \usage{ 7 | gmap_style(name) 8 | } 9 | \arguments{ 10 | \item{name}{name of map style to retrieve (see details)} 11 | } 12 | \description{ 13 | Get a Google Map Style 14 | } 15 | \details{ 16 | This function provides Google Maps themes that can be passed to the \code{map_style} argument of \code{\link{gmap}}. Currently the most popular styles from \url{https://snazzymaps.com} are available. You can also visit this site or others to specify a custom \code{map_style}. Available styles are: "subtle_grayscale", "shades_of_grey", "blue_water", "pale_dawn", "blue_essence", "apple_mapsesque", "midnight_commander", "light_monochrome", "paper", "retro", "flat_map", "cool_grey". 17 | } 18 | \examples{ 19 | \donttest{ 20 | # custom map style 21 | gmap(lat = 40.74, lng = -73.95, zoom = 11, 22 | width = 600, height = 600, 23 | map_style = gmap_style("blue_water")) 24 | } 25 | \dontrun{ 26 | gmap(title = "NYC taxi pickups January 2013", 27 | lat = 40.74, lng = -73.95, zoom = 11, 28 | map_type = "roadmap", width = 1000, height = 800) \%>\% 29 | ly_hexbin(nyctaxihex, alpha = 0.5, 30 | palette = "Spectral10", trans = log, inv = exp) 31 | } 32 | } 33 | \seealso{ 34 | \code{\link{gmap}} 35 | } 36 | -------------------------------------------------------------------------------- /man/ly_contour.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_lines.R 3 | \name{ly_contour} 4 | \alias{ly_contour} 5 | \title{Add a "contour" layer to a Bokeh figure} 6 | \usage{ 7 | ly_contour( 8 | fig, 9 | z, 10 | x = seq(0, 1, length.out = nrow(z)), 11 | y = seq(0, 1, length.out = ncol(z)), 12 | nlevels = 10, 13 | levels = pretty(range(z, na.rm = TRUE), nlevels), 14 | color = "black", 15 | alpha = 1, 16 | width = 1, 17 | type = 1, 18 | lname = NULL, 19 | lgroup = NULL, 20 | ... 21 | ) 22 | } 23 | \arguments{ 24 | \item{fig}{figure to modify} 25 | 26 | \item{z}{a matrix containing the values to compute contour lines for} 27 | 28 | \item{x, y}{locations of grid lines at which the values in \code{image} are measured (see \code{\link[grDevices]{contourLines}})} 29 | 30 | \item{nlevels, levels}{parameters sent to \code{\link[grDevices]{contourLines}})} 31 | 32 | \item{color}{color to use to stroke lines with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo'} 33 | 34 | \item{alpha}{transparency value for the line between 0 (transparent) and 1 (opaque)} 35 | 36 | \item{width}{stroke width in units of pixels} 37 | 38 | \item{type}{an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use} 39 | 40 | \item{lname}{layer name} 41 | 42 | \item{lgroup}{layer group} 43 | 44 | \item{\ldots}{additional parameters for fine control over line properties (see "Additional parameters" below)} 45 | } 46 | \description{ 47 | Computes and draws contour lines. 48 | } 49 | \section{Additional parameters}{ 50 | 51 | \tabular{ll}{ 52 | \code{line_join} \tab how path segments should be joined together 'miter' 'round' 'bevel' \cr 53 | \code{line_cap} \tab how path segments should be terminated 'butt' 'round' 'square' \cr 54 | \code{line_dash} \tab an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use \cr 55 | \code{line_dash_offset} \tab the distance in pixels into the line_dash that the pattern should start from 56 | } 57 | } 58 | 59 | \examples{ 60 | \donttest{ 61 | p <- figure(xlim = c(0, 1), ylim = c(0, 1), title = "Volcano") \%>\% 62 | ly_image(volcano) \%>\% 63 | ly_contour(volcano) 64 | p 65 | } 66 | } 67 | \seealso{ 68 | Other layer functions: 69 | \code{\link{ly_abline}()}, 70 | \code{\link{ly_annular_wedge}()}, 71 | \code{\link{ly_annulus}()}, 72 | \code{\link{ly_arc}()}, 73 | \code{\link{ly_bar}()}, 74 | \code{\link{ly_bezier}()}, 75 | \code{\link{ly_boxplot}()}, 76 | \code{\link{ly_crect}()}, 77 | \code{\link{ly_curve}()}, 78 | \code{\link{ly_density}()}, 79 | \code{\link{ly_hist}()}, 80 | \code{\link{ly_image_url}()}, 81 | \code{\link{ly_image}()}, 82 | \code{\link{ly_lines}()}, 83 | \code{\link{ly_map}()}, 84 | \code{\link{ly_multi_line}()}, 85 | \code{\link{ly_oval}()}, 86 | \code{\link{ly_patch}()}, 87 | \code{\link{ly_points}()}, 88 | \code{\link{ly_polygons}()}, 89 | \code{\link{ly_quadratic}()}, 90 | \code{\link{ly_quantile}()}, 91 | \code{\link{ly_ray}()}, 92 | \code{\link{ly_rect}()}, 93 | \code{\link{ly_segments}()}, 94 | \code{\link{ly_text}()}, 95 | \code{\link{ly_wedge}()} 96 | } 97 | \concept{layer functions} 98 | -------------------------------------------------------------------------------- /man/ly_density.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_stats.R 3 | \name{ly_density} 4 | \alias{ly_density} 5 | \title{Add a "density" layer to a Bokeh figure} 6 | \usage{ 7 | ly_density( 8 | fig, 9 | x, 10 | data = figure_data(fig), 11 | bw = "nrd0", 12 | adjust = 1, 13 | kernel = c("gaussian", "epanechnikov", "rectangular", "triangular", "biweight", 14 | "cosine", "optcosine"), 15 | weights = NULL, 16 | window = kernel, 17 | n = 512, 18 | cut = 3, 19 | na.rm = FALSE, 20 | color = "black", 21 | alpha = 1, 22 | width = 1, 23 | type = 1, 24 | legend = NULL, 25 | lname = NULL, 26 | lgroup = NULL, 27 | ... 28 | ) 29 | } 30 | \arguments{ 31 | \item{fig}{figure to modify} 32 | 33 | \item{x, bw, adjust, kernel, weights, window, n, cut, na.rm}{parameters passed to \code{\link[stats]{density}}} 34 | 35 | \item{data}{an optional data frame, providing the source for x} 36 | 37 | \item{color}{color to use to stroke lines with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo'} 38 | 39 | \item{alpha}{transparency value for the line between 0 (transparent) and 1 (opaque)} 40 | 41 | \item{width}{stroke width in units of pixels} 42 | 43 | \item{type}{an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use} 44 | 45 | \item{legend}{text to display in the legend entry for the density line} 46 | 47 | \item{lname}{layer name} 48 | 49 | \item{lgroup}{layer group} 50 | 51 | \item{\ldots}{additional parameters for fine control over line properties (see "Additional parameters" below)} 52 | } 53 | \description{ 54 | Draws a kernel density estimate 55 | } 56 | \section{Additional parameters}{ 57 | 58 | \tabular{ll}{ 59 | \code{line_join} \tab how path segments should be joined together 'miter' 'round' 'bevel' \cr 60 | \code{line_cap} \tab how path segments should be terminated 'butt' 'round' 'square' \cr 61 | \code{line_dash} \tab an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use \cr 62 | \code{line_dash_offset} \tab the distance in pixels into the line_dash that the pattern should start from 63 | } 64 | } 65 | 66 | \examples{ 67 | h <- figure(width = 600, height = 400) \%>\% 68 | ly_hist(eruptions, data = faithful, breaks = 40, freq = FALSE) \%>\% 69 | ly_density(eruptions, data = faithful) 70 | h 71 | } 72 | \seealso{ 73 | Other layer functions: 74 | \code{\link{ly_abline}()}, 75 | \code{\link{ly_annular_wedge}()}, 76 | \code{\link{ly_annulus}()}, 77 | \code{\link{ly_arc}()}, 78 | \code{\link{ly_bar}()}, 79 | \code{\link{ly_bezier}()}, 80 | \code{\link{ly_boxplot}()}, 81 | \code{\link{ly_contour}()}, 82 | \code{\link{ly_crect}()}, 83 | \code{\link{ly_curve}()}, 84 | \code{\link{ly_hist}()}, 85 | \code{\link{ly_image_url}()}, 86 | \code{\link{ly_image}()}, 87 | \code{\link{ly_lines}()}, 88 | \code{\link{ly_map}()}, 89 | \code{\link{ly_multi_line}()}, 90 | \code{\link{ly_oval}()}, 91 | \code{\link{ly_patch}()}, 92 | \code{\link{ly_points}()}, 93 | \code{\link{ly_polygons}()}, 94 | \code{\link{ly_quadratic}()}, 95 | \code{\link{ly_quantile}()}, 96 | \code{\link{ly_ray}()}, 97 | \code{\link{ly_rect}()}, 98 | \code{\link{ly_segments}()}, 99 | \code{\link{ly_text}()}, 100 | \code{\link{ly_wedge}()} 101 | } 102 | \concept{layer functions} 103 | -------------------------------------------------------------------------------- /man/ly_hexbin.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_hexbin.R 3 | \name{ly_hexbin} 4 | \alias{ly_hexbin} 5 | \title{Add a "hexbin" layer to a Bokeh figure} 6 | \usage{ 7 | ly_hexbin( 8 | fig, 9 | x, 10 | y = NULL, 11 | data = figure_data(fig), 12 | xbins = 30, 13 | shape = 1, 14 | xbnds = NULL, 15 | ybnds = NULL, 16 | style = "colorscale", 17 | trans = NULL, 18 | inv = NULL, 19 | lname = NULL, 20 | palette = "RdYlGn11", 21 | line = FALSE, 22 | alpha = 1, 23 | hover = TRUE 24 | ) 25 | } 26 | \arguments{ 27 | \item{fig}{figure to modify} 28 | 29 | \item{x}{values or field name of center x coordinates to be binned} 30 | 31 | \item{y}{values or field name of center y coordinates to be binned} 32 | 33 | \item{data}{an optional data frame, providing the source for x and y} 34 | 35 | \item{xbins, shape, xbnds, ybnds}{parameters passed to \code{\link[hexbin]{hexbin}}} 36 | 37 | \item{style}{type of plotting for hexbins (see \code{\link[hexbin]{grid.hexagons}}) - "colorramp" and "lattice" are currently supported} 38 | 39 | \item{trans, inv}{transformation and inverse transformation function for the bin counts} 40 | 41 | \item{lname}{layer name} 42 | 43 | \item{palette}{name of color palette to use for color ramp (see \href{https://docs.bokeh.org/en/latest/docs/reference/palettes.html}{here} for acceptable values)} 44 | 45 | \item{line}{logical - should hexagons have an outline?} 46 | 47 | \item{alpha}{the alpha transparency of the hexagons between 0 (transparent) and 1 (opaque)} 48 | 49 | \item{hover}{logical - should a hover tool be added to show the count in each hexagon?} 50 | } 51 | \description{ 52 | Add a "hexbin" layer to a Bokeh figure 53 | } 54 | \examples{ 55 | \donttest{ 56 | figure() \%>\% ly_hexbin(rnorm(10000), rnorm(10000)) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /man/ly_image.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_image.R 3 | \name{ly_image} 4 | \alias{ly_image} 5 | \title{Add an "image" layer to a Bokeh figure} 6 | \usage{ 7 | ly_image( 8 | fig, 9 | z, 10 | rows, 11 | byrow = TRUE, 12 | x = 0, 13 | y = 0, 14 | dw = 1, 15 | dh = 1, 16 | palette = "Spectral10", 17 | dilate = FALSE, 18 | lname = NULL, 19 | lgroup = NULL 20 | ) 21 | } 22 | \arguments{ 23 | \item{fig}{figure to modify} 24 | 25 | \item{z}{matrix or vector of image values} 26 | 27 | \item{rows}{if \code{z} is a vector, how many rows should be used in treating it as a matrix} 28 | 29 | \item{byrow}{if \code{z} is a vector, should it be turned into a matrix by row} 30 | 31 | \item{x}{lower left x coordinates} 32 | 33 | \item{y}{lower left y coordinates} 34 | 35 | \item{dw}{image width distances} 36 | 37 | \item{dh}{image height distances} 38 | 39 | \item{palette}{name of color palette to use for color ramp (see \href{https://docs.bokeh.org/en/latest/docs/reference/palettes.html}{here} for acceptable values)} 40 | 41 | \item{dilate}{logical - whether to dilate pixel distance computations when drawing} 42 | 43 | \item{lname}{layer name} 44 | 45 | \item{lgroup}{layer group} 46 | } 47 | \description{ 48 | Draws a grid of rectangles with colors corresponding to the values in \code{z} 49 | } 50 | \examples{ 51 | \donttest{ 52 | p <- figure(xlim = c(0, 1), ylim = c(0, 1), title = "Volcano") \%>\% 53 | ly_image(volcano) \%>\% 54 | ly_contour(volcano) 55 | p 56 | } 57 | } 58 | \seealso{ 59 | Other layer functions: 60 | \code{\link{ly_abline}()}, 61 | \code{\link{ly_annular_wedge}()}, 62 | \code{\link{ly_annulus}()}, 63 | \code{\link{ly_arc}()}, 64 | \code{\link{ly_bar}()}, 65 | \code{\link{ly_bezier}()}, 66 | \code{\link{ly_boxplot}()}, 67 | \code{\link{ly_contour}()}, 68 | \code{\link{ly_crect}()}, 69 | \code{\link{ly_curve}()}, 70 | \code{\link{ly_density}()}, 71 | \code{\link{ly_hist}()}, 72 | \code{\link{ly_image_url}()}, 73 | \code{\link{ly_lines}()}, 74 | \code{\link{ly_map}()}, 75 | \code{\link{ly_multi_line}()}, 76 | \code{\link{ly_oval}()}, 77 | \code{\link{ly_patch}()}, 78 | \code{\link{ly_points}()}, 79 | \code{\link{ly_polygons}()}, 80 | \code{\link{ly_quadratic}()}, 81 | \code{\link{ly_quantile}()}, 82 | \code{\link{ly_ray}()}, 83 | \code{\link{ly_rect}()}, 84 | \code{\link{ly_segments}()}, 85 | \code{\link{ly_text}()}, 86 | \code{\link{ly_wedge}()} 87 | } 88 | \concept{layer functions} 89 | -------------------------------------------------------------------------------- /man/ly_image_url.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_image.R 3 | \name{ly_image_url} 4 | \alias{ly_image_url} 5 | \title{Add an "image_url" layer to a Bokeh figure} 6 | \usage{ 7 | ly_image_url( 8 | fig, 9 | x = 0, 10 | y = 0, 11 | data = figure_data(fig), 12 | w = 10, 13 | h = 10, 14 | image_url, 15 | dilate = TRUE, 16 | anchor = "top_left", 17 | angle = 0, 18 | lname = NULL, 19 | lgroup = NULL 20 | ) 21 | } 22 | \arguments{ 23 | \item{fig}{figure to modify} 24 | 25 | \item{x}{x coordinates} 26 | 27 | \item{y}{y coordinates} 28 | 29 | \item{data}{an optional data frame, providing the source for inputs x, y, and other properties} 30 | 31 | \item{w, h}{values or field names of width and height of image} 32 | 33 | \item{image_url}{values or field name of image URLs} 34 | 35 | \item{dilate}{logical - whether to dilate pixel distance computations when drawing} 36 | 37 | \item{anchor}{where the image is anchored to with respect to \code{x} and \code{y}} 38 | 39 | \item{angle}{values or field name of the angle to rotate the image, in radians} 40 | 41 | \item{lname}{layer name} 42 | 43 | \item{lgroup}{layer group} 44 | } 45 | \description{ 46 | Renders raster images from URLs at provided coordinates 47 | } 48 | \examples{ 49 | \donttest{ 50 | url <- c(" http://bokeh.pydata.org/en/latest/_static/images/logo.png", 51 | "http://developer.r-project.org/Logo/Rlogo-4.png") 52 | 53 | ss <- seq(0, 2*pi, length = 13)[-1] 54 | ws <- runif(12, 2.5, 5) * rep(c(1, 0.8), 6) 55 | 56 | imgdat <- data.frame( 57 | x = sin(ss) * 10, y = cos(ss) * 10, 58 | w = ws, h = ws * rep(c(1, 0.76), 6), 59 | url = rep(url, 6) 60 | ) 61 | 62 | p <- figure(xlab = "x", ylab = "y") \%>\% 63 | ly_image_url(x, y, w = w, h = h, image_url = url, data = imgdat, 64 | anchor = "center") \%>\% 65 | ly_lines(sin(c(ss, ss[1])) * 10, cos(c(ss, ss[1])) * 10, 66 | width = 15, alpha = 0.1) 67 | p 68 | } 69 | } 70 | \seealso{ 71 | Other layer functions: 72 | \code{\link{ly_abline}()}, 73 | \code{\link{ly_annular_wedge}()}, 74 | \code{\link{ly_annulus}()}, 75 | \code{\link{ly_arc}()}, 76 | \code{\link{ly_bar}()}, 77 | \code{\link{ly_bezier}()}, 78 | \code{\link{ly_boxplot}()}, 79 | \code{\link{ly_contour}()}, 80 | \code{\link{ly_crect}()}, 81 | \code{\link{ly_curve}()}, 82 | \code{\link{ly_density}()}, 83 | \code{\link{ly_hist}()}, 84 | \code{\link{ly_image}()}, 85 | \code{\link{ly_lines}()}, 86 | \code{\link{ly_map}()}, 87 | \code{\link{ly_multi_line}()}, 88 | \code{\link{ly_oval}()}, 89 | \code{\link{ly_patch}()}, 90 | \code{\link{ly_points}()}, 91 | \code{\link{ly_polygons}()}, 92 | \code{\link{ly_quadratic}()}, 93 | \code{\link{ly_quantile}()}, 94 | \code{\link{ly_ray}()}, 95 | \code{\link{ly_rect}()}, 96 | \code{\link{ly_segments}()}, 97 | \code{\link{ly_text}()}, 98 | \code{\link{ly_wedge}()} 99 | } 100 | \concept{layer functions} 101 | -------------------------------------------------------------------------------- /man/ly_multi_line.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer_lines.R 3 | \name{ly_multi_line} 4 | \alias{ly_multi_line} 5 | \title{Add a "multi_line" layer to a Bokeh figure} 6 | \usage{ 7 | ly_multi_line( 8 | fig, 9 | xs, 10 | ys, 11 | color = "black", 12 | alpha = 1, 13 | width = 1, 14 | type = 1, 15 | lname = NULL, 16 | lgroup = NULL, 17 | ... 18 | ) 19 | } 20 | \arguments{ 21 | \item{fig}{figure to modify} 22 | 23 | \item{xs}{list of vectors of x coordinates} 24 | 25 | \item{ys}{list of vectors of y coordinates} 26 | 27 | \item{color}{color to use to stroke lines with - a hex code (with no alpha) or any of the 147 named CSS colors, e.g 'green', 'indigo'} 28 | 29 | \item{alpha}{transparency value for the line between 0 (transparent) and 1 (opaque)} 30 | 31 | \item{width}{stroke width in units of pixels} 32 | 33 | \item{type}{an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use} 34 | 35 | \item{lname}{layer name} 36 | 37 | \item{lgroup}{layer group} 38 | 39 | \item{\ldots}{additional parameters for fine control over line properties (see "Additional parameters" below)} 40 | } 41 | \description{ 42 | Draws multiple lines with the given lists of coordinates. 43 | } 44 | \section{Additional parameters}{ 45 | 46 | \tabular{ll}{ 47 | \code{line_join} \tab how path segments should be joined together 'miter' 'round' 'bevel' \cr 48 | \code{line_cap} \tab how path segments should be terminated 'butt' 'round' 'square' \cr 49 | \code{line_dash} \tab an integer between 1 and 6 matching the \code{lty} property in \code{\link[graphics]{par}} or an array of integer pixel distances that describe the on-off pattern of dashing to use \cr 50 | \code{line_dash_offset} \tab the distance in pixels into the line_dash that the pattern should start from 51 | } 52 | } 53 | 54 | \seealso{ 55 | Other layer functions: 56 | \code{\link{ly_abline}()}, 57 | \code{\link{ly_annular_wedge}()}, 58 | \code{\link{ly_annulus}()}, 59 | \code{\link{ly_arc}()}, 60 | \code{\link{ly_bar}()}, 61 | \code{\link{ly_bezier}()}, 62 | \code{\link{ly_boxplot}()}, 63 | \code{\link{ly_contour}()}, 64 | \code{\link{ly_crect}()}, 65 | \code{\link{ly_curve}()}, 66 | \code{\link{ly_density}()}, 67 | \code{\link{ly_hist}()}, 68 | \code{\link{ly_image_url}()}, 69 | \code{\link{ly_image}()}, 70 | \code{\link{ly_lines}()}, 71 | \code{\link{ly_map}()}, 72 | \code{\link{ly_oval}()}, 73 | \code{\link{ly_patch}()}, 74 | \code{\link{ly_points}()}, 75 | \code{\link{ly_polygons}()}, 76 | \code{\link{ly_quadratic}()}, 77 | \code{\link{ly_quantile}()}, 78 | \code{\link{ly_ray}()}, 79 | \code{\link{ly_rect}()}, 80 | \code{\link{ly_segments}()}, 81 | \code{\link{ly_text}()}, 82 | \code{\link{ly_wedge}()} 83 | } 84 | \concept{layer functions} 85 | -------------------------------------------------------------------------------- /man/nyctaxihex.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/rbokeh-package.R 3 | \docType{data} 4 | \name{nyctaxihex} 5 | \alias{nyctaxihex} 6 | \title{Hexagon binned counts of NYC taxi pickup locations} 7 | \usage{ 8 | nyctaxihex 9 | } 10 | \description{ 11 | Counts of NYC taxi pickups by location for January 2013, obtained from \href{https://chriswhong.com/open-data/foil_nyc_taxi/}{here}. 12 | } 13 | \examples{ 14 | \dontrun{ 15 | gmap(title = "NYC taxi pickups January 2013", 16 | lat = 40.74, lng = -73.95, zoom = 11, 17 | map_type = "roadmap", width = 1000, height = 800) \%>\% 18 | ly_hexbin(nyctaxihex, alpha = 0.5, 19 | palette = "Spectral10", trans = log, inv = exp) 20 | } 21 | } 22 | \keyword{data} 23 | -------------------------------------------------------------------------------- /man/palettes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/theme_palettes.R 3 | \name{pal_color} 4 | \alias{pal_color} 5 | \alias{pal_tableau} 6 | \alias{pal_bk_glyph} 7 | \alias{pal_gradient} 8 | \alias{pal_size} 9 | \alias{pal_bk_line_dash} 10 | \alias{pal_bk_line_width} 11 | \title{Palettes for themes} 12 | \usage{ 13 | pal_color(colors) 14 | 15 | pal_tableau(pal = "Tableau10") 16 | 17 | pal_bk_glyph() 18 | 19 | pal_gradient( 20 | cols = c("#66C2A4", "#41AE76", "#238B45", "#006D2C", "#00441B"), 21 | space = "rgb" 22 | ) 23 | 24 | pal_size(min = 2, max = 20) 25 | 26 | pal_bk_line_dash() 27 | 28 | pal_bk_line_width() 29 | } 30 | \arguments{ 31 | \item{colors}{a vector of colors to be used in the color palette} 32 | 33 | \item{pal}{palette name} 34 | 35 | \item{cols}{a vector of colors to ramp across for a continuous palette} 36 | 37 | \item{space}{passed on to \code{\link{colorRampPalette}[grDevices]}} 38 | 39 | \item{min}{minimum value} 40 | 41 | \item{max}{maximum value} 42 | } 43 | \description{ 44 | Palettes for themes 45 | 46 | Palettes for themes 47 | } 48 | -------------------------------------------------------------------------------- /man/phantom_install.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/output_save.R 3 | \name{phantom_install} 4 | \alias{phantom_install} 5 | \title{Instructions for installing phantomjs} 6 | \usage{ 7 | phantom_install() 8 | } 9 | \description{ 10 | Instructions for installing phantomjs 11 | } 12 | -------------------------------------------------------------------------------- /man/pipe.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/rbokeh-package.R 3 | \name{\%>\%} 4 | \alias{\%>\%} 5 | \title{Pipe figures} 6 | \arguments{ 7 | \item{lhs}{a Bokeh figure} 8 | 9 | \item{rhs}{a layer to add to the figure} 10 | } 11 | \description{ 12 | Pipe figures 13 | } 14 | -------------------------------------------------------------------------------- /man/point_types.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/point_types.R 3 | \name{point_types} 4 | \alias{point_types} 5 | \title{Display glyph types available for ly_points()} 6 | \usage{ 7 | point_types(size = 25, color = "blue", width = 800, height = 450) 8 | } 9 | \arguments{ 10 | \item{size}{size of the glyph} 11 | 12 | \item{color}{color to use for line and fill properties} 13 | 14 | \item{width, height}{dimensions of output plot} 15 | } 16 | \description{ 17 | Display glyph types available for ly_points() 18 | } 19 | \examples{ 20 | point_types() 21 | } 22 | -------------------------------------------------------------------------------- /man/print_model_json.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/output_json.R 3 | \name{print_model_json} 4 | \alias{print_model_json} 5 | \title{Print the JSON of a Bokeh figure} 6 | \usage{ 7 | print_model_json(fig, prepare = TRUE, pretty = TRUE, file = "", pbcopy = FALSE) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to print} 11 | 12 | \item{prepare}{logical - should the figure be sent through preparations that need to be done prior to plotting (TRUE), or printed as-is (FALSE)} 13 | 14 | \item{pretty}{parameter passed on to \code{\link[jsonlite]{toJSON}}} 15 | 16 | \item{file}{parameter passed on to \code{\link[base]{cat}}} 17 | 18 | \item{pbcopy}{logical - if on OSX, should the results be passed to the clipboard (TRUE) instead of printed to the screen (FALSE)?} 19 | } 20 | \description{ 21 | Print the JSON of a Bokeh figure 22 | } 23 | \examples{ 24 | \dontrun{ 25 | p <- figure() \%>\% ly_points(1:10) \%>\% 26 | tool_pan(dimensions = "height") 27 | print_model_json(p) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /man/rbokeh-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/rbokeh-package.R 3 | \docType{package} 4 | \name{rbokeh-package} 5 | \alias{rbokeh-package} 6 | \alias{rbokeh} 7 | \title{rbokeh: R interface for Bokeh} 8 | \description{ 9 | R interface for creating plots in Bokeh. Bokeh by Continuum Analytics, \url{https://docs.bokeh.org/en/latest/} 10 | } 11 | \details{ 12 | For full documentation on the package, visit \url{https://hafen.github.io/rbokeh/} 13 | } 14 | -------------------------------------------------------------------------------- /man/rbokeh2html.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/output_html.R 3 | \name{rbokeh2html} 4 | \alias{rbokeh2html} 5 | \title{Get the HTML content required to embed a Bokeh figure} 6 | \usage{ 7 | rbokeh2html( 8 | fig, 9 | file = tempfile(fileext = ".html"), 10 | pretty = FALSE, 11 | secure = TRUE 12 | ) 13 | } 14 | \arguments{ 15 | \item{fig}{figure} 16 | 17 | \item{file}{html file name to write the figure to} 18 | 19 | \item{pretty}{should the json model be pretty printed to the html file?} 20 | 21 | \item{secure}{should https be used for cdn links?} 22 | } 23 | \description{ 24 | Get the HTML content required to embed a Bokeh figure 25 | } 26 | \examples{ 27 | p <- figure() \%>\% ly_points(1:10) 28 | rbokeh2html(p) 29 | } 30 | -------------------------------------------------------------------------------- /man/rbokehOutput.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/shiny.R 3 | \name{rbokehOutput} 4 | \alias{rbokehOutput} 5 | \title{Widget output function for use in Shiny} 6 | \usage{ 7 | rbokehOutput(outputId, width = "100\%", height = "400px") 8 | } 9 | \arguments{ 10 | \item{outputId}{output variable to read from} 11 | 12 | \item{width}{a valid CSS unit for the width or a number, which will be coerced to a string and have "px" appended.} 13 | 14 | \item{height}{a valid CSS unit for the height or a number, which will be coerced to a string and have "px" appended.} 15 | } 16 | \description{ 17 | Widget output function for use in Shiny 18 | } 19 | \examples{ 20 | \dontrun{ 21 | library("shiny") 22 | library("rbokeh") 23 | 24 | ui <- fluidPage( 25 | rbokehOutput("rbokeh") 26 | ) 27 | 28 | server <- function(input, output, session) { 29 | output$rbokeh <- renderRbokeh({ 30 | # Use invalidateLater() and jitter() to add some motion 31 | invalidateLater(1000, session) 32 | figure() \%>\% 33 | ly_points(jitter(cars$speed), jitter(cars$dist)) 34 | }) 35 | } 36 | 37 | shinyApp(ui, server) 38 | 39 | 40 | library("shiny") 41 | library("rbokeh") 42 | 43 | ui <- fluidPage( 44 | rbokehOutput("rbokeh", width = 500, height = 540), 45 | textOutput("x_range_text") 46 | ) 47 | 48 | server <- function(input, output, session) { 49 | output$rbokeh <- renderRbokeh({ 50 | figure() \%>\% ly_points(1:10) \%>\% 51 | x_range(callback = shiny_callback("x_range")) 52 | }) 53 | 54 | output$x_range_text <- reactive({ 55 | xrng <- input$x_range 56 | if(!is.null(xrng)) { 57 | paste0("factors: ", xrng$factors, ", start: ", xrng$start, 58 | ", end: ", xrng$end) 59 | } else { 60 | "waiting for axis event..." 61 | } 62 | }) 63 | } 64 | 65 | shinyApp(ui, server) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /man/renderRbokeh.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/shiny.R 3 | \name{renderRbokeh} 4 | \alias{renderRbokeh} 5 | \title{Widget render function for use in Shiny} 6 | \usage{ 7 | renderRbokeh(expr, env = parent.frame(), quoted = FALSE) 8 | } 9 | \arguments{ 10 | \item{expr}{an expression that generates a rbokeh figure} 11 | 12 | \item{env}{the environment in which to evaluate expr.} 13 | 14 | \item{quoted}{is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.} 15 | } 16 | \description{ 17 | Widget render function for use in Shiny 18 | } 19 | \seealso{ 20 | \code{\link{rbokehOutput}} for an example in Shiny 21 | } 22 | -------------------------------------------------------------------------------- /man/set_theme.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/themes.R 3 | \name{set_theme} 4 | \alias{set_theme} 5 | \title{Set the theme for a figure} 6 | \usage{ 7 | set_theme(fig, theme) 8 | } 9 | \arguments{ 10 | \item{fig}{a figure to set the theme for} 11 | 12 | \item{theme}{theme} 13 | } 14 | \description{ 15 | Set the theme for a figure 16 | } 17 | \examples{ 18 | \donttest{ 19 | # manually specify a ggplot-like grid and background 20 | figure() \%>\% 21 | ly_points(1:10) \%>\% 22 | theme_plot(background_fill_color = "#E6E6E6", 23 | outline_line_color = "white") \%>\% 24 | theme_grid(c("x", "y"), grid_line_color = "white", 25 | minor_grid_line_color = "white", 26 | minor_grid_line_alpha = 0.4) \%>\% 27 | theme_axis(c("x", "y"), axis_line_color = "white", 28 | major_label_text_color = "#7F7F7F", 29 | major_tick_line_color = "#7F7F7F", 30 | minor_tick_line_alpha = 0, num_minor_ticks = 2) 31 | 32 | # or use the built in ggplot theme (under development) 33 | figure(data = iris, legend = "top_left", tools = NULL) \%>\% 34 | ly_points(Sepal.Length, Petal.Length, color = Species) \%>\% 35 | set_theme(bk_ggplot_theme) 36 | } 37 | \dontrun{ 38 | # or to set the theme for all future plots 39 | options(bokeh_theme = bk_ggplot_theme) 40 | 41 | figure() \%>\% 42 | ly_points(1:10) 43 | 44 | figure() \%>\% 45 | ly_boxplot(1:10) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /man/shiny_callback.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_callback.R 3 | \name{shiny_callback} 4 | \alias{shiny_callback} 5 | \title{Specify a Shiny callback} 6 | \usage{ 7 | shiny_callback(id) 8 | } 9 | \arguments{ 10 | \item{id}{a name that will be made available in your Shiny app as \code{input$id}} 11 | } 12 | \description{ 13 | Specify a Shiny callback 14 | } 15 | \note{ 16 | Depending on the type of callback you are using (selection, range, hover, tap), the value of \code{input$id} will change. The best way to get familiar with what to expect as these values is to debug inside your Shiny app and inspect the contents. You can also use \code{\link{custom_callback}} to write your own custom callbacks that can register other data in your Shiny app. To see what the callbacks look like for each callback type, see, for example, the contents of \code{rbokeh:::handle_range_callback.shinyCallback} 17 | } 18 | -------------------------------------------------------------------------------- /man/sub_names.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/layer__utils.R 3 | \name{sub_names} 4 | \alias{sub_names} 5 | \title{Retrieve and properly parse all data} 6 | \usage{ 7 | sub_names(fig, data, arg_obj, process_data_and_names = TRUE) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to be used} 11 | 12 | \item{data}{data to be used} 13 | 14 | \item{arg_obj}{args object supplied by \code{grab}} 15 | 16 | \item{process_data_and_names}{boolean to determine if the data and x_name and y_name should be post processed} 17 | } 18 | \value{ 19 | list of three groups: data, info, and params 20 | } 21 | \description{ 22 | Retrieve and properly parse all data 23 | } 24 | -------------------------------------------------------------------------------- /man/theme_grid.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/theme_grid.R 3 | \name{theme_grid} 4 | \alias{theme_grid} 5 | \title{Override theme parameters for grid attributes} 6 | \usage{ 7 | theme_grid( 8 | fig, 9 | which = c("x", "y"), 10 | band_fill_alpha = 1, 11 | band_fill_color = "gray", 12 | grid_line_alpha = 1, 13 | grid_line_cap = "butt", 14 | grid_line_color = "black", 15 | grid_line_dash = NULL, 16 | grid_line_dash_offset = 0, 17 | grid_line_join = "miter", 18 | grid_line_width = 1, 19 | minor_grid_line_alpha = 1, 20 | minor_grid_line_cap = "butt", 21 | minor_grid_line_color = "black", 22 | minor_grid_line_dash = NULL, 23 | minor_grid_line_dash_offset = 0, 24 | minor_grid_line_join = "miter", 25 | minor_grid_line_width = 1, 26 | pars = NULL 27 | ) 28 | } 29 | \arguments{ 30 | \item{fig}{figure to modify} 31 | 32 | \item{which}{which grids to apply attributes to ("x" and/or "y")} 33 | 34 | \item{band_fill_alpha}{The fill alpha of alternating bands between Grid lines.} 35 | 36 | \item{band_fill_color}{The fill color of alternating bands between Grid lines.} 37 | 38 | \item{grid_line_alpha}{The line alpha of the Grid lines.} 39 | 40 | \item{grid_line_cap}{('butt', 'round', 'square') The line cap of the Grid lines.} 41 | 42 | \item{grid_line_color}{The line color of the Grid lines.} 43 | 44 | \item{grid_line_dash}{The line dash of the Grid lines.} 45 | 46 | \item{grid_line_dash_offset}{The line dash offset of the Grid lines.} 47 | 48 | \item{grid_line_join}{('miter', 'round', 'bevel') The line join of the Grid lines.} 49 | 50 | \item{grid_line_width}{The line width of the Grid lines.} 51 | 52 | \item{minor_grid_line_alpha}{The line alpha of the minor Grid lines.} 53 | 54 | \item{minor_grid_line_cap}{('butt', 'round', 'square') The line cap of the minor Grid lines.} 55 | 56 | \item{minor_grid_line_color}{The line color of the minor Grid lines.} 57 | 58 | \item{minor_grid_line_dash}{The line dash of the minor Grid lines.} 59 | 60 | \item{minor_grid_line_dash_offset}{The line dash offset of the minor Grid lines.} 61 | 62 | \item{minor_grid_line_join}{('miter', 'round', 'bevel') The line join of the minor Grid lines.} 63 | 64 | \item{minor_grid_line_width}{The line width of the minor Grid lines.} 65 | 66 | \item{pars}{optionally specify a named list of all parameters - useful when dealing with theme lists} 67 | } 68 | \description{ 69 | Override theme parameters for grid attributes 70 | } 71 | \examples{ 72 | \donttest{ 73 | # manually specify a ggplot-like grid and background 74 | figure() \%>\% 75 | ly_points(1:10) \%>\% 76 | theme_plot(background_fill_color = "#E6E6E6", 77 | outline_line_color = "white") \%>\% 78 | theme_grid(c("x", "y"), grid_line_color = "white", 79 | minor_grid_line_color = "white", 80 | minor_grid_line_alpha = 0.4) \%>\% 81 | theme_axis(c("x", "y"), axis_line_color = "white", 82 | major_label_text_color = "#7F7F7F", 83 | major_tick_line_color = "#7F7F7F", 84 | minor_tick_line_alpha = 0, num_minor_ticks = 2) 85 | 86 | # or use the built in ggplot theme (under development) 87 | figure(data = iris, legend = "top_left", tools = NULL) \%>\% 88 | ly_points(Sepal.Length, Petal.Length, color = Species) \%>\% 89 | set_theme(bk_ggplot_theme) 90 | } 91 | \dontrun{ 92 | # or to set the theme for all future plots 93 | options(bokeh_theme = bk_ggplot_theme) 94 | 95 | figure() \%>\% 96 | ly_points(1:10) 97 | 98 | figure() \%>\% 99 | ly_boxplot(1:10) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /man/theme_legend.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/theme_legend.R 3 | \name{theme_legend} 4 | \alias{theme_legend} 5 | \title{Override theme parameters for legend attributes} 6 | \usage{ 7 | theme_legend( 8 | fig, 9 | background_fill_alpha = 0.95, 10 | background_fill_color = "#fff", 11 | border_line_alpha = 0.5, 12 | border_line_cap = "butt", 13 | border_line_color = "black", 14 | border_line_dash = NULL, 15 | border_line_dash_offset = 0, 16 | border_line_join = "miter", 17 | border_line_width = 1, 18 | glyph_height = 20, 19 | glyph_width = 20, 20 | label_height = 20, 21 | label_standoff = 15, 22 | label_text_align = "left", 23 | label_text_alpha = 1, 24 | label_text_baseline = "bottom", 25 | label_text_color = "#444444", 26 | label_text_font = "Helvetica", 27 | label_text_font_size = "12pt", 28 | label_text_font_style = "normal", 29 | label_width = 50, 30 | legend_padding = 10, 31 | legend_spacing = 3, 32 | pars = NULL 33 | ) 34 | } 35 | \arguments{ 36 | \item{fig}{figure to modify} 37 | 38 | \item{background_fill_alpha}{(numeric) background color alpha of plot} 39 | 40 | \item{background_fill_color}{(color) background color of plot} 41 | 42 | \item{border_line_alpha}{The line alpha for the legend border outline.} 43 | 44 | \item{border_line_cap}{('butt', 'round', 'square') The line cap for the legend border outline.} 45 | 46 | \item{border_line_color}{The line color for the legend border outline.} 47 | 48 | \item{border_line_dash}{The line dash for the legend border outline.} 49 | 50 | \item{border_line_dash_offset}{The line dash offset for the legend border outline.} 51 | 52 | \item{border_line_join}{('miter', 'round', 'bevel') The line join for the legend border outline.} 53 | 54 | \item{border_line_width}{The line width for the legend border outline.} 55 | 56 | \item{glyph_height}{The height (in pixels) that the rendered legend glyph should occupy.} 57 | 58 | \item{glyph_width}{The width (in pixels) that the rendered legend glyph should occupy.} 59 | 60 | \item{label_height}{The height (in pixels) of the area that legend labels should occupy.} 61 | 62 | \item{label_standoff}{The distance (in pixels) to separate the label from its associated glyph.} 63 | 64 | \item{label_text_align}{('left', 'right', 'center') The text align for the legend labels.} 65 | 66 | \item{label_text_alpha}{The text alpha for the legend labels.} 67 | 68 | \item{label_text_baseline}{('top', 'middle', 'bottom', 'alphabetic', 'hanging') The text baseline for the legend labels.} 69 | 70 | \item{label_text_color}{The text color for the legend labels.} 71 | 72 | \item{label_text_font}{The text font for the legend labels.} 73 | 74 | \item{label_text_font_size}{The text font size for the legend labels.} 75 | 76 | \item{label_text_font_style}{('normal', 'italic', 'bold') The text font style for the legend labels.} 77 | 78 | \item{label_width}{The width (in pixels) of the area that legend labels should occupy.} 79 | 80 | \item{legend_padding}{Amount of padding around the legend.} 81 | 82 | \item{legend_spacing}{Amount of spacing between legend entries.} 83 | 84 | \item{pars}{optionally specify a named list of all parameters - useful when dealing with theme lists} 85 | } 86 | \description{ 87 | Override theme parameters for legend attributes 88 | } 89 | \examples{ 90 | figure(legend_location = "top_left") \%>\% 91 | ly_points(1:10, legend = "a") \%>\% 92 | theme_legend(border_line_width = 2) 93 | } 94 | -------------------------------------------------------------------------------- /man/theme_title.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/theme_title.R 3 | \name{theme_title} 4 | \alias{theme_title} 5 | \title{Override theme parameters for general plot attributes} 6 | \usage{ 7 | theme_title( 8 | fig, 9 | pars = NULL, 10 | background_fill_color = "white", 11 | background_fill_alpha = 1, 12 | border_fill_color = "white", 13 | border_fill_alpha = 1, 14 | align = "left", 15 | text_alpha = 1, 16 | text_baseline = "bottom", 17 | text_color = "#444444", 18 | text_font = "Helvetica", 19 | text_font_size = "12pt", 20 | text_font_style = "normal" 21 | ) 22 | } 23 | \arguments{ 24 | \item{fig}{figure to modify} 25 | 26 | \item{pars}{optionally specify a named list of all parameters - useful when dealing with theme lists} 27 | 28 | \item{background_fill_color}{(color) background color of plot} 29 | 30 | \item{background_fill_alpha}{(numeric) background color alpha of plot} 31 | 32 | \item{border_fill_color}{(color) fill color of border area of plot} 33 | 34 | \item{border_fill_alpha}{(numeric) fill color alpha of border area of plot} 35 | 36 | \item{align}{('left', 'right', 'center') The text align for the plot title.} 37 | 38 | \item{text_alpha}{The text alpha for the plot title.} 39 | 40 | \item{text_baseline}{('top', 'middle', 'bottom', 'alphabetic', 'hanging') The text baseline for the plot title.} 41 | 42 | \item{text_color}{(color) The text color for the plot title.} 43 | 44 | \item{text_font}{(string) The text font for the plot title.} 45 | 46 | \item{text_font_size}{(string - e.g. '12pt') The text font size for the plot title.} 47 | 48 | \item{text_font_style}{('normal', 'italic', 'bold') The text font style for the plot title.} 49 | } 50 | \description{ 51 | Override theme parameters for general plot attributes 52 | } 53 | \examples{ 54 | figure(title = "asdf") \%>\% 55 | ly_points(1:10) \%>\% 56 | theme_title(text_color = "red") 57 | } 58 | -------------------------------------------------------------------------------- /man/themes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/themes.R 3 | \name{bk_default_theme} 4 | \alias{bk_default_theme} 5 | \alias{bk_ggplot_theme} 6 | \title{Themes} 7 | \usage{ 8 | bk_default_theme() 9 | 10 | bk_ggplot_theme() 11 | } 12 | \description{ 13 | Themes 14 | 15 | Themes 16 | } 17 | -------------------------------------------------------------------------------- /man/tool_box_select.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_box_select} 4 | \alias{tool_box_select} 5 | \title{Add "box_select" tool to a Bokeh figure} 6 | \usage{ 7 | tool_box_select( 8 | fig, 9 | callback = NULL, 10 | ref_layer = NULL, 11 | line_color = "black", 12 | line_alpha = 1, 13 | fill_color = "lightgrey", 14 | fill_alpha = 0.5, 15 | line_width = 2, 16 | line_dash = c(4, 4), 17 | level = "overlay" 18 | ) 19 | } 20 | \arguments{ 21 | \item{fig}{figure to modify} 22 | 23 | \item{callback}{a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}}} 24 | 25 | \item{ref_layer}{name of the layer that the callback should be applied to} 26 | 27 | \item{line_color, line_alpha, fill_color, fill_alpha, line_width, line_dash, level}{parameters to control the look of the selection bounding region} 28 | } 29 | \description{ 30 | Add "box_select" tool to a Bokeh figure 31 | } 32 | \note{ 33 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 34 | } 35 | \examples{ 36 | \donttest{ 37 | figure() \%>\% ly_points(1:10) \%>\% 38 | tool_box_select() 39 | } 40 | } 41 | \seealso{ 42 | Other tools: 43 | \code{\link{tool_box_zoom}()}, 44 | \code{\link{tool_crosshair}()}, 45 | \code{\link{tool_hover}()}, 46 | \code{\link{tool_lasso_select}()}, 47 | \code{\link{tool_pan}()}, 48 | \code{\link{tool_reset}()}, 49 | \code{\link{tool_resize}()}, 50 | \code{\link{tool_save}()}, 51 | \code{\link{tool_tap}()}, 52 | \code{\link{tool_wheel_zoom}()} 53 | } 54 | \concept{tools} 55 | -------------------------------------------------------------------------------- /man/tool_box_zoom.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_box_zoom} 4 | \alias{tool_box_zoom} 5 | \title{Add "box_zoom" tool to a Bokeh figure} 6 | \usage{ 7 | tool_box_zoom( 8 | fig, 9 | line_color = "black", 10 | line_alpha = 1, 11 | fill_color = "lightgrey", 12 | fill_alpha = 0.5, 13 | line_width = 2, 14 | line_dash = c(4, 4), 15 | level = "overlay" 16 | ) 17 | } 18 | \arguments{ 19 | \item{fig}{figure to modify} 20 | 21 | \item{line_color, line_alpha, fill_color, fill_alpha, line_width, line_dash, level}{parameters to control the look of the selection bounding region} 22 | } 23 | \description{ 24 | Add "box_zoom" tool to a Bokeh figure 25 | } 26 | \note{ 27 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 28 | } 29 | \examples{ 30 | \donttest{ 31 | figure() \%>\% ly_points(1:10) \%>\% 32 | tool_box_zoom() 33 | } 34 | } 35 | \seealso{ 36 | Other tools: 37 | \code{\link{tool_box_select}()}, 38 | \code{\link{tool_crosshair}()}, 39 | \code{\link{tool_hover}()}, 40 | \code{\link{tool_lasso_select}()}, 41 | \code{\link{tool_pan}()}, 42 | \code{\link{tool_reset}()}, 43 | \code{\link{tool_resize}()}, 44 | \code{\link{tool_save}()}, 45 | \code{\link{tool_tap}()}, 46 | \code{\link{tool_wheel_zoom}()} 47 | } 48 | \concept{tools} 49 | -------------------------------------------------------------------------------- /man/tool_crosshair.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_crosshair} 4 | \alias{tool_crosshair} 5 | \title{Add "crosshair" tool to a Bokeh figure} 6 | \usage{ 7 | tool_crosshair(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | } 12 | \description{ 13 | Add "crosshair" tool to a Bokeh figure 14 | } 15 | \note{ 16 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 17 | } 18 | \examples{ 19 | \donttest{ 20 | figure() \%>\% ly_points(1:10) \%>\% 21 | tool_crosshair() 22 | } 23 | } 24 | \seealso{ 25 | Other tools: 26 | \code{\link{tool_box_select}()}, 27 | \code{\link{tool_box_zoom}()}, 28 | \code{\link{tool_hover}()}, 29 | \code{\link{tool_lasso_select}()}, 30 | \code{\link{tool_pan}()}, 31 | \code{\link{tool_reset}()}, 32 | \code{\link{tool_resize}()}, 33 | \code{\link{tool_save}()}, 34 | \code{\link{tool_tap}()}, 35 | \code{\link{tool_wheel_zoom}()} 36 | } 37 | \concept{tools} 38 | -------------------------------------------------------------------------------- /man/tool_hover.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_hover} 4 | \alias{tool_hover} 5 | \title{Add "hover" tool to a Bokeh figure} 6 | \usage{ 7 | tool_hover(fig, callback, ref_layer) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{callback}{a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}}} 13 | 14 | \item{ref_layer}{name of the layer that the callback should be applied to} 15 | } 16 | \description{ 17 | Add "hover" tool to a Bokeh figure 18 | } 19 | \note{ 20 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 21 | } 22 | \examples{ 23 | \donttest{ 24 | # hover over the blue points and make the orange points move 25 | figure(title = "hover a blue point") \%>\% 26 | ly_points(1:10, lname = "blue", lgroup = "g1") \%>\% 27 | ly_points(2:12, lname = "orange", lgroup = "g1") \%>\% 28 | tool_hover(custom_callback( 29 | code = "debugger;if(cb_data.index['1d'].indices.length > 0) 30 | orange_data.get('data').x[cb_data.index['1d'].indices] += 0.1 31 | orange_data.trigger('change')", "orange"), "blue") 32 | } 33 | } 34 | \seealso{ 35 | Other tools: 36 | \code{\link{tool_box_select}()}, 37 | \code{\link{tool_box_zoom}()}, 38 | \code{\link{tool_crosshair}()}, 39 | \code{\link{tool_lasso_select}()}, 40 | \code{\link{tool_pan}()}, 41 | \code{\link{tool_reset}()}, 42 | \code{\link{tool_resize}()}, 43 | \code{\link{tool_save}()}, 44 | \code{\link{tool_tap}()}, 45 | \code{\link{tool_wheel_zoom}()} 46 | } 47 | \concept{tools} 48 | -------------------------------------------------------------------------------- /man/tool_lasso_select.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_lasso_select} 4 | \alias{tool_lasso_select} 5 | \title{Add "lasso_select" tool to a Bokeh figure} 6 | \usage{ 7 | tool_lasso_select( 8 | fig, 9 | callback = NULL, 10 | ref_layer = NULL, 11 | line_color = "black", 12 | line_alpha = 1, 13 | fill_color = "lightgrey", 14 | fill_alpha = 0.5, 15 | line_width = 2, 16 | line_dash = c(4, 4), 17 | level = "overlay" 18 | ) 19 | } 20 | \arguments{ 21 | \item{fig}{figure to modify} 22 | 23 | \item{callback}{a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}}} 24 | 25 | \item{ref_layer}{name of the layer that the callback should be applied to} 26 | 27 | \item{line_color, line_alpha, fill_color, fill_alpha, line_width, line_dash, level}{parameters to control the look of the selection bounding region} 28 | } 29 | \description{ 30 | Add "lasso_select" tool to a Bokeh figure 31 | } 32 | \note{ 33 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 34 | } 35 | \examples{ 36 | \donttest{ 37 | figure() \%>\% ly_points(1:10) \%>\% 38 | tool_lasso_select() 39 | } 40 | } 41 | \seealso{ 42 | Other tools: 43 | \code{\link{tool_box_select}()}, 44 | \code{\link{tool_box_zoom}()}, 45 | \code{\link{tool_crosshair}()}, 46 | \code{\link{tool_hover}()}, 47 | \code{\link{tool_pan}()}, 48 | \code{\link{tool_reset}()}, 49 | \code{\link{tool_resize}()}, 50 | \code{\link{tool_save}()}, 51 | \code{\link{tool_tap}()}, 52 | \code{\link{tool_wheel_zoom}()} 53 | } 54 | \concept{tools} 55 | -------------------------------------------------------------------------------- /man/tool_pan.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_pan} 4 | \alias{tool_pan} 5 | \title{Add "pan" tool to a Bokeh figure} 6 | \usage{ 7 | tool_pan(fig, dimensions = "both") 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{dimensions}{a vector specifying whether the pan tool should pan with respect to the x axis ("width") and the y axis ("height") or "both"} 13 | } 14 | \description{ 15 | Add "pan" tool to a Bokeh figure 16 | } 17 | \note{ 18 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 19 | } 20 | \examples{ 21 | \donttest{ 22 | # only pan on x axis 23 | figure() \%>\% ly_points(1:10) \%>\% 24 | tool_pan(dimensions = "height") 25 | } 26 | } 27 | \seealso{ 28 | Other tools: 29 | \code{\link{tool_box_select}()}, 30 | \code{\link{tool_box_zoom}()}, 31 | \code{\link{tool_crosshair}()}, 32 | \code{\link{tool_hover}()}, 33 | \code{\link{tool_lasso_select}()}, 34 | \code{\link{tool_reset}()}, 35 | \code{\link{tool_resize}()}, 36 | \code{\link{tool_save}()}, 37 | \code{\link{tool_tap}()}, 38 | \code{\link{tool_wheel_zoom}()} 39 | } 40 | \concept{tools} 41 | -------------------------------------------------------------------------------- /man/tool_reset.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_reset} 4 | \alias{tool_reset} 5 | \title{Add "reset" tool to a Bokeh figure} 6 | \usage{ 7 | tool_reset(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | } 12 | \description{ 13 | Add "reset" tool to a Bokeh figure 14 | } 15 | \note{ 16 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 17 | } 18 | \examples{ 19 | \donttest{ 20 | figure() \%>\% ly_points(1:10) \%>\% 21 | tool_reset() 22 | } 23 | } 24 | \seealso{ 25 | Other tools: 26 | \code{\link{tool_box_select}()}, 27 | \code{\link{tool_box_zoom}()}, 28 | \code{\link{tool_crosshair}()}, 29 | \code{\link{tool_hover}()}, 30 | \code{\link{tool_lasso_select}()}, 31 | \code{\link{tool_pan}()}, 32 | \code{\link{tool_resize}()}, 33 | \code{\link{tool_save}()}, 34 | \code{\link{tool_tap}()}, 35 | \code{\link{tool_wheel_zoom}()} 36 | } 37 | \concept{tools} 38 | -------------------------------------------------------------------------------- /man/tool_resize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_resize} 4 | \alias{tool_resize} 5 | \title{Add "resize" tool to a Bokeh figure} 6 | \usage{ 7 | tool_resize(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | } 12 | \description{ 13 | Add "resize" tool to a Bokeh figure 14 | } 15 | \note{ 16 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 17 | } 18 | \examples{ 19 | \donttest{ 20 | figure() \%>\% ly_points(1:10) \%>\% 21 | tool_resize() 22 | } 23 | } 24 | \seealso{ 25 | Other tools: 26 | \code{\link{tool_box_select}()}, 27 | \code{\link{tool_box_zoom}()}, 28 | \code{\link{tool_crosshair}()}, 29 | \code{\link{tool_hover}()}, 30 | \code{\link{tool_lasso_select}()}, 31 | \code{\link{tool_pan}()}, 32 | \code{\link{tool_reset}()}, 33 | \code{\link{tool_save}()}, 34 | \code{\link{tool_tap}()}, 35 | \code{\link{tool_wheel_zoom}()} 36 | } 37 | \concept{tools} 38 | -------------------------------------------------------------------------------- /man/tool_save.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_save} 4 | \alias{tool_save} 5 | \title{Add "save" tool to a Bokeh figure} 6 | \usage{ 7 | tool_save(fig) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | } 12 | \description{ 13 | Add "save" tool to a Bokeh figure 14 | } 15 | \note{ 16 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 17 | } 18 | \examples{ 19 | \donttest{ 20 | figure() \%>\% ly_points(1:10) \%>\% 21 | tool_save() 22 | } 23 | } 24 | \seealso{ 25 | Other tools: 26 | \code{\link{tool_box_select}()}, 27 | \code{\link{tool_box_zoom}()}, 28 | \code{\link{tool_crosshair}()}, 29 | \code{\link{tool_hover}()}, 30 | \code{\link{tool_lasso_select}()}, 31 | \code{\link{tool_pan}()}, 32 | \code{\link{tool_reset}()}, 33 | \code{\link{tool_resize}()}, 34 | \code{\link{tool_tap}()}, 35 | \code{\link{tool_wheel_zoom}()} 36 | } 37 | \concept{tools} 38 | -------------------------------------------------------------------------------- /man/tool_selection.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_selection.R 3 | \name{tool_selection} 4 | \alias{tool_selection} 5 | \title{Add "selection" tool callback to a Bokeh figure} 6 | \usage{ 7 | tool_selection(fig, callback, ref_layer) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{callback}{a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}}} 13 | 14 | \item{ref_layer}{name of the layer that the callback should be applied to} 15 | } 16 | \description{ 17 | This adds a selection callback to be used with the box select or lasso select tools. 18 | } 19 | -------------------------------------------------------------------------------- /man/tool_tap.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_tap} 4 | \alias{tool_tap} 5 | \title{Add "tap" tool to a Bokeh figure} 6 | \usage{ 7 | tool_tap(fig, callback, ref_layer) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{callback}{a callback to be applied to this tool - either a character string of javascript code or any one of \code{\link{debug_callback}}, \code{\link{shiny_callback}}, \code{\link{console_callback}}, \code{\link{custom_callback}}} 13 | 14 | \item{ref_layer}{name of the layer that the callback should be applied to} 15 | } 16 | \description{ 17 | Add "tap" tool to a Bokeh figure 18 | } 19 | \note{ 20 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 21 | } 22 | \examples{ 23 | \donttest{ 24 | figure() \%>\% 25 | ly_points(1:10, lname = "points") \%>\% 26 | tool_tap(debug_callback("points"), "points") 27 | } 28 | } 29 | \seealso{ 30 | Other tools: 31 | \code{\link{tool_box_select}()}, 32 | \code{\link{tool_box_zoom}()}, 33 | \code{\link{tool_crosshair}()}, 34 | \code{\link{tool_hover}()}, 35 | \code{\link{tool_lasso_select}()}, 36 | \code{\link{tool_pan}()}, 37 | \code{\link{tool_reset}()}, 38 | \code{\link{tool_resize}()}, 39 | \code{\link{tool_save}()}, 40 | \code{\link{tool_wheel_zoom}()} 41 | } 42 | \concept{tools} 43 | -------------------------------------------------------------------------------- /man/tool_wheel_zoom.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_tool.R 3 | \name{tool_wheel_zoom} 4 | \alias{tool_wheel_zoom} 5 | \title{Add "wheel_zoom" tool to a Bokeh figure} 6 | \usage{ 7 | tool_wheel_zoom(fig, dimensions = "both") 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{dimensions}{a vector specifying whether the wheel_zoom tool should zoom with respect to the x axis ("width") and the y axis ("height") or "both"} 13 | } 14 | \description{ 15 | Add "wheel_zoom" tool to a Bokeh figure 16 | } 17 | \note{ 18 | Tools can be easily specified as a vector of tool names in the \code{tools} argument when instantiating a \code{\link{figure}}. In this case, they are added with defaults. Explicitly calling these \code{tool_} functions will manually add the tool to a figure and allow additional specification of parameters. 19 | } 20 | \examples{ 21 | \donttest{ 22 | # only zoom on x axis 23 | figure() \%>\% ly_points(1:10) \%>\% 24 | tool_wheel_zoom(dimensions = "height") 25 | } 26 | } 27 | \seealso{ 28 | Other tools: 29 | \code{\link{tool_box_select}()}, 30 | \code{\link{tool_box_zoom}()}, 31 | \code{\link{tool_crosshair}()}, 32 | \code{\link{tool_hover}()}, 33 | \code{\link{tool_lasso_select}()}, 34 | \code{\link{tool_pan}()}, 35 | \code{\link{tool_reset}()}, 36 | \code{\link{tool_resize}()}, 37 | \code{\link{tool_save}()}, 38 | \code{\link{tool_tap}()} 39 | } 40 | \concept{tools} 41 | -------------------------------------------------------------------------------- /man/widget2gist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/output_gist.R 3 | \name{widget2gist} 4 | \alias{widget2gist} 5 | \title{Export htmlwidget plot to a gist} 6 | \usage{ 7 | widget2gist( 8 | widget_string, 9 | name, 10 | created = NULL, 11 | description = "", 12 | license = c("none", "apache-2.0", "bsd-2-clause", "bsd-3-clause", "cc-by-4.0", 13 | "cc-by-nc-4.0", "cc-by-nc-nd-4.0", "cc-by-nc-sa-4.0", "cc-by-nd-4.0", "cc-by-sa-4.0", 14 | "cddl-1.0", "epl-1.0", "gpl-2.0", "gpl-3.0", "lgpl-2.1", "lgpl-3.0", "mit", 15 | "mpl-2.0"), 16 | border = TRUE, 17 | scrolling = FALSE, 18 | secure = TRUE, 19 | view = TRUE 20 | ) 21 | } 22 | \arguments{ 23 | \item{widget_string}{a string containing R code to create an htmlwidget} 24 | 25 | \item{name}{name of the gist} 26 | 27 | \item{created}{optional string for a "Created by" to preceed the README} 28 | 29 | \item{description}{optional text to go in README.md to describe the gist} 30 | 31 | \item{license}{license under which gist is released - one of those accepted here: \url{https://bl.ocks.org/licenses.txt}} 32 | 33 | \item{border}{should the bl.ocks.org iframe have a border?} 34 | 35 | \item{scrolling}{should the bl.ocks.org iframe scroll?} 36 | 37 | \item{secure}{should https be used for cdn links?} 38 | 39 | \item{view}{should the resulting gist be opened in the browser on bl.ocks.org?} 40 | } 41 | \description{ 42 | Export htmlwidget plot to a gist 43 | } 44 | \note{ 45 | This requires that you have a github personal access token stored as an environment variable \code{GITHUB_PAT}. See \code{\link[gistr]{gist_create}} for more information. 46 | 47 | Also note that this currently can't handle thumbnails but we are looking into ways to do that. 48 | } 49 | \examples{ 50 | \dontrun{ 51 | widget2gist("figure() \%>\% ly_points(1:10)", name = "test") 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /man/widget2png.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/output_save.R 3 | \name{widget2png} 4 | \alias{widget2png} 5 | \title{Make a static png file for an htmlwidget} 6 | \usage{ 7 | widget2png(p, file, timeout = 500) 8 | } 9 | \arguments{ 10 | \item{p}{htmlwidget object} 11 | 12 | \item{file}{where to save png file} 13 | 14 | \item{timeout}{plot render timeout in milliseconds (see details)} 15 | } 16 | \description{ 17 | Make a static png file for an htmlwidget 18 | } 19 | \details{ 20 | This uses phantomjs (\url{https://phantomjs.org}) to render your htmlwidget in a headless browser and take a screenshot of it, creating a static output. This assumes that phantomjs has been installed on your machine and is available as a system call. For plots that take longer to load and render, you may need to increase the value of \code{timeout}. Note that this function is experimental. 21 | } 22 | \examples{ 23 | \dontrun{ 24 | path <- tempfile(fileext = ".png") 25 | figure(tools = NULL) \%>\% 26 | ly_points(1:10) \%>\% 27 | widget2png(path) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /man/x_range.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_range.R 3 | \name{x_range} 4 | \alias{x_range} 5 | \title{Update x axis range in a Bokeh figure} 6 | \usage{ 7 | x_range(fig, dat = NULL, callback = NULL) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{dat}{either a vector (min, max) if the axis is numeric, or a vector of values if the axis is categorical. In the latter case, the order in which the values are supplied is how they will be arranged on the axis.} 13 | 14 | \item{callback}{TODO} 15 | } 16 | \description{ 17 | Update x axis range in a Bokeh figure 18 | } 19 | \examples{ 20 | \donttest{ 21 | # get data from Duluth site in 'barley' data 22 | du <- subset(lattice::barley, site == "Duluth") 23 | 24 | # plot with default ranges 25 | p <- figure(width = 600) \%>\% 26 | ly_points(yield, variety, color = year, data = du) 27 | p 28 | # y axis is alphabetical 29 | 30 | # manually set x and y axis (y in order of 1932 yield) 31 | p \%>\% 32 | x_range(c(20, 40)) \%>\% 33 | y_range(du$variety[order(subset(du, year == 1932)$yield)]) 34 | } 35 | } 36 | \seealso{ 37 | Other ranges: 38 | \code{\link{y_range}()} 39 | } 40 | \concept{ranges} 41 | -------------------------------------------------------------------------------- /man/y_range.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/fig_range.R 3 | \name{y_range} 4 | \alias{y_range} 5 | \title{Update y axis range in a Bokeh figure} 6 | \usage{ 7 | y_range(fig, dat = NULL, callback = NULL) 8 | } 9 | \arguments{ 10 | \item{fig}{figure to modify} 11 | 12 | \item{dat}{either a vector (min, max) if the axis is numeric, or a vector of values if the axis is categorical. In the latter case, the order in which the values are supplied is how they will be arranged on the axis.} 13 | 14 | \item{callback}{TODO} 15 | } 16 | \description{ 17 | Update y axis range in a Bokeh figure 18 | } 19 | \examples{ 20 | \donttest{ 21 | # get data from Duluth site in 'barley' data 22 | du <- subset(lattice::barley, site == "Duluth") 23 | 24 | # plot with default ranges 25 | p <- figure(width = 600) \%>\% 26 | ly_points(yield, variety, color = year, data = du) 27 | p 28 | # y axis is alphabetical 29 | 30 | # manually set x and y axis (y in order of 1932 yield) 31 | p \%>\% 32 | x_range(c(20, 40)) \%>\% 33 | y_range(du$variety[order(subset(du, year == 1932)$yield)]) 34 | } 35 | } 36 | \seealso{ 37 | Other ranges: 38 | \code{\link{x_range}()} 39 | } 40 | \concept{ranges} 41 | -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /pkgdown/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /pkgdown/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hafen/rbokeh/5bf853469c4ffe02c01f37cf06a0ed84cadabbbc/pkgdown/favicon/favicon.ico -------------------------------------------------------------------------------- /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | 3 | test_check("rbokeh") 4 | -------------------------------------------------------------------------------- /tests/testthat/test-css-svg.R: -------------------------------------------------------------------------------- 1 | 2 | # see here: https://github.com/bokeh/rbokeh/issues/40 3 | test_that("svgs in css are base64 encoded", { 4 | ff <- file.path(system.file(package = "rbokeh"), "htmlwidgets/lib/bokehjs/bokeh.min.css") 5 | css <- suppressWarnings(readLines(ff)) 6 | expect_false(any(grepl("#grayscale");filter:gray;-webkit-filter:grayscale(100%)} 11 | 12 | # .bk-logo.grey{filter:url("data:image/svg+xml;utf8,#grayscale");filter:gray;-webkit-filter:grayscale(100%)} 13 | 14 | # then 15 | # base64enc::base64encode(charToRaw("")) 16 | # then replace it with: 17 | # .bk-logo.grey{filter:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxmaWx0ZXIgaWQ9J2dyYXlzY2FsZSc+PGZlQ29sb3JNYXRyaXggdHlwZT0nbWF0cml4JyB2YWx1ZXM9JzAuMzMzMyAwLjMzMzMgMC4zMzMzIDAgMCAwLjMzMzMgMC4zMzMzIDAuMzMzMyAwIDAgMC4zMzMzIDAuMzMzMyAwLjMzMzMgMCAwIDAgMCAwIDEgMCcvPjwvZmlsdGVyPjwvc3ZnPg==");filter:gray;-webkit-filter:grayscale(100%)} 18 | 19 | # also update css tooltip colors 20 | # #1e4b6c to #aaa for background and to #888 for border 21 | # #9ab9b1 to #fff 22 | # #e2ddbd to #fff 23 | -------------------------------------------------------------------------------- /tests/testthat/test-zzz-lintr.R: -------------------------------------------------------------------------------- 1 | 2 | # # https://github.com/jimhester/lintr 3 | # if (requireNamespace("lintr", quietly = TRUE)) { 4 | # context("lints") 5 | # test_that("Package Style", { 6 | # lintr::expect_lint_free(cache = TRUE) 7 | # }) 8 | # } 9 | -------------------------------------------------------------------------------- /vignettes/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.R 3 | -------------------------------------------------------------------------------- /vignettes/rbokeh-pkg.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "rbokeh" 3 | output: rmarkdown::html_vignette 4 | vignette: > 5 | %\VignetteIndexEntry{rbokeh} 6 | %\VignetteEngine{knitr::rmarkdown} 7 | %\VignetteEncoding{UTF-8} 8 | --- 9 | 10 | Please see the package documentation [here](https://hafen.github.io/rbokeh/). 11 | --------------------------------------------------------------------------------