Embed reference

Embedding StatsLearn widgets: reference

StatsLearn interactives and teaching calculators are free to embed on any site that accepts HTML, such as a class page, an LMS page, a blog or a lesson. Students do not need an account.

StatsLearn interactives and teaching calculators can be embedded on any page that accepts HTML. Each one has a widget page at https://www.statslearn.org/widgets/{slug} with an iframe snippet. The snippet includes an optional credit line that the site owner may keep, edit or remove.

Example snippet

This is the snippet for the descriptive statistics sandbox. The iframe is the widget. The paragraph after it is the optional credit line: one link to the teaching page, with StatsLearn as the anchor text.

Where the snippets live

Slugs and sizes

Widget slugs match the slug of the teaching page. The mean versus median demo is descriptive-statistics-sandbox, the z-score tool is z-score-calculator, and sampling distributions are sampling-distribution-clt. The mean vs median guide covers the same idea in words.

The iframe source is https://www.statslearn.org/embed/{slug}. Interactives are 560 pixels tall and calculators are 520, both at 100 percent width.