import plotly.express as px
import plotly.io as pio
= px.data.gapminder()
gapminder = gapminder.query("year == 2007")
gapminder2007 = px.scatter(gapminder2007,
fig ="gdpPercap", y="lifeExp", color="continent",
x="pop", size_max=60,
size="country")
hover_name fig.show()
plotly-quarto-ghpages
This is a Quarto website.
To learn more about Quarto websites visit https://quarto.org/docs/websites.
Let’s make a Plotly figure:
Did it show up? ⤴️
If not, we can directly write out the HTML:
file="plot.html", auto_open=False) pio.write_html(fig,
Now we can include it here:
::includeHTML("plot.html") htmltools
What R packages got used here?
::session_info() sessioninfo
─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.3.0 (2023-04-21)
os Ubuntu 22.04.2 LTS
system x86_64, linux-gnu
ui X11
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz UTC
date 2023-06-02
pandoc 2.9.2.1 @ /usr/bin/ (via rmarkdown)
─ Packages ───────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
cli 3.6.1 2023-03-23 [1] RSPM
digest 0.6.31 2022-12-11 [1] RSPM
evaluate 0.21 2023-05-05 [1] RSPM
fastmap 1.1.1 2023-02-24 [1] RSPM
glue 1.6.2 2022-02-24 [1] RSPM
here 1.0.1 2020-12-13 [1] RSPM
htmltools 0.5.5 2023-03-23 [1] RSPM
htmlwidgets 1.6.2 2023-03-17 [1] RSPM
jsonlite 1.8.4 2022-12-06 [1] RSPM
knitr 1.41 2022-11-18 [1] RSPM (R 4.3.0)
lattice 0.21-8 2023-04-05 [3] CRAN (R 4.3.0)
lifecycle 1.0.3 2022-10-07 [1] RSPM
magrittr 2.0.3 2022-03-30 [1] RSPM
Matrix 1.5-4 2023-04-04 [3] CRAN (R 4.3.0)
png 0.1-8 2022-11-29 [1] RSPM
rappdirs 0.3.3 2021-01-31 [1] RSPM
Rcpp 1.0.10 2023-01-22 [1] RSPM
reticulate 1.28 2023-01-27 [1] RSPM
rlang 1.1.1 2023-04-28 [1] RSPM
rmarkdown 2.22 2023-06-01 [1] RSPM
rprojroot 2.0.3 2022-04-02 [1] RSPM
sessioninfo 1.2.2 2021-12-06 [1] RSPM
stringi 1.7.12 2023-01-11 [1] RSPM
stringr 1.5.0 2022-12-02 [1] RSPM
vctrs 0.6.2 2023-04-19 [1] RSPM
withr 2.5.0 2022-03-03 [1] RSPM
xfun 0.39 2023-04-20 [1] RSPM
yaml 2.3.7 2023-01-23 [1] RSPM
[1] /home/runner/work/_temp/Library
[2] /opt/R/4.3.0/lib/R/site-library
[3] /opt/R/4.3.0/lib/R/library
─ Python configuration ───────────────────────────────────────────────────────
python: /opt/hostedtoolcache/Python/3.10.11/x64/bin/python3
libpython: /opt/hostedtoolcache/Python/3.10.11/x64/lib/libpython3.10.so
pythonhome: /opt/hostedtoolcache/Python/3.10.11/x64:/opt/hostedtoolcache/Python/3.10.11/x64
version: 3.10.11 (main, Apr 6 2023, 07:59:08) [GCC 11.3.0]
numpy: /opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/numpy
numpy_version: 1.24.3
python versions found:
/opt/hostedtoolcache/Python/3.10.11/x64/bin/python3
/opt/hostedtoolcache/Python/3.10.11/x64/bin/python
/usr/share/miniconda/bin/python
──────────────────────────────────────────────────────────────────────────────