Published
Edited
Feb 5, 2021
1 star
Insert cell
Insert cell
VaxbotEmbedEN = vaxbot("en")
Insert cell
vaxbot = async function(lang) {
// await triggerEmbedAnalytics("Vaxbot embed - " + lang);

const dyingCaption = "Who is dying:";
const vaxCaption = "Who is vaccinated:";

const dyingMap = "https://storage.googleapis.com/chivaxbot/deaths-latest.png";
const vaxMap = "https://storage.googleapis.com/chivaxbot/vax-latest.png";

const altText =
"Two maps of Chicago, side by side. The map on the left shows COVID-19 deaths per capita by ZIP code. The map on the right shows completed COVID-19 vaccination per capita by ZIP code. The maps reveal a disconnect between where residents are getting vaccinated and where COVID-19 deaths are concentrated.";

return html`
<div class=container>
<h3 style="text-transform:none;">As of ${vaxbotText.as_of}, Chicago is reporting <span style="color:#db4a36;">${vaxbotText.vaccinations}</span> people fully vaccinated: <span style="color:#db4a36;">${vaxbotText.percent_vaccinated}%</span> of the population.</h3>
<table style="border:none;margin-bottom:0;">
<tr>
<td style="border:none;font-size: 1.15em;"><p class="tweet">${dyingCaption}</p></td>
<td style="border:none;font-size: 1.15em;"><p class="tweet">${vaxCaption}</p></td>
</tr>
<tr>
<td style="border:none;font-size: 1.15em;">
<img class="vaxbot-img" src=${dyingMap} alt=${altText} />
</td>
<td style="border:none;font-size: 1.15em;">
<img class="vaxbot-img" src=${vaxMap} alt=${altText} />
</td>
</tr>
</table>
<small>
Bea Malsky and Charmaine Runes for <a href="https://southsideweekly.com/chivaxbot">South Side Weekly</a><br />
Source: <a href="https://data.cityofchicago.org/">Chicago Data Portal</a>
</small>
</div>
`;
}
Insert cell
Insert cell
Insert cell
Insert cell
vaxbotText = fetch(
`https://storage.googleapis.com/chivaxbot/sentence-latest.json?ignoreCache=1`
).then(response => response.json())
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more