Published
Edited
Dec 14, 2020
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
IllinoisDataFeedCounts = FileAttachment(
"IllinoisDataFeedCountsDynamic (2)@3.json"
).json()
Insert cell
Insert cell
Insert cell
ILHistoricalData = {
const query = `
query getHistoricalData {
state_testing_results_change(order_by: {date: asc}) {
date
confirmed_cases
confirmed_cases_change
confirmed_cases_change_pct
confirmed_cases_minus_deaths
deaths
deaths_change
deaths_change_pct
total_tested
total_tested_change
total_tested_change_pct
}
}
`;

return graphql({
query,
operation: "getHistoricalData"
}).then(({ state_testing_results_change }) =>
state_testing_results_change.map(({ date, ...row }) => ({
...row,
dateString: date,
date: new Date(date)
}))
);
}
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