Embed a country
A compact, live version of any country page — the curve, the median, the four income levels, a picker — for an article or a newsletter. Free, no key, no tracking of your readers beyond a cookieless page count.
The snippet
<iframe src="https://theperspectivemachine.com/embed/portugal/" title="Income in Portugal — The Perspective Machine" width="100%" height="440" style="border:0;max-width:680px;border-radius:14px" loading="lazy"></iframe>
<script>addEventListener("message",function(e){if(e.origin==="https://theperspectivemachine.com"&&e.data&&e.data.type==="pm-embed"){var f=document.querySelector('iframe[src*="/embed/'+e.data.slug+'/"]');if(f)f.style.height=e.data.height+"px"}})</script>The second line is optional: it lets the frame fit its content. Without it the widget still works at a fixed 440px.
Or just paste the URL
In WordPress and Ghost, paste a country page's address — https://theperspectivemachine.com/in/portugal/ — on its own line and it unfurls into the widget (oEmbed discovery). The endpoint is https://theperspectivemachine.com/oembed?url=….
What the widget will never do
- Ask your readers for an income. The "place your own" button opens the machine in the top window; the math stays on their device there as everywhere.
- Set a cookie, read one, or identify anyone. Page views of the widget are counted in aggregate, nothing else.
- Say anything the country page doesn't: the same functions produce both, from the same World Bank snapshot.
Attribution is built into the widget's footer. Please keep it — it's how the next reader finds the source.