Day 14: Europe

WebR 0.2.2 + {sf}

This is a demo page that is both an entry in the 2023 30-Day Map Challenge (Day 14) and an example of the shiny new WebR 0.2.2! Hopefully everything loaded as you took the time to read this intro paragraph (WebR is fast, but we still do need to download a WASM binary and a bunch of R packages).

The Europe map is loaded from a GeoJSON file into R’s {sf} package. We use {dplyr} to join some metadata (where the Tour de France has ridden through), then {ggplot2} to plot it.

While it does support light/dark mode switching (we use dynamic color variables in the {ggplot2} calls), don’t do that too much. There are some unfortunate 2D context errors that I haven’t figured out the cause for (so I can submit a bug report).

Use your browser’s “view source” capability to see the code. It’s all self-contained in this page. All vanilla JavaScript.

WebR is loading….