Demos and Recipes LSE ME204 · Data Engineering Principles for the Social Sciences
🖥️ Week 03 Day 03 Lecture
10:00 – 11:00
I’ll be going around the room to help you. Use this hour to make progress on your project.
What you could be doing right now:
💡 Deadline reminder: submit your final project by 5pm Friday 31 July.
11:00 – 11:15

When we come back:
Let’s see how the final project maps to this diagram.
Data science workflow from collecting and storing data through preparation, exploration, investigation, modelling, and communication.
11:15 – 11:50
Two ways a reader can move through a report like the one you are building.
The reader ends at the findings
Technical detail goes in an appendix.
The reader starts at the chart
Worth doing when the visualisation is rich.
Read the headings in order and you have the whole story.

The article’s six section headings, in order:
🔗 Why do children and young people in smaller towns do better academically? (ONS, July 2023)
They go over six major findings in the article, and how things are measured only shows up as an appendix, not the main text.
On the page
Under “Measuring the data”
Anyone can read the findings. Anyone who wants to check the work can, too. Neither reader blocks the other.
The findings are in the headings again. What differs is where the method goes.

The article’s section headings, in order:
🔗 We compared eight AI search engines. They’re all bad at citing news. (Columbia Journalism Review, March 2025)
The same chart, with the article taken away.

If you write a big report, there is a good chance you will want to reuse your main figures elsewhere: in a slide deck, or in an email making the same point more concisely to someone else. It is a good idea, then, to make sure your chart works as a standalone piece, so it still states its finding once the surrounding writing is gone.
⚠️ A title naming the variables tells a reader what they are looking at. A title naming the finding tells them what you found.
11:50 – 12:00
We saw this chart on 🖥️ W02D01, in the bad plot hunt.
A chart like this is already making a claim. Two lines, one axis each, scaled until they move together.
Adding “of course this is only a correlation” underneath does not undo it. You still chose these two variables, put them on one chart, and gave it space in your report. You are still leading your reader to believe one causes the other.
⚠️ The hedge does not save you. If you cannot defend the causal claim, do not put up the chart that makes it.
Then be careful how much weight you put on it.
💡 A claim about how the world works needs a source, including when it seems too obvious to need one.
How to write about a pattern in your data
Cities near the sea cool down more slowly at night, because the sea keeps the air above it warm and humid (NOAA). My own data agrees for every city except one. (your case here) cools faster overnight than the other coastal cities, and it is also the furthest above sea level, so I cannot separate height from distance to the sea.
12:00 – 12:50
Two group projects from DS105, our sister course. Both teams communicated their findings so well that you can follow everything they did without ever opening their notebooks.
The football one is a Quarto page rendered into docs/. The sewage one uses a JavaScript framework we never teach.
Anything you put in docs/index.md comes back as a web page.
docs/, converts it, and serves the result..md file: a title, three headings, a paragraph each, and one image.🔗 GitHub Pages documentation, and the quickstart if you want to set up a second site from scratch.

Jekyll is the converter GitHub runs on your Markdown. Give it a _config.yml and it applies a theme.
What the repository contains:
your-repo
└── docs
├── _config.yml
├── index.md
└── assets
└── entries-by-hour.png
Settings → Pages → Deploy from a branch → main → /docs.
index.md opens with a settings block:
Three dashes, some setting: value lines, three dashes again. That format is called YAML, and we call this block the front matter. Everything below it is ordinary Markdown.
Change the theme line in _config.yml to see your website with a different look.
⚠️ This is a fully vibecoded website. Do not take the content, or the sloppy writing, seriously.
🔗 You can find all the default themes here, and the Jekyll docs explain what else you can change.
Keep writing in Markdown. Hand that to the chatbot and ask for the HTML at the end.
.md file, and keep it as your reference.docs/assets/, and have the HTML point at them.Gemini, ChatGPT, and Claude will all do this. What you ask for matters more than which one you pick.



