Embed
One family of small cards a publisher, broker or researcher can put on a page: the Data Center Power Index (DCPI) market card, its evidence view, and the Data Center Gas Index (DCGI) state card. Every card shows a figure only with its evidence date and source, prints a cite line, links its methodology and keeps a "Data: DC Hub" credit. They update themselves; there is nothing to maintain and no key to hold.
One market's DCPI verdict and composite score, the grid operator's queue figure with its source, the as-of date and the cite line.
<iframe src="https://dchub.cloud/embed/dcpi/ashburn?via=your-site" width="360" height="270" style="border:0;max-width:100%" loading="lazy" title="DCPI market card, data: DC Hub"></iframe>
<script src="https://dchub.cloud/embed/card.js" data-market="ashburn" data-via="your-site" async></script>
Cards render values only for fully sourced markets (every input live or labelled, a current queue figure). For any other market the card says so and links the public market page.
One US state's DCGI verdict (gas-advantaged, adequate or gas-constrained), the electric-power gas price it is priced on with its 12-month window and source, the as-of date and the cite line.
<iframe src="https://dchub.cloud/embed/dcgi/tx?via=your-site" width="360" height="270" style="border:0;max-width:100%" loading="lazy" title="DCGI state card, data: DC Hub"></iframe>
<script src="https://dchub.cloud/embed/card.js" data-card="dcgi" data-state="TX" data-via="your-site" async></script>
The card reads the public DCGI feed. A state the index leaves unscored shows no verdict and gives the feed's reason; the numeric DCGI scores are not part of the card.
The same market, laid out as a bounded fact a story can quote: the DCPI verdict, the composite score and the modelled time to power, each with its own evidence date and source, a "current context" label and the cite line.
<iframe src="https://dchub.cloud/embed/market/dallas?via=your-site" title="DC Hub market evidence card: Dallas" width="100%" height="480" loading="lazy" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" referrerpolicy="strict-origin-when-cross-origin" style="max-width:460px;border:0"></iframe>
Replace dallas with any DCPI market slug, for example ashburn. The card is 280–460 px wide and about 480 px tall; at phone width it needs about 700 px. Script-tag form: data-card="evidence" on /embed/card.js.
After it renders, the evidence card posts its height to your page (a number and a type, nothing else). This listener applies it:
<script>
addEventListener("message", function (e) {
if (e.origin !== "https://dchub.cloud" || !e.data || e.data.type !== "dchub-embed-size") return;
var f = document.querySelector('iframe[src^="https://dchub.cloud/embed/market/"]');
if (f && e.data.height > 0) f.style.height = e.data.height + "px";
});
</script>
A compact, static image for GitHub READMEs and similar pages. It names DC Hub and the Data Center Power Index (DCPI) and links to the public index. It does not print a score or a market verdict, so it can be used without regard to held markets.
[](https://dchub.cloud/dcpi?via=badge)
viaAdd ?via=<your-name> to any card URL (or data-via on the script tag) and DC Hub counts the card's views under your name. It changes nothing in the card. Names are lowercase letters, digits, ., - and _, up to 40 characters; anything else is dropped. With a via, the card's links back to DC Hub carry it as utm_source=<your-name>&utm_medium=partner. The older ?ref=<code> (and data-ref) is still accepted and means the same thing; when both are sent, via wins.
| URL / parameter | What it does |
|---|---|
/embed/dcpi/<market> | The DCPI market card. <market> is a DCPI market slug (lowercase letters, digits, hyphens). Data: /api/v1/partners/card/<market>. |
/embed/market/<market> | The evidence view of the same market. Data: /api/v1/receipt/dcpi/<market>, one components[] entry per figure with name, status (returned, withheld or unavailable), value, as_of, basis, source_name and source_url. The same JSON is at /embed/market/<market>.json. |
/embed/dcgi/<state> | The DCGI state card. <state> is a two-letter US state or territory code. Data: /api/v1/dcgi/scores/<STATE>. |
/embed/card.js | The script-tag loader for every card: data-card = dcpi (default), evidence or dcgi; data-market or data-state; optional data-via and data-width. It inserts one sandboxed iframe after the tag. |
?via=<name> | Attribution, on every card (see above). ?ref= is an alias. |
?monitor=1 | Evidence view only: adds a "Monitor changes" link. |
/badges/dcpi.svg | Static README badge. Names DC Hub and the Data Center Power Index (DCPI). No score and no market. Link it to /dcpi. |
The cards store nothing in your reader's browser and set no cookie. Values are read from DC Hub's public feeds when a card loads, so they update with the feed. A card talks to dchub.cloud only.
<script src="https://dchub.cloud/embed/dcpi.js" data-market="…"> is the same loader as /embed/card.js under its original name.?ref=<code> on the evidence card is read as via./embed/assets/market-card?market=<market> and /embed/assets/dcpi-card?market=<market> still render the cards.Building more than an embed (evidence receipts, a partner key, the data-quality rule behind the cards)? The partner kit is on /partners.
Pages under /embed/ may be framed by any site. Every other DC Hub page still refuses framing by other origins.