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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more