The content and the structure
Here is the Markdown for a page I want to publish on GitHub Pages. Turn it into a single HTML file I can put in docs/.
assets/: entries-by-hour.png in the findings section, station-map.png under the data section. Point an <img> at each relative pathThe styling
<style> block#3995ba, links #c63c4a, body text #333333, background white#F8CE0A for one thing that must stand out, never for textHere is how I would specify it if I wanted the ME204 colours, for example. Pick your own, and give the hex codes.
Add these to the same message
If you are using Plotly and want to keep the interactive bits, save the chart with write_html, put that file in docs/assets/, and embed it with an <iframe>.
You are the one answering for what it says
You answer for every number and every claim on the page, whether you typed it yourself or a chatbot wrote it for you.
docs/GitHub Pages publishes one folder. Anything outside it does not exist as far as your website is concerned.
Broken
your-repo
├── figures
│ └── chart.png
└── docs
└── index.md
The Markdown points up and out of docs/ with ../figures/chart.png. It works on your machine. On the published site the image is missing.
Works
your-repo
└── docs
├── index.md
└── assets
└── chart.png
Now the path is assets/chart.png, and everything the page needs is in the folder GitHub publishes.
⚠️ It is very common to only notice your images are not loading on the published site very close to the deadline. Copy your figures into docs/ and check the published page, not the local one, well before you need to submit.
You write Markdown and set the look yourself.
.qmd file, including the one on screen now..qmd file can contain Python code as well as text. Quarto runs that code on your machine when you render, then puts the chart into the page it builds.We will build one of these together in a moment, starting from a blank file.
quarto --helpOpen a terminal on Nuvolos and type this.
docs/index.qmdThree dashes, some setting: value lines, three dashes again. The same shape as the Jekyll block from earlier, read by a different program.
The least you can get away with
This renders. You get a page with a title on it and nothing else decided.
What the page you just saw uses
There are tons of things you can customise about how the page looks. Check out 🔗 HTML format options for a full reference of what you can configure under html:.
embed-resourcesRender the same file with and without that one line, then look at your folder.
Without it
docs ├── data │ └── example.csv ├── index.qmd ├── index.html 25K └── index_files 980K ├── figure-html │ └── cell-3-output-1.png └── libs ├── bootstrap ├── clipboard └── quarto-html
Quarto split the output in two, so index.html contains your text while the chart, the fonts, and the styling went into index_files beside it. Push the HTML alone and the page loads with no styling and a broken chart.
With it
docs
├── data
│ └── example.csv
├── index.qmd
└── index.html 1.4M
The chart, the fonts, and the styling are all inside those 1.4M. Copy that one file anywhere and the page still works.
Change something and re-render the page to see what changed.
What you write in docs/index.qmd
What the browser shows
Bank empties after 7pm, Camden Town fills up
Bank spikes to 3,100 entries at nine in the morning and 3,400 at six in the evening, with barely 1,000 to 1,600 an hour in between.
⚠️ The numbers on this page are invented.
The ## heading gets converted to an <h2>, and the ::: {.callout-important} block is converted to a <div>.
The same render, from a button in the editor.
Open the Extensions panel, search for Quarto, and select Install. Same panel you used for SQLite Viewer in 💻 W03D02.
You get a Render button and a preview pane beside the file. Make a small edit and see the result without switching to the terminal.

The one you want is published by Quarto, identifier quarto.quarto.
How Quarto converts your markdown to the relevant HTML
docs/index.qmd
docs/index.html
<section id="bank-empties-after-7pm-camden-town-fills-up" class="level2">
<h2 class="anchored" data-anchor-id="bank-empties-after-7pm-camden-town-fills-up">Bank empties after 7pm, Camden Town fills up</h2>
<p>Bank spikes to 3,100 entries at nine in the morning and 3,400 at six in the evening, with barely 1,000 to 1,600 an hour in between.</p>
<div class="callout callout-style-default callout-important callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Important</span>The numbers on this page are invented</div>
</div>
</div>
</section>Three of those class names, in the CSS Quarto put inside the same file:
Why the box is red.
Why the icon and the title share one row.
Rendering gives you HTML on your own machine. Publishing puts it somewhere other people can open.
docs/, push, done🔗 Publishing with Quarto is the page to follow. We will walk through it together now, and you do the publish yourself afterwards.
An extension for reports where the reader scrolls and the chart responds. Useful for the second shape from this morning.
Install it:
Then in your YAML:
Check them out if you are curious. Experience it as a reader first, then look at how it was put together.
12:50 – 13:00
This afternoon
Pick the route your own project will take. Markdown in docs/ with a Jekyll theme, one HTML file from a chatbot, or a Quarto page you render yourself.
Then work on your charts and your website, with your class teacher there to help you.
💻 Start by writing down which route you picked and why. Your class teacher will ask you.
Where you want to be by tonight
docs/assets/ or docs/figures/, and the page pointing at them.
LSE Summer School 2026 | ME204 Week 03 Day 03
LSE ME204 (2026)