StatLens for Instructors
StatLens is a free, open, accessible toolkit for teaching statistics — simulation-based inference, distribution calculators, traditional tests, and data exploration, all in the browser with no install. This page shows what you can do with it in your course: bring your own data, hand students pre-configured and reproducible links, embed tools in your LMS, and add guided activities on top of any tool.
Use your own data
Upload a CSV, paste from a spreadsheet, or auto-load from a URL — on every tool.
Share pre-configured links
Open a tool with the exact dataset, variables, and view your students should see.
Reproducible for grading
A seed makes every simulated result identical — auto-gradable in MyOpenMath & Canvas.
Embed in your LMS
Drop a tool — or just a figure — into Canvas, Moodle, or a webpage via iframe.
Add guided activities
Overlay a step-by-step panel on any tool for in-class walkthroughs or homework.
Works for everyone
WCAG-AA accessible, keyboard-operable, mobile-friendly — and free.
Bring your own data
Getting your data into StatLens
Every tool page has the same data panel with several ways to load data, from zero-setup to fully automated.
Built-in datasets
The Datasets tab offers 100+ curated datasets, automatically filtered to those that fit the tool. Students pick from a dropdown — no files or URLs needed. Browse the dataset index →
Open a file — or a link to one
The Open File/URL tab accepts CSV, TSV (handy when copying from a spreadsheet), and StatLens JSON datasets. Multi-column files are fine — the page shows variable pickers so students choose the relevant column(s).
The same tab takes a link to a hosted file (any https:// address that points straight at the file). Opening data from a link does one extra thing that matters in a classroom: the link becomes part of the page’s own URL, so Share then hands you a QR code that opens the tool with that data already loaded. Post the file once; the class scans instead of uploading. See Show the class a QR code.
If a file’s first row is data rather than column names, uncheck My data has headers — StatLens names the columns for you rather than eating the first value.
.json, and share that file (LMS, email, course site). Students open it on whichever StatLens page they need — the study description and variable labels travel with it.
Paste or type
The Edit Data tab lets students paste CSV, type into a spreadsheet-style editor, or (on categorical pages) enter summary counts directly. A pasted JSON dataset is auto-detected.
Load from a URL
For links, LMS integration, and activities, data can load straight from a URL parameter:
| Parameter | Use case |
|---|---|
?dataset=penny_ages | Load a built-in dataset by ID (textbook callouts) |
?csv=https://… | Fetch a CSV/TSV from any HTTPS URL (quick sharing, no JSON conversion) |
?json=https://… | Fetch a hosted StatLens JSON dataset |
?data=1.2,3.4,5.6 | Inline numeric data (e.g. per-student values from MyOpenMath) |
You don’t have to build these by hand. Load your data through Open File/URL (or pick a dataset, or set the seed and confidence level), then click Share — StatLens writes the link for you.
Show the class a QR code instead of having 30 students upload the same file
Every tool page has a Share button that shows the page’s current link as a scannable QR code (with a Download SVG option for slides). A QR code holds a link, not a spreadsheet — so the data needs a home on the web first. Any HTTPS host works; a GitHub Gist is the quickest, needs no website, and is free:
- Save your data as a
.csv(in Excel: File → Save As → CSV). - Go to gist.github.com and sign in (a free GitHub account is enough). Paste your data into the big text box.
- Name the file in the box just above, ending in
.csv—class_commute.csv, not thegistfile1.txtGitHub falls back to. Worth the ten seconds: StatLens uses the filename as the name of your data, so it becomes the label in the summary bar, on the axes, and in whatever students download. - Click Create public gist or Create secret gist — either works. “Secret” means unlisted, not private: anyone with the link can open it, which is all your students need, and it keeps the file off your profile and out of search. Public makes it findable, so a colleague can reuse the dataset. Either way, only put data in a gist you’d be comfortable posting publicly — never student-identifiable data.
- Click the Raw button and copy the address from the browser bar. It starts with
gist.githubusercontent.com. You can delete the long code between/raw/and the filename — without it, the link always serves the newest version of the file, so fixing a typo in the gist fixes it for everyone who has scanned the code. (If you rename the file later, update the last part of the link to match.) - Open the StatLens tool you want, go to Open File/URL, paste the link, and click Load.
- Click Share and project the QR code. Students scan it and land on the tool with your data in it.
Keep the data out of a gist if it contains anything students shouldn’t see — an unlisted gist is still readable by anyone who has the address. For class data collected in a Google Sheet, File → Share → Publish to the web → CSV gives a link that works the same way, and updates when the sheet does.
Share & pre-configure
Pre-configuring tools with links
Every page reads URL parameters to pre-set its state, so you can hand students a link that opens exactly the view you want. A few common patterns:
Point at a specific dataset (e.g. a textbook callout):
https://learnlens.org/statlens/simulate/bootstrap-mean/?dataset=penny_ages
Hide the numbers for a visual-judgment exercise — students read the shape, not a readout:
https://learnlens.org/statlens/explore/one-cat/?dataset=brexit&labels=names
Start with alphabetical sort so students discover that ordering by frequency is better:
https://learnlens.org/statlens/explore/one-cat/?dataset=brexit&sort=alpha
Estimate a CI / p-value off the figure — a figure-only embed that auto-runs the simulation:
https://learnlens.org/statlens/simulate/bootstrap-slope/?dataset=bdims_regression&plot=only&cutlines=ci
The full list of parameters — and the guarantee that they never change or disappear — is in the URL API reference. Documented parameters are a stable contract, safe to bake into homework.
Assessment
Reproducible output for graded work
StatLens uses a deterministic seeded PRNG: the same ?seed= always produces the exact same simulated result. That is what makes randomization tests and bootstrap CIs auto-gradable.
https://learnlens.org/statlens/simulate/randomization-one-prop/?dataset=opportunity_cost&seed=hw3q5&direction=less
?data= and ?seed=, and check the returned result against the theoretical answer with tolerance. Canvas New Quizzes: pre-computed variants link to specific seeds for reproducible grading. See the MyOpenMath and Canvas integration notes.
Embedding
Embedding in your LMS or webpage
Any tool works inside an <iframe>. Add ?embed=true to hide the site header, data panel, and footer so only the tool shows:
<iframe src="https://learnlens.org/statlens/simulate/bootstrap-mean/?dataset=penny_ages&embed=true"
width="100%" height="700" style="border:0"></iframe>
For a figure only — a finished, hoverable distribution with no controls — use ?plot=only. It auto-runs the simulation at the given seed, so the figure is just there:
https://learnlens.org/statlens/simulate/bootstrap-two-means/?dataset=diamonds_99_1ct&plot=only&seed=demo
Guided activities
Adding a step-by-step activity to any tool
Activities are small JSON files that add a guided instruction panel alongside a tool — used for in-class walkthroughs and homework explorations. Load one by appending ?activity=:
https://learnlens.org/statlens/simulate/bootstrap-mean/?activity=ch08-bootstrap-explore.json
- Browse existing activities in the activities folder.
- Author your own — the Activity Authoring Guide covers the JSON schema, step types (predict / do / explain, gated questions, free-response), and conventions.
Discovery vs. Presentation mode
Activity pages support two modes: Discovery (default) reveals steps progressively with gated questions for student self-pacing; Presentation shows every step in a clean interface for projecting in class. Toggle with the settings gear, or add ?mode=present to the link.
Accessibility
Built for every student
Accessibility is designed in, not bolted on. Every tool is WCAG 2.1 AA: fully keyboard-operable (every drag has an arrow-key alternative), screen-reader labeled with live regions for dynamic results, colorblind-safe palettes that never rely on color alone, and 44px touch targets on mobile. It respects prefers-reduced-motion, and it's free — no accounts, no paywall, no tracking of students.
Quick reference
“I want to…”
| I want to… | Do this |
|---|---|
| Share a custom dataset with students | Build in the Dataset Builder → download JSON → share the file |
| Get my own data to the whole class at once | Post the CSV to a gist → paste the raw link into Open File/URL → Share → project the QR code (how) |
| Link students to a pre-loaded tool | Add ?dataset=id or ?csv=url to the link |
| Hide numbers for a visual exercise | Add ?labels=names or ?readout=false |
| Make output reproducible for grading | Add ?seed=some_string |
| Embed in Canvas / Moodle | Add ?embed=true and drop it in an <iframe> |
| Show just a figure to read off | Add ?plot=only (add ?cutlines=ci for drag-to-estimate) |
| Create a guided walkthrough | Write an activity JSON, link with ?activity=filename.json |
| Project in class without gates | Add ?mode=present or use the settings gear |
Explore more
Tool catalog
Every interactive tool on the site, organized by procedure.
Dataset Builder New
Turn a CSV into a StatLens dataset with metadata. Export JSON.
Dataset index
Browse 100+ bundled datasets by variable type.
Activities
Ready-made guided walkthroughs to drop onto any tool.
URL parameter reference
The full, stable contract of every link parameter.
What's new
Recent tools, activities, and features.
Data Workbench Prototype
Experimental single-surface EDA: load data, sort & select columns, chart them, and jump to the matching analysis. Feedback welcome.