initial generation for deaths only
This commit is contained in:
commit
c12d38d753
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.idea
|
||||
node_modules
|
||||
|
254
generate.js
Executable file
254
generate.js
Executable file
@ -0,0 +1,254 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const parseCsv = require('csv-parse/lib/sync');
|
||||
const pug = require('pug');
|
||||
|
||||
const publicDir = path.join(__dirname, 'public');
|
||||
const templatesDir = path.join(__dirname, 'tmpl');
|
||||
const dataDir = path.resolve(path.join(__dirname, '..', 'COVID-19', 'csse_covid_19_data'));
|
||||
const timeSeriesDir = path.join(dataDir, 'csse_covid_19_time_series');
|
||||
|
||||
const promiseMe = (fn) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fn((err, result) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(result);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
fs.mkdirSync(path.join(__dirname, 'public', 'countries'), {
|
||||
recursive: true,
|
||||
});
|
||||
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, 'node_modules', 'chart.js', 'dist', 'Chart.bundle.min.js'),
|
||||
path.join(publicDir, 'Chart.bundle.js'),
|
||||
);
|
||||
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, 'node_modules', 'bootstrap', 'dist', 'css', 'bootstrap.css'),
|
||||
path.join(publicDir, 'bootstrap.css'),
|
||||
);
|
||||
|
||||
const deathsGlobalCsv = path.join(timeSeriesDir, 'time_series_covid19_deaths_global.csv');
|
||||
const confirmedGlobalCsv = path.join(timeSeriesDir, 'time_series_covid19_confirmed_global.csv');
|
||||
const deathsUSCsv = path.join(timeSeriesDir, 'time_series_covid19_deaths_US.csv');
|
||||
const confirmedUSCsv = path.join(timeSeriesDir, 'time_series_covid19_confirmed_US.csv');
|
||||
|
||||
const zeroPad = value => value < 10 ? `0${value}` : value.toString();
|
||||
|
||||
const toSafeName = x => x.replace(/[^A-Za-z]/g, '-').toLowerCase();
|
||||
|
||||
const processGlobalDeaths = async () => {
|
||||
const globalStart = Date.now();
|
||||
let start = Date.now();
|
||||
|
||||
console.log('reading CSV...');
|
||||
const timeSeriesGlobalRaw = fs.readFileSync(deathsGlobalCsv, {encoding: 'utf8'});
|
||||
console.log(`read CSV in ${Date.now() - start}ms`);
|
||||
|
||||
start = Date.now();
|
||||
let tsGlobalRecords = parseCsv(timeSeriesGlobalRaw, {
|
||||
cast: true,
|
||||
columns: true,
|
||||
});
|
||||
console.log(`parsed CSV in ${Date.now() - start}ms`);
|
||||
//
|
||||
// tsGlobalRecords = tsGlobalRecords.filter((record) => {
|
||||
// return record['Country/Region'] === 'Australia';
|
||||
// });
|
||||
|
||||
start = Date.now();
|
||||
tsGlobalRecords.forEach((record) => {
|
||||
record.timeSeriesDaily = [];
|
||||
record.timeSeriesMonthly = [];
|
||||
const dateColumns = Object.keys(record).filter(x => /^\d+\/\d+\/\d+$/.test(x))
|
||||
.map(key => {
|
||||
return {
|
||||
key,
|
||||
date: new Date(key),
|
||||
};
|
||||
})
|
||||
.sort((a, b) => {
|
||||
if (a.date.getTime() === b.date.getTime()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return a.date.getTime() < b.date.getTime() ? -1 : 1;
|
||||
});
|
||||
|
||||
const toSortableDate = date => [
|
||||
date.getUTCFullYear(),
|
||||
zeroPad(date.getUTCMonth() + 1),
|
||||
zeroPad(date.getUTCDate()),
|
||||
].join('-');
|
||||
|
||||
dateColumns.forEach((obj) => {
|
||||
const value = Number(record[obj.key]) || 0;
|
||||
const date = obj.date;
|
||||
delete record[obj.key];
|
||||
const sortableKey = toSortableDate(date);
|
||||
const lastItem = record.timeSeriesDaily[record.timeSeriesDaily.length - 1];
|
||||
record.timeSeriesDaily.push({
|
||||
key: sortableKey,
|
||||
value,
|
||||
delta: lastItem ? value - lastItem.value : 0,
|
||||
});
|
||||
});
|
||||
|
||||
const monthlyTotals = [];
|
||||
const monthlyMaxes = {};
|
||||
record.timeSeriesDaily.forEach((item) => {
|
||||
const key = item.key.replace(/-\d+$/, '');
|
||||
if (!(key in monthlyMaxes)) {
|
||||
monthlyMaxes[key] = {
|
||||
date: item.key,
|
||||
value: item.value,
|
||||
};
|
||||
} else if (item.key > monthlyMaxes[key].date) {
|
||||
monthlyMaxes[key] = {
|
||||
date: item.key,
|
||||
value: item.value,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Object.keys(monthlyMaxes).forEach((key) => {
|
||||
monthlyTotals.push({
|
||||
key,
|
||||
value: monthlyMaxes[key].value,
|
||||
});
|
||||
});
|
||||
|
||||
monthlyTotals.sort((a, b) => a.key.localeCompare(b.key));
|
||||
monthlyTotals.forEach((item, i) => {
|
||||
const prev = monthlyTotals[i - 1];
|
||||
item.delta = prev ? item.value - prev.value : 0;
|
||||
});
|
||||
|
||||
record.total = record.timeSeriesDaily.length ?
|
||||
record.timeSeriesDaily[record.timeSeriesDaily.length - 1].value :
|
||||
0;
|
||||
record.timeSeriesMonthly = monthlyTotals;
|
||||
|
||||
record.state = record['Province/State'];
|
||||
record.country = record['Country/Region'];
|
||||
record.lat = record.Lat;
|
||||
record.long = record.Long;
|
||||
record.countrySafeName = toSafeName(record.country);
|
||||
record.stateSafeName = toSafeName(record.state);
|
||||
|
||||
delete record['Province/State'];
|
||||
delete record['Country/Region'];
|
||||
delete record.Lat;
|
||||
delete record.Long;
|
||||
});
|
||||
|
||||
tsGlobalRecords.sort((a, b) => {
|
||||
if (a.country === b.country) {
|
||||
return a.state.localeCompare(b.state);
|
||||
}
|
||||
|
||||
return a.country.localeCompare(b.country);
|
||||
});
|
||||
|
||||
const perCountryTotals = {};
|
||||
tsGlobalRecords.forEach((record) => {
|
||||
perCountryTotals[record.country] = perCountryTotals[record.country] || {
|
||||
total: 0,
|
||||
timeSeriesDaily: {},
|
||||
timeSeriesMonthly: {},
|
||||
states: [],
|
||||
safeName: record.countrySafeName,
|
||||
};
|
||||
|
||||
const item = perCountryTotals[record.country];
|
||||
item.total += record.total;
|
||||
item.states.push(record);
|
||||
|
||||
record.timeSeriesDaily.forEach((ts) => {
|
||||
item.timeSeriesDaily[ts.key] = item.timeSeriesDaily[ts.key] || {
|
||||
value: 0,
|
||||
delta: 0,
|
||||
};
|
||||
item.timeSeriesDaily[ts.key].value += ts.value;
|
||||
item.timeSeriesDaily[ts.key].delta += ts.delta;
|
||||
});
|
||||
|
||||
record.timeSeriesMonthly.forEach((ts) => {
|
||||
item.timeSeriesMonthly[ts.key] = item.timeSeriesMonthly[ts.key] || {
|
||||
value: 0,
|
||||
delta: 0,
|
||||
};
|
||||
item.timeSeriesMonthly[ts.key].value += ts.value;
|
||||
item.timeSeriesMonthly[ts.key].delta += ts.delta;
|
||||
});
|
||||
});
|
||||
|
||||
const countryArr = Object.keys(perCountryTotals).map((countryName) => {
|
||||
const item = perCountryTotals[countryName];
|
||||
return {
|
||||
name: countryName,
|
||||
safeName: item.safeName,
|
||||
total: item.total,
|
||||
states: item.states,
|
||||
timeSeriesDaily: Object.keys(item.timeSeriesDaily).sort().map((date) => {
|
||||
return {
|
||||
key: date,
|
||||
value: item.timeSeriesDaily[date].value,
|
||||
delta: item.timeSeriesDaily[date].delta,
|
||||
};
|
||||
}),
|
||||
timeSeriesMonthly: Object.keys(item.timeSeriesMonthly).sort().map((date) => {
|
||||
return {
|
||||
key: date,
|
||||
value: item.timeSeriesMonthly[date].value,
|
||||
delta: item.timeSeriesMonthly[date].delta,
|
||||
};
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
console.log(`transformed data in ${Date.now() - start}ms`);
|
||||
|
||||
start = Date.now();
|
||||
const allTmpl = path.join(templatesDir, 'all.pug');
|
||||
const allHtml = pug.renderFile(allTmpl, {
|
||||
data: countryArr,
|
||||
});
|
||||
|
||||
const targetFile = path.join(publicDir, 'index.html');
|
||||
fs.writeFileSync(targetFile, allHtml);
|
||||
console.log(`wrote to ${targetFile} in ${Date.now() - start}ms`);
|
||||
// fs.writeFileSync(path.join(publicDir, 'countries.json'), JSON.stringify(countryArr, null, ' '));
|
||||
|
||||
const singleCountryTmpl = path.join(templatesDir, 'country.pug');
|
||||
await Promise.all(countryArr.map(async (countryData) => {
|
||||
const start = Date.now();
|
||||
const targetFile = path.join(publicDir, 'countries', countryData.safeName + '.html');
|
||||
const countryHtml = pug.renderFile(singleCountryTmpl, {
|
||||
data: countryData,
|
||||
});
|
||||
console.log(`writing to ${targetFile}`);
|
||||
await promiseMe(callback => fs.writeFile(targetFile, countryHtml, callback));
|
||||
console.log(`wrote to ${targetFile} in ${Date.now() - start}ms`);
|
||||
}));
|
||||
|
||||
console.log(`finished in ${((Date.now() - globalStart) / 1000).toFixed(2)}s`);
|
||||
};
|
||||
|
||||
processGlobalDeaths()
|
||||
.then(() => {
|
||||
console.log('all done');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
process.exit(1);
|
||||
});
|
13
package.json
Normal file
13
package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "covid19",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bootstrap": "4.4.1",
|
||||
"chart.js": "2.9.3",
|
||||
"csv-parse": "4.8.9",
|
||||
"pug": "2.0.4",
|
||||
"serve": "11.3.0"
|
||||
}
|
||||
}
|
7
public/Chart.bundle.js
Normal file
7
public/Chart.bundle.js
Normal file
File diff suppressed because one or more lines are too long
10224
public/bootstrap.css
vendored
Normal file
10224
public/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
172
public/countries/afghanistan.html
Normal file
172
public/countries/afghanistan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.701Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Afghanistan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,4,4,4,4,4,4,6,6,7,7,11,14,14,15,15,18,18,21,23,25,30,30,30,33,36,36,40,42,43,47,50],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Afghanistan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="50" data-yesterday="3" data-week="14" data-month="46"><td class="sort-order">1</td><td><em class="text-muted">All Afghanistan</em></td><td class="text-right">50</td><td class="text-right">3</td><td class="text-right">14</td><td class="text-right">46</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [21,23,25,30,30,30,33,36,36,40,42,43,47,50],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/albania.html
Normal file
172
public/countries/albania.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.758Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Albania</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,4,5,5,6,8,10,10,11,15,15,16,17,20,20,21,22,22,23,23,23,23,23,24,25,26,26,26,26,26,26,27,27,27,27,28],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Albania"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="28" data-yesterday="1" data-week="2" data-month="13"><td class="sort-order">1</td><td><em class="text-muted">All Albania</em></td><td class="text-right">28</td><td class="text-right">1</td><td class="text-right">2</td><td class="text-right">13</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [23,24,25,26,26,26,26,26,26,27,27,27,27,28],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/algeria.html
Normal file
172
public/countries/algeria.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.899Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Algeria</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,4,7,9,11,15,17,17,19,21,25,26,29,31,35,44,58,86,105,130,152,173,193,205,235,256,275,293,313,326,336,348,364,367,375,384,392,402,407,415,419,425],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Algeria"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="425" data-yesterday="6" data-week="41" data-month="381"><td class="sort-order">1</td><td><em class="text-muted">All Algeria</em></td><td class="text-right">425</td><td class="text-right">6</td><td class="text-right">41</td><td class="text-right">381</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [313,326,336,348,364,367,375,384,392,402,407,415,419,425],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/andorra.html
Normal file
172
public/countries/andorra.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.849Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Andorra</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,3,6,8,12,14,15,16,17,18,21,22,23,25,26,26,29,29,31,33,33,35,35,36,37,37,37,37,40,40,40],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Andorra"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="40" data-yesterday="0" data-week="3" data-month="28"><td class="sort-order">1</td><td><em class="text-muted">All Andorra</em></td><td class="text-right">40</td><td class="text-right">0</td><td class="text-right">3</td><td class="text-right">28</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [29,31,33,33,35,35,36,37,37,37,37,40,40,40],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/angola.html
Normal file
172
public/countries/angola.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.903Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Angola</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Angola"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="2" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Angola</em></td><td class="text-right">2</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/antigua-and-barbuda.html
Normal file
172
public/countries/antigua-and-barbuda.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.955Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Antigua and Barbuda</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Antigua and Barbuda"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="3" data-yesterday="0" data-week="0" data-month="3"><td class="sort-order">1</td><td><em class="text-muted">All Antigua and Barbuda</em></td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">3</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,2,3,3,3,3,3,3,3,3,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/argentina.html
Normal file
172
public/countries/argentina.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.780Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Argentina</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,2,3,3,4,4,4,6,8,9,13,18,19,23,27,28,36,39,43,44,48,56,63,72,82,83,90,97,102,111,115,123,129,132,136,147,152,165,176,185,192],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Argentina"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="192" data-yesterday="7" data-week="56" data-month="165"><td class="sort-order">1</td><td><em class="text-muted">All Argentina</em></td><td class="text-right">192</td><td class="text-right">7</td><td class="text-right">56</td><td class="text-right">165</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [97,102,111,115,123,129,132,136,147,152,165,176,185,192],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/armenia.html
Normal file
172
public/countries/armenia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.009Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Armenia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,3,3,4,7,7,7,7,8,8,9,10,12,13,13,14,16,17,18,19,20,20,22,24,24,24,27,28,28],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Armenia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="28" data-yesterday="0" data-week="6" data-month="25"><td class="sort-order">1</td><td><em class="text-muted">All Armenia</em></td><td class="text-right">28</td><td class="text-right">0</td><td class="text-right">6</td><td class="text-right">25</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [14,16,17,18,19,20,20,22,24,24,24,27,28,28],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
508
public/countries/australia.html
Normal file
508
public/countries/australia.html
Normal file
@ -0,0 +1,508 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.760Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Australia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,3,3,3,3,3,3,3,3,3,5,6,6,7,7,7,7,8,8,13,13,14,16,17,18,20,24,28,30,35,40,45,50,51,54,57,60,61,62,63,63,66,67,67,67,67,67,75,79,80,83],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Australia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-australian-capital-territory" data-name="Australian Capital Territory" data-total="3" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">1</td><td>Australian Capital Territory</td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,3,3,3,3,3,3,3,3,3,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-new-south-wales" data-name="New South Wales" data-total="34" data-yesterday="1" data-week="8" data-month="26"><td class="sort-order">2</td><td>New South Wales</td><td class="text-right">34</td><td class="text-right">1</td><td class="text-right">8</td><td class="text-right">26</td><td><canvas id="sparkline-1" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-1');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [25,25,25,25,26,26,26,26,26,26,31,33,33,34],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-northern-territory" data-name="Northern Territory" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">3</td><td>Northern Territory</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-2" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-2');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-queensland" data-name="Queensland" data-total="6" data-yesterday="0" data-week="0" data-month="4"><td class="sort-order">4</td><td>Queensland</td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">4</td><td><canvas id="sparkline-3" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-3');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [5,5,5,5,5,6,6,6,6,6,6,6,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-south-australia" data-name="South Australia" data-total="4" data-yesterday="0" data-week="0" data-month="4"><td class="sort-order">5</td><td>South Australia</td><td class="text-right">4</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">4</td><td><canvas id="sparkline-4" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-4');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,4,4,4,4,4,4,4,4,4,4,4,4],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-tasmania" data-name="Tasmania" data-total="11" data-yesterday="1" data-week="4" data-month="10"><td class="sort-order">6</td><td>Tasmania</td><td class="text-right">11</td><td class="text-right">1</td><td class="text-right">4</td><td class="text-right">10</td><td><canvas id="sparkline-5" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-5');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [5,6,6,6,7,7,7,7,7,7,8,9,10,11],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-victoria" data-name="Victoria" data-total="17" data-yesterday="1" data-week="3" data-month="13"><td class="sort-order">7</td><td>Victoria</td><td class="text-right">17</td><td class="text-right">1</td><td class="text-right">3</td><td class="text-right">13</td><td><canvas id="sparkline-6" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-6');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [14,14,14,14,14,14,14,14,14,14,16,16,16,17],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-western-australia" data-name="Western Australia" data-total="8" data-yesterday="0" data-week="1" data-month="6"><td class="sort-order">8</td><td>Western Australia</td><td class="text-right">8</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">6</td><td><canvas id="sparkline-7" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-7');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,6,6,6,7,7,7,7,7,7,7,8,8,8],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/austria.html
Normal file
172
public/countries/austria.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.957Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Austria</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,4,6,6,8,16,21,28,30,49,58,68,86,108,128,146,158,168,186,204,220,243,273,295,319,337,350,368,384,393,410,431,443,452,470,491,510,522,530,536,542],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Austria"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="542" data-yesterday="6" data-week="72" data-month="414"><td class="sort-order">1</td><td><em class="text-muted">All Austria</em></td><td class="text-right">542</td><td class="text-right">6</td><td class="text-right">72</td><td class="text-right">414</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [368,384,393,410,431,443,452,470,491,510,522,530,536,542],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/azerbaijan.html
Normal file
172
public/countries/azerbaijan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.065Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Azerbaijan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,2,3,3,4,4,4,5,5,5,5,5,7,7,8,8,9,10,11,11,12,13,13,15,15,18,19,19,20,20,20,21,21,21],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Azerbaijan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="21" data-yesterday="0" data-week="2" data-month="16"><td class="sort-order">1</td><td><em class="text-muted">All Azerbaijan</em></td><td class="text-right">21</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">16</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [12,13,13,15,15,18,19,19,20,20,20,21,21,21],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bahamas.html
Normal file
172
public/countries/bahamas.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.119Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bahamas</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,4,5,6,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,11,11,11,11],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bahamas"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="11" data-yesterday="0" data-week="2" data-month="11"><td class="sort-order">1</td><td><em class="text-muted">All Bahamas</em></td><td class="text-right">11</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">11</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [8,8,8,8,9,9,9,9,9,9,11,11,11,11],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bahrain.html
Normal file
172
public/countries/bahrain.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.172Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bahrain</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,6,6,6,6,7,7,7,7,7,7,7,7,7,8,8,8,8],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bahrain"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="8" data-yesterday="0" data-week="1" data-month="4"><td class="sort-order">1</td><td><em class="text-muted">All Bahrain</em></td><td class="text-right">8</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">4</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,7,7,7,7,7,7,7,7,7,8,8,8,8],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bangladesh.html
Normal file
172
public/countries/bangladesh.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.074Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bangladesh</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,4,5,5,5,5,5,5,5,6,6,6,8,9,12,17,20,21,27,30,34,39,46,50,60,75,84,91,101,110,120,127,131,140,145],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bangladesh"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="145" data-yesterday="5" data-week="44" data-month="140"><td class="sort-order">1</td><td><em class="text-muted">All Bangladesh</em></td><td class="text-right">145</td><td class="text-right">5</td><td class="text-right">44</td><td class="text-right">140</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [39,46,50,60,75,84,91,101,110,120,127,131,140,145],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/barbados.html
Normal file
172
public/countries/barbados.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.226Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Barbados</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Barbados"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="6" data-yesterday="0" data-week="1" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Barbados</em></td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,5,5,5,5,5,5,5,5,6,6,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/belarus.html
Normal file
172
public/countries/belarus.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.132Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Belarus</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,5,8,13,13,13,16,19,23,26,29,33,36,40,42,45,47,51,55,58,60,63,67,72],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Belarus"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="72" data-yesterday="5" data-week="21" data-month="71"><td class="sort-order">1</td><td><em class="text-muted">All Belarus</em></td><td class="text-right">72</td><td class="text-right">5</td><td class="text-right">21</td><td class="text-right">71</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [29,33,36,40,42,45,47,51,55,58,60,63,67,72],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/belgium.html
Normal file
172
public/countries/belgium.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.347Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Belgium</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,4,5,10,14,21,37,67,75,88,122,178,220,289,353,431,513,705,828,1011,1143,1283,1447,1632,2035,2240,2523,3019,3346,3600,3903,4157,4440,4857,5163,5453,5683,5828,5998,6262,6490,6679,6917,7094],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Belgium"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="7094" data-yesterday="177" data-week="1266" data-month="6389"><td class="sort-order">1</td><td><em class="text-muted">All Belgium</em></td><td class="text-right">7,094</td><td class="text-right">177</td><td class="text-right">1,266</td><td class="text-right">6,389</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3903,4157,4440,4857,5163,5453,5683,5828,5998,6262,6490,6679,6917,7094],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/belize.html
Normal file
172
public/countries/belize.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.280Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Belize</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Belize"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="2" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">1</td><td><em class="text-muted">All Belize</em></td><td class="text-right">2</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/benin.html
Normal file
172
public/countries/benin.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.333Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Benin</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Benin"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="1"><td class="sort-order">1</td><td><em class="text-muted">All Benin</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">1</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bhutan.html
Normal file
172
public/countries/bhutan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.391Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bhutan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bhutan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Bhutan</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bolivia.html
Normal file
172
public/countries/bolivia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.423Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bolivia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,7,8,9,10,10,11,14,15,18,19,20,24,27,28,28,29,31,31,32,33,34,37,43,44,46,50],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bolivia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="50" data-yesterday="4" data-week="17" data-month="44"><td class="sort-order">1</td><td><em class="text-muted">All Bolivia</em></td><td class="text-right">50</td><td class="text-right">4</td><td class="text-right">17</td><td class="text-right">44</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [27,28,28,29,31,31,32,33,34,37,43,44,46,50],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bosnia-and-herzegovina.html
Normal file
172
public/countries/bosnia-and-herzegovina.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.101Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bosnia and Herzegovina</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,3,3,4,5,6,10,13,13,16,17,21,23,29,33,34,35,36,37,39,39,40,41,43,46,47,48,49,51,53,54,55,57,59],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bosnia and Herzegovina"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="59" data-yesterday="2" data-week="10" data-month="46"><td class="sort-order">1</td><td><em class="text-muted">All Bosnia and Herzegovina</em></td><td class="text-right">59</td><td class="text-right">2</td><td class="text-right">10</td><td class="text-right">46</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [39,40,41,43,46,47,48,49,51,53,54,55,57,59],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/botswana.html
Normal file
172
public/countries/botswana.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.446Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Botswana</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Botswana"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Botswana</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/brazil.html
Normal file
172
public/countries/brazil.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.256Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Brazil</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,11,15,25,34,46,59,77,92,111,136,159,201,240,324,359,445,486,564,686,819,950,1057,1124,1223,1328,1532,1736,1924,2141,2354,2462,2587,2741,2906,3331,3704,4057,4286],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Brazil"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="4286" data-yesterday="229" data-week="1699" data-month="4085"><td class="sort-order">1</td><td><em class="text-muted">All Brazil</em></td><td class="text-right">4,286</td><td class="text-right">229</td><td class="text-right">1,699</td><td class="text-right">4,085</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1328,1532,1736,1924,2141,2354,2462,2587,2741,2906,3331,3704,4057,4286],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/brunei.html
Normal file
172
public/countries/brunei.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.499Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Brunei</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Brunei"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Brunei</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/bulgaria.html
Normal file
172
public/countries/bulgaria.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.817Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Bulgaria</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,3,7,8,8,8,10,10,14,17,20,22,23,24,24,25,28,29,32,35,36,38,41,41,42,43,45,49,52,54,55,56],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Bulgaria"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="56" data-yesterday="1" data-week="13" data-month="48"><td class="sort-order">1</td><td><em class="text-muted">All Bulgaria</em></td><td class="text-right">56</td><td class="text-right">1</td><td class="text-right">13</td><td class="text-right">48</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [32,35,36,38,41,41,42,43,45,49,52,54,55,56],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/burkina-faso.html
Normal file
172
public/countries/burkina-faso.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.870Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Burkina Faso</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,4,4,4,7,9,11,12,12,14,16,16,16,16,17,18,19,23,24,24,27,27,27,30,32,32,35,36,36,38,38,39,41,41,41,42],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Burkina Faso"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="42" data-yesterday="1" data-week="4" data-month="28"><td class="sort-order">1</td><td><em class="text-muted">All Burkina Faso</em></td><td class="text-right">42</td><td class="text-right">1</td><td class="text-right">4</td><td class="text-right">28</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [27,30,32,32,35,36,36,38,38,39,41,41,41,42],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/burma.html
Normal file
172
public/countries/burma.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.552Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Burma</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Burma"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="5" data-yesterday="0" data-week="0" data-month="4"><td class="sort-order">1</td><td><em class="text-muted">All Burma</em></td><td class="text-right">5</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">4</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,4,4,4,5,5,5,5,5,5,5,5,5],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/burundi.html
Normal file
172
public/countries/burundi.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.606Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Burundi</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Burundi"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="1"><td class="sort-order">1</td><td><em class="text-muted">All Burundi</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">1</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cabo-verde.html
Normal file
172
public/countries/cabo-verde.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.658Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cabo Verde</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cabo Verde"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Cabo Verde</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cambodia.html
Normal file
172
public/countries/cambodia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.711Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cambodia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cambodia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Cambodia</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cameroon.html
Normal file
172
public/countries/cameroon.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.817Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cameroon</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,6,6,6,6,7,8,9,9,9,9,10,10,12,12,12,12,14,17,22,22,22,42,42,43,43,43,43,53,56],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cameroon"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="56" data-yesterday="3" data-week="14" data-month="50"><td class="sort-order">1</td><td><em class="text-muted">All Cameroon</em></td><td class="text-right">56</td><td class="text-right">3</td><td class="text-right">14</td><td class="text-right">50</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [12,14,17,22,22,22,42,42,43,43,43,43,53,56],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
844
public/countries/canada.html
Normal file
844
public/countries/canada.html
Normal file
@ -0,0 +1,844 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.416Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Canada</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,4,5,8,9,12,19,21,25,26,30,38,54,61,64,80,101,109,139,179,218,259,339,375,407,503,557,654,714,779,899,1006,1257,1354,1399,1563,1725,1908,2075,2240,2384,2547,2661],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Canada"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-alberta" data-name="Alberta" data-total="73" data-yesterday="0" data-week="14" data-month="65"><td class="sort-order">1</td><td>Alberta</td><td class="text-right">73</td><td class="text-right">0</td><td class="text-right">14</td><td class="text-right">65</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [46,48,48,48,50,51,51,59,61,66,68,72,73,73],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-british-columbia" data-name="British Columbia" data-total="100" data-yesterday="0" data-week="18" data-month="76"><td class="sort-order">2</td><td>British Columbia</td><td class="text-right">100</td><td class="text-right">0</td><td class="text-right">18</td><td class="text-right">76</td><td><canvas id="sparkline-1" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-1');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [69,69,72,75,77,78,81,82,87,90,94,98,100,100],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-diamond-princess" data-name="Diamond Princess" data-total="1" data-yesterday="0" data-week="2" data-month="0"><td class="sort-order">3</td><td>Diamond Princess</td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">0</td><td><canvas id="sparkline-2" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-2');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-grand-princess" data-name="Grand Princess" data-total="-1" data-yesterday="0" data-week="-1" data-month="-1"><td class="sort-order">4</td><td>Grand Princess</td><td class="text-right">-1</td><td class="text-right">0</td><td class="text-right">-1</td><td class="text-right">-1</td><td><canvas id="sparkline-3" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-3');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-manitoba" data-name="Manitoba" data-total="6" data-yesterday="0" data-week="0" data-month="5"><td class="sort-order">5</td><td>Manitoba</td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">5</td><td><canvas id="sparkline-4" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-4');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,5,5,5,5,5,6,6,6,6,6,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-new-brunswick" data-name="New Brunswick" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">6</td><td>New Brunswick</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-5" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-5');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-newfoundland-and-labrador" data-name="Newfoundland and Labrador" data-total="3" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">7</td><td>Newfoundland and Labrador</td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-6" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-6');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,3,3,3,3,3,3,3,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-northwest-territories" data-name="Northwest Territories" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">8</td><td>Northwest Territories</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-7" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-7');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-nova-scotia" data-name="Nova Scotia" data-total="-1" data-yesterday="0" data-week="-10" data-month="-1"><td class="sort-order">9</td><td>Nova Scotia</td><td class="text-right">-1</td><td class="text-right">0</td><td class="text-right">-10</td><td class="text-right">-1</td><td><canvas id="sparkline-8" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-8');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,4,7,9,9,10,12,16,-1,-1,-1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-ontario" data-name="Ontario" data-total="960" data-yesterday="44" data-week="336" data-month="927"><td class="sort-order">10</td><td>Ontario</td><td class="text-right">960</td><td class="text-right">44</td><td class="text-right">336</td><td class="text-right">927</td><td><canvas id="sparkline-9" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-9');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [291,334,385,490,524,564,591,624,694,762,806,862,916,960],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-prince-edward-island" data-name="Prince Edward Island" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">11</td><td>Prince Edward Island</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-10" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-10');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-quebec" data-name="Quebec" data-total="1516" data-yesterday="70" data-week="577" data-month="1485"><td class="sort-order">12</td><td>Quebec</td><td class="text-right">1,516</td><td class="text-right">70</td><td class="text-right">577</td><td class="text-right">1,485</td><td><canvas id="sparkline-11" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-11');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [360,435,487,630,688,688,820,939,1044,1134,1243,1340,1446,1516],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-recovered" data-name="Recovered" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">13</td><td>Recovered</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-12" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-12');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-saskatchewan" data-name="Saskatchewan" data-total="4" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">14</td><td>Saskatchewan</td><td class="text-right">4</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-13" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-13');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,4,4,4,4,4,4,4,4,4,4,4,4],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-yukon" data-name="Yukon" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">15</td><td>Yukon</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-14" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-14');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/central-african-republic.html
Normal file
172
public/countries/central-african-republic.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.764Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Central African Republic</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Central African Republic"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Central African Republic</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/chad.html
Normal file
172
public/countries/chad.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.817Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Chad</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Chad"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Chad</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/chile.html
Normal file
172
public/countries/chile.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.667Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Chile</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,5,6,7,8,12,16,18,22,27,34,37,43,48,57,65,73,80,82,92,94,105,116,126,133,139,147,160,168,174,181,189],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Chile"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="189" data-yesterday="8" data-week="50" data-month="177"><td class="sort-order">1</td><td><em class="text-muted">All Chile</em></td><td class="text-right">189</td><td class="text-right">8</td><td class="text-right">50</td><td class="text-right">177</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [82,92,94,105,116,126,133,139,147,160,168,174,181,189],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
1708
public/countries/china.html
Normal file
1708
public/countries/china.html
Normal file
File diff suppressed because it is too large
Load Diff
172
public/countries/colombia.html
Normal file
172
public/countries/colombia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.373Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Colombia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,6,6,6,10,12,16,17,19,25,32,35,46,50,54,69,80,100,109,112,127,131,144,153,153,179,189,196,206,215,225,233,244],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Colombia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="244" data-yesterday="11" data-week="55" data-month="228"><td class="sort-order">1</td><td><em class="text-muted">All Colombia</em></td><td class="text-right">244</td><td class="text-right">11</td><td class="text-right">55</td><td class="text-right">228</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [112,127,131,144,153,153,179,189,196,206,215,225,233,244],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/congo--brazzaville-.html
Normal file
172
public/countries/congo--brazzaville-.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.870Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Congo (Brazzaville)</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Congo (Brazzaville)"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="6" data-yesterday="0" data-week="0" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Congo (Brazzaville)</em></td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [5,5,5,5,6,6,6,6,6,6,6,6,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/congo--kinshasa-.html
Normal file
172
public/countries/congo--kinshasa-.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.923Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Congo (Kinshasa)</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3,6,6,8,8,9,13,13,18,18,18,18,18,18,20,20,20,20,20,21,22,23,25,25,25,25,25,25,25,28,28],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Congo (Kinshasa)"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="28" data-yesterday="0" data-week="3" data-month="20"><td class="sort-order">1</td><td><em class="text-muted">All Congo (Kinshasa)</em></td><td class="text-right">28</td><td class="text-right">0</td><td class="text-right">3</td><td class="text-right">20</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [20,20,21,22,23,25,25,25,25,25,25,25,28,28],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/costa-rica.html
Normal file
172
public/countries/costa-rica.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:34.975Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Costa Rica</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,5,6,6,6,6,6,6,6],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Costa Rica"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="6" data-yesterday="0" data-week="0" data-month="4"><td class="sort-order">1</td><td><em class="text-muted">All Costa Rica</em></td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">4</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,4,4,4,4,5,6,6,6,6,6,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cote-d-ivoire.html
Normal file
172
public/countries/cote-d-ivoire.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.028Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cote d'Ivoire</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,3,3,3,3,3,4,5,6,6,6,6,6,8,9,9,13,14,14,14,14,14],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cote d'Ivoire"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="14" data-yesterday="0" data-week="5" data-month="13"><td class="sort-order">1</td><td><em class="text-muted">All Cote d'Ivoire</em></td><td class="text-right">14</td><td class="text-right">0</td><td class="text-right">5</td><td class="text-right">13</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,6,6,6,6,8,9,9,13,14,14,14,14,14],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/croatia.html
Normal file
172
public/countries/croatia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.978Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Croatia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,3,5,6,6,6,6,7,8,12,15,16,18,19,20,21,21,23,25,31,33,35,36,39,47,47,48,48,50,51,54,55],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Croatia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="55" data-yesterday="1" data-week="8" data-month="49"><td class="sort-order">1</td><td><em class="text-muted">All Croatia</em></td><td class="text-right">55</td><td class="text-right">1</td><td class="text-right">8</td><td class="text-right">49</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [25,31,33,35,36,39,47,47,48,48,50,51,54,55],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cuba.html
Normal file
172
public/countries/cuba.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.871Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cuba</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3,3,4,6,6,6,6,6,8,9,11,12,15,15,16,18,21,21,24,27,31,32,34,36,38,40,43,49,51,54],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cuba"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="54" data-yesterday="3" data-week="18" data-month="48"><td class="sort-order">1</td><td><em class="text-muted">All Cuba</em></td><td class="text-right">54</td><td class="text-right">3</td><td class="text-right">18</td><td class="text-right">48</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [21,21,24,27,31,32,34,36,38,40,43,49,51,54],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/cyprus.html
Normal file
172
public/countries/cyprus.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.081Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Cyprus</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,5,5,5,7,8,9,10,11,11,9,9,9,9,10,10,10,11,12,12,12,12,12,12,12,12,12,13,13,14,14,14],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Cyprus"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="14" data-yesterday="0" data-week="2" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Cyprus</em></td><td class="text-right">14</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [12,12,12,12,12,12,12,12,12,13,13,14,14,14],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/czechia.html
Normal file
172
public/countries/czechia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.155Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Czechia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,6,9,9,11,16,23,31,39,44,53,59,67,78,88,99,112,119,129,138,143,161,166,169,173,181,186,194,201,208,210,214,218,220],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Czechia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="220" data-yesterday="2" data-week="26" data-month="189"><td class="sort-order">1</td><td><em class="text-muted">All Czechia</em></td><td class="text-right">220</td><td class="text-right">2</td><td class="text-right">26</td><td class="text-right">189</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [143,161,166,169,173,181,186,194,201,208,210,214,218,220],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
268
public/countries/denmark.html
Normal file
268
public/countries/denmark.html
Normal file
@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.478Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Denmark</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,6,9,13,13,24,32,34,41,52,65,72,77,90,104,123,139,161,179,187,203,218,237,247,260,273,285,299,309,321,336,346,355,364,370,384,394,403,418,422],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Denmark"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="422" data-yesterday="4" data-week="58" data-month="332"><td class="sort-order">1</td><td><em class="text-muted">All Denmark</em></td><td class="text-right">422</td><td class="text-right">4</td><td class="text-right">58</td><td class="text-right">332</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [285,299,309,321,336,346,355,364,370,384,394,403,418,422],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-faroe-islands" data-name="Faroe Islands" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">2</td><td>Faroe Islands</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-1" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-1');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-greenland" data-name="Greenland" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">3</td><td>Greenland</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-2" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-2');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/diamond-princess.html
Normal file
172
public/countries/diamond-princess.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.133Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Diamond Princess</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,4,4,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,8,8,8,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,13,13,13,13,13,13,13,13,13,13],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Diamond Princess"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="13" data-yesterday="0" data-week="0" data-month="3"><td class="sort-order">1</td><td><em class="text-muted">All Diamond Princess</em></td><td class="text-right">13</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">3</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [11,12,12,12,13,13,13,13,13,13,13,13,13,13],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/djibouti.html
Normal file
172
public/countries/djibouti.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.186Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Djibouti</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Djibouti"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="2" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">1</td><td><em class="text-muted">All Djibouti</em></td><td class="text-right">2</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,2,2,2,2,2,2,2,2,2,2,2,2],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/dominica.html
Normal file
172
public/countries/dominica.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.239Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Dominica</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Dominica"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Dominica</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/dominican-republic.html
Normal file
172
public/countries/dominican-republic.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.190Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Dominican Republic</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,3,6,10,10,20,28,39,42,51,57,60,68,68,82,86,98,108,118,126,135,173,177,183,189,196,200,217,226,235,245,260,265,267,273,278],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Dominican Republic"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="278" data-yesterday="5" data-week="43" data-month="227"><td class="sort-order">1</td><td><em class="text-muted">All Dominican Republic</em></td><td class="text-right">278</td><td class="text-right">5</td><td class="text-right">43</td><td class="text-right">227</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [177,183,189,196,200,217,226,235,245,260,265,267,273,278],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/ecuador.html
Normal file
172
public/countries/ecuador.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.291Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Ecuador</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,5,7,14,18,27,28,34,36,48,58,60,75,93,120,145,172,180,191,191,242,272,297,315,333,355,369,388,403,421,456,474,507,520,537,560,576,576,576],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Ecuador"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="576" data-yesterday="0" data-week="69" data-month="501"><td class="sort-order">1</td><td><em class="text-muted">All Ecuador</em></td><td class="text-right">576</td><td class="text-right">0</td><td class="text-right">69</td><td class="text-right">501</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [355,369,388,403,421,456,474,507,520,537,560,576,576,576],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/egypt.html
Normal file
172
public/countries/egypt.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.556Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Egypt</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,4,6,6,8,10,14,19,20,21,24,30,36,40,41,46,52,58,66,71,78,85,94,103,118,135,146,159,164,178,183,196,205,224,239,250,264,276,287,294,307,317],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Egypt"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="317" data-yesterday="10" data-week="67" data-month="271"><td class="sort-order">1</td><td><em class="text-muted">All Egypt</em></td><td class="text-right">317</td><td class="text-right">10</td><td class="text-right">67</td><td class="text-right">271</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [164,178,183,196,205,224,239,250,264,276,287,294,307,317],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/el-salvador.html
Normal file
172
public/countries/el-salvador.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.344Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>El Salvador</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,4,4,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "El Salvador"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="8" data-yesterday="0" data-week="1" data-month="7"><td class="sort-order">1</td><td><em class="text-muted">All El Salvador</em></td><td class="text-right">8</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">7</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,6,6,6,7,7,7,7,7,7,8,8,8,8],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/equatorial-guinea.html
Normal file
172
public/countries/equatorial-guinea.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.399Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Equatorial Guinea</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Equatorial Guinea"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="1" data-month="1"><td class="sort-order">1</td><td><em class="text-muted">All Equatorial Guinea</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">1</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/eritrea.html
Normal file
172
public/countries/eritrea.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.454Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Eritrea</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Eritrea"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Eritrea</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/estonia.html
Normal file
172
public/countries/estonia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.929Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Estonia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,4,5,11,12,13,15,19,21,24,24,24,24,25,28,31,35,36,38,38,40,40,43,44,45,46,46,49],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Estonia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="49" data-yesterday="3" data-week="9" data-month="45"><td class="sort-order">1</td><td><em class="text-muted">All Estonia</em></td><td class="text-right">49</td><td class="text-right">3</td><td class="text-right">9</td><td class="text-right">45</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [28,31,35,36,38,38,40,40,43,44,45,46,46,49],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/eswatini.html
Normal file
172
public/countries/eswatini.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.505Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Eswatini</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Eswatini"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="1"><td class="sort-order">1</td><td><em class="text-muted">All Eswatini</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">1</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/ethiopia.html
Normal file
172
public/countries/ethiopia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.561Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Ethiopia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Ethiopia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="3" data-yesterday="0" data-week="0" data-month="3"><td class="sort-order">1</td><td><em class="text-muted">All Ethiopia</em></td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">3</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,3,3,3,3,3,3,3,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/fiji.html
Normal file
172
public/countries/fiji.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.616Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Fiji</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Fiji"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Fiji</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/finland.html
Normal file
172
public/countries/finland.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.534Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Finland</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,5,7,9,11,13,17,17,19,20,25,28,27,34,40,42,48,49,56,59,64,72,75,82,90,94,98,141,149,172,177,186,190],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Finland"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="190" data-yesterday="4" data-week="92" data-month="173"><td class="sort-order">1</td><td><em class="text-muted">All Finland</em></td><td class="text-right">190</td><td class="text-right">4</td><td class="text-right">92</td><td class="text-right">173</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [59,64,72,75,82,90,94,98,141,149,172,177,186,190],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
652
public/countries/france.html
Normal file
652
public/countries/france.html
Normal file
@ -0,0 +1,652 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.167Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>France</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,3,4,4,6,9,11,19,19,33,48,48,79,91,91,149,149,149,244,451,563,676,862,1102,1333,1698,1997,2317,2611,3030,3532,4414,5398,6520,7574,8093,8926,10343,10887,12228,13215,13851,14412,14986,15748,17188,17941,18703,19345,19744,20292,20829,21373,21889,22279,22648,22890],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "France"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="22856" data-yesterday="242" data-week="2591" data-month="19333"><td class="sort-order">1</td><td><em class="text-muted">All France</em></td><td class="text-right">22,856</td><td class="text-right">242</td><td class="text-right">2,591</td><td class="text-right">19,333</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [14967,15729,17167,17920,18681,19323,19718,20265,20796,21340,21856,22245,22614,22856],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-french-guiana" data-name="French Guiana" data-total="1" data-yesterday="0" data-week="0" data-month="1"><td class="sort-order">2</td><td>French Guiana</td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">1</td><td><canvas id="sparkline-1" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-1');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-french-polynesia" data-name="French Polynesia" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">3</td><td>French Polynesia</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-2" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-2');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-guadeloupe" data-name="Guadeloupe" data-total="12" data-yesterday="0" data-week="4" data-month="8"><td class="sort-order">4</td><td>Guadeloupe</td><td class="text-right">12</td><td class="text-right">0</td><td class="text-right">4</td><td class="text-right">8</td><td><canvas id="sparkline-3" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-3');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [8,8,8,8,8,8,8,8,12,12,12,12,12,12],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-martinique" data-name="Martinique" data-total="14" data-yesterday="0" data-week="2" data-month="11"><td class="sort-order">5</td><td>Martinique</td><td class="text-right">14</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">11</td><td><canvas id="sparkline-4" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-4');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,6,8,8,8,8,12,12,14,14,14,14,14,14],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-mayotte" data-name="Mayotte" data-total="4" data-yesterday="0" data-week="0" data-month="3"><td class="sort-order">6</td><td>Mayotte</td><td class="text-right">4</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">3</td><td><canvas id="sparkline-5" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-5');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,4,4,4,4,4,4,4,4,4,4],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-new-caledonia" data-name="New Caledonia" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">7</td><td>New Caledonia</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-6" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-6');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-reunion" data-name="Reunion" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">8</td><td>Reunion</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-7" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-7');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-saint-barthelemy" data-name="Saint Barthelemy" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">9</td><td>Saint Barthelemy</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-8" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-8');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-saint-pierre-and-miquelon" data-name="Saint Pierre and Miquelon" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">10</td><td>Saint Pierre and Miquelon</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-9" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-9');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr><tr id="row-st-martin" data-name="St Martin" data-total="3" data-yesterday="0" data-week="1" data-month="2"><td class="sort-order">11</td><td>St Martin</td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">2</td><td><canvas id="sparkline-10" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-10');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,2,2,2,2,2,2,2,2,2,2,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/gabon.html
Normal file
172
public/countries/gabon.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.668Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Gabon</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,3,3],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Gabon"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="3" data-yesterday="0" data-week="2" data-month="2"><td class="sort-order">1</td><td><em class="text-muted">All Gabon</em></td><td class="text-right">3</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">2</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,2,3,3,3],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/gambia.html
Normal file
172
public/countries/gambia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.721Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Gambia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Gambia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Gambia</em></td><td class="text-right">1</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [1,1,1,1,1,1,1,1,1,1,1,1,1,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/georgia.html
Normal file
172
public/countries/georgia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.034Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Georgia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5,6],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Georgia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="6" data-yesterday="1" data-week="2" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Georgia</em></td><td class="text-right">6</td><td class="text-right">1</td><td class="text-right">2</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,3,4,4,4,4,5,5,5,5,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/germany.html
Normal file
172
public/countries/germany.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.498Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Germany</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,7,9,11,17,24,28,44,67,84,94,123,157,206,267,342,433,533,645,775,920,1107,1275,1444,1584,1810,2016,2349,2607,2767,2736,3022,3194,3294,3804,4052,4352,4459,4586,4862,5033,5279,5575,5760,5877,5976],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Germany"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="5976" data-yesterday="99" data-week="1114" data-month="5201"><td class="sort-order">1</td><td><em class="text-muted">All Germany</em></td><td class="text-right">5,976</td><td class="text-right">99</td><td class="text-right">1,114</td><td class="text-right">5,201</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3194,3294,3804,4052,4352,4459,4586,4862,5033,5279,5575,5760,5877,5976],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/ghana.html
Normal file
172
public/countries/ghana.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.092Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Ghana</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,8,8,8,8,8,8,8,9,9,9,9,9,9,10,10,11],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Ghana"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="11" data-yesterday="1" data-week="2" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Ghana</em></td><td class="text-right">11</td><td class="text-right">1</td><td class="text-right">2</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [8,8,8,8,8,9,9,9,9,9,9,10,10,11],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/greece.html
Normal file
172
public/countries/greece.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:31.592Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Greece</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,4,4,5,5,6,6,13,15,17,20,22,26,28,32,38,43,49,50,53,63,68,73,79,81,83,87,92,93,98,99,101,102,105,108,110,113,116,121,121,125,130,130,134],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Greece"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="134" data-yesterday="4" data-week="18" data-month="85"><td class="sort-order">1</td><td><em class="text-muted">All Greece</em></td><td class="text-right">134</td><td class="text-right">4</td><td class="text-right">18</td><td class="text-right">85</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [99,101,102,105,108,110,113,116,121,121,125,130,130,134],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/grenada.html
Normal file
172
public/countries/grenada.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.774Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Grenada</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Grenada"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Grenada</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/guatemala.html
Normal file
172
public/countries/guatemala.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.210Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Guatemala</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,3,3,3,3,3,3,5,5,5,5,5,7,7,7,7,7,8,11,11,13,15],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Guatemala"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="15" data-yesterday="2" data-week="8" data-month="14"><td class="sort-order">1</td><td><em class="text-muted">All Guatemala</em></td><td class="text-right">15</td><td class="text-right">2</td><td class="text-right">8</td><td class="text-right">14</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [5,5,5,5,7,7,7,7,7,8,11,11,13,15],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/guinea-bissau.html
Normal file
172
public/countries/guinea-bissau.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.145Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Guinea-Bissau</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Guinea-Bissau"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1" data-yesterday="1" data-week="1" data-month="1"><td class="sort-order">1</td><td><em class="text-muted">All Guinea-Bissau</em></td><td class="text-right">1</td><td class="text-right">1</td><td class="text-right">1</td><td class="text-right">1</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,1],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/guinea.html
Normal file
172
public/countries/guinea.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.826Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Guinea</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,5,5,6,6,6,6,7,7],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Guinea"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="7" data-yesterday="0" data-week="2" data-month="7"><td class="sort-order">1</td><td><em class="text-muted">All Guinea</em></td><td class="text-right">7</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">7</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,1,1,3,3,5,5,6,6,6,6,7,7],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/guyana.html
Normal file
172
public/countries/guyana.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.199Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Guyana</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,4,4,4,4,4,5,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,8],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Guyana"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="8" data-yesterday="1" data-week="1" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Guyana</em></td><td class="text-right">8</td><td class="text-right">1</td><td class="text-right">1</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [6,6,6,6,6,6,7,7,7,7,7,7,7,8],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/haiti.html
Normal file
172
public/countries/haiti.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.879Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Haiti</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,3,3,3,3,3,3,3,3,3,3,4,5,5,6,6],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Haiti"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="6" data-yesterday="0" data-week="3" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Haiti</em></td><td class="text-right">6</td><td class="text-right">0</td><td class="text-right">3</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [3,3,3,3,3,3,3,3,3,4,5,5,6,6],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/holy-see.html
Normal file
172
public/countries/holy-see.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.936Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Holy See</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Holy See"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Holy See</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/honduras.html
Normal file
172
public/countries/honduras.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:35.989Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Honduras</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,7,7,10,14,15,15,22,22,22,22,23,23,24,25,25,26,31,35,41,46,46,46,46,46,47,55,59,59],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Honduras"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="59" data-yesterday="0" data-week="13" data-month="52"><td class="sort-order">1</td><td><em class="text-muted">All Honduras</em></td><td class="text-right">59</td><td class="text-right">0</td><td class="text-right">13</td><td class="text-right">52</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [25,26,31,35,41,46,46,46,46,46,47,55,59,59],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/hungary.html
Normal file
172
public/countries/hungary.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.610Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Hungary</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,4,6,7,9,10,10,10,11,13,15,16,20,21,26,32,34,38,47,58,66,77,85,99,109,122,134,142,156,172,189,199,213,225,239,262,262,272],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Hungary"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="272" data-yesterday="10" data-week="73" data-month="256"><td class="sort-order">1</td><td><em class="text-muted">All Hungary</em></td><td class="text-right">272</td><td class="text-right">10</td><td class="text-right">73</td><td class="text-right">256</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [109,122,134,142,156,172,189,199,213,225,239,262,262,272],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/iceland.html
Normal file
172
public/countries/iceland.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.042Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Iceland</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,1,1,1,0,1,1,1,2,2,2,2,2,2,2,2,2,4,4,4,4,6,6,6,6,7,8,8,8,8,8,8,9,9,9,10,10,10,10,10,10,10],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Iceland"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="10" data-yesterday="0" data-week="0" data-month="8"><td class="sort-order">1</td><td><em class="text-muted">All Iceland</em></td><td class="text-right">10</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">8</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [8,8,8,8,9,9,9,10,10,10,10,10,10,10],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/india.html
Normal file
172
public/countries/india.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.825Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>India</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,3,3,4,5,4,7,10,10,12,20,20,24,27,32,35,58,72,72,86,99,136,150,178,226,246,288,331,358,393,405,448,486,521,559,592,645,681,721,780,825,881],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "India"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="881" data-yesterday="56" data-week="289" data-month="846"><td class="sort-order">1</td><td><em class="text-muted">All India</em></td><td class="text-right">881</td><td class="text-right">56</td><td class="text-right">289</td><td class="text-right">846</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [358,393,405,448,486,521,559,592,645,681,721,780,825,881],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/indonesia.html
Normal file
172
public/countries/indonesia.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.077Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Indonesia</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,19,25,32,38,48,49,55,58,78,87,102,114,122,136,157,170,181,191,198,209,221,240,280,306,327,373,399,459,469,496,520,535,582,590,616,635,647,689,720,743],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Indonesia"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="743" data-yesterday="23" data-week="153" data-month="607"><td class="sort-order">1</td><td><em class="text-muted">All Indonesia</em></td><td class="text-right">743</td><td class="text-right">23</td><td class="text-right">153</td><td class="text-right">607</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [399,459,469,496,520,535,582,590,616,635,647,689,720,743],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/iran.html
Normal file
172
public/countries/iran.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.757Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Iran</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5,8,12,16,19,26,34,43,54,66,77,92,107,124,145,194,237,291,354,429,514,611,724,853,988,1135,1284,1433,1556,1685,1812,1934,2077,2234,2378,2517,2640,2757,2898,3036,3160,3294,3452,3603,3739,3872,3993,4110,4232,4357,4474,4585,4683,4777,4869,4958,5031,5118,5209,5297,5391,5481,5574,5650,5710],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Iran"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="5710" data-yesterday="60" data-week="501" data-month="2812"><td class="sort-order">1</td><td><em class="text-muted">All Iran</em></td><td class="text-right">5,710</td><td class="text-right">60</td><td class="text-right">501</td><td class="text-right">2,812</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4585,4683,4777,4869,4958,5031,5118,5209,5297,5391,5481,5574,5650,5710],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/iraq.html
Normal file
172
public/countries/iraq.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.255Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Iraq</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,6,6,7,7,8,9,10,10,10,11,12,13,17,17,20,23,27,29,36,40,42,42,46,50,52,54,54,56,61,64,65,69,69,70,72,76,78,78,79,80,81,82,82,82,83,83,83,86,86,87],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Iraq"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="87" data-yesterday="1" data-week="5" data-month="37"><td class="sort-order">1</td><td><em class="text-muted">All Iraq</em></td><td class="text-right">87</td><td class="text-right">1</td><td class="text-right">5</td><td class="text-right">37</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [78,78,79,80,81,82,82,82,83,83,83,86,86,87],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/ireland.html
Normal file
172
public/countries/ireland.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.009Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Ireland</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,3,3,3,4,6,7,9,19,22,36,46,54,71,85,98,120,137,158,174,210,235,263,287,320,334,365,406,444,486,530,571,610,687,730,769,794,1014,1063,1087],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Ireland"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="1087" data-yesterday="24" data-week="400" data-month="1016"><td class="sort-order">1</td><td><em class="text-muted">All Ireland</em></td><td class="text-right">1,087</td><td class="text-right">24</td><td class="text-right">400</td><td class="text-right">1,016</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [365,406,444,486,530,571,610,687,730,769,794,1014,1063,1087],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/israel.html
Normal file
172
public/countries/israel.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:32.263Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Israel</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,5,8,12,12,15,16,20,26,36,40,44,49,57,65,73,86,95,101,103,116,123,130,142,151,164,172,177,184,189,192,194,199,201],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Israel"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="201" data-yesterday="2" data-week="24" data-month="181"><td class="sort-order">1</td><td><em class="text-muted">All Israel</em></td><td class="text-right">201</td><td class="text-right">2</td><td class="text-right">24</td><td class="text-right">181</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [116,123,130,142,151,164,172,177,184,189,192,194,199,201],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/italy.html
Normal file
172
public/countries/italy.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:29.085Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Italy</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,7,10,12,17,21,29,34,52,79,107,148,197,233,366,463,631,827,827,1266,1441,1809,2158,2503,2978,3405,4032,4825,5476,6077,6820,7503,8215,9134,10023,10779,11591,12428,13155,13915,14681,15362,15887,16523,17127,17669,18279,18849,19468,19899,20465,21067,21645,22170,22745,23227,23660,24114,24648,25085,25549,25969,26384,26644],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Italy"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="26644" data-yesterday="260" data-week="2530" data-month="14216"><td class="sort-order">1</td><td><em class="text-muted">All Italy</em></td><td class="text-right">26,644</td><td class="text-right">260</td><td class="text-right">2,530</td><td class="text-right">14,216</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [20465,21067,21645,22170,22745,23227,23660,24114,24648,25085,25549,25969,26384,26644],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/jamaica.html
Normal file
172
public/countries/jamaica.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.095Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Jamaica</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,7,7,7],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Jamaica"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="7" data-yesterday="0" data-week="2" data-month="6"><td class="sort-order">1</td><td><em class="text-muted">All Jamaica</em></td><td class="text-right">7</td><td class="text-right">0</td><td class="text-right">2</td><td class="text-right">6</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [4,4,5,5,5,5,5,5,6,6,6,7,7,7],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/japan.html
Normal file
172
public/countries/japan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:30.251Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Japan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,2,4,4,5,6,6,6,6,6,6,6,6,10,10,15,16,19,22,22,27,29,29,29,33,35,41,42,43,45,47,49,52,54,54,56,57,62,63,77,77,85,92,93,94,99,99,108,123,143,146,178,190,222,236,236,263,281,328,345,360,372],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Japan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="372" data-yesterday="12" data-week="136" data-month="316"><td class="sort-order">1</td><td><em class="text-muted">All Japan</em></td><td class="text-right">372</td><td class="text-right">12</td><td class="text-right">136</td><td class="text-right">316</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [123,143,146,178,190,222,236,236,263,281,328,345,360,372],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/jordan.html
Normal file
172
public/countries/jordan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.147Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Jordan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,5,5,5,5,5,5,5,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Jordan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="7" data-yesterday="0" data-week="0" data-month="2"><td class="sort-order">1</td><td><em class="text-muted">All Jordan</em></td><td class="text-right">7</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">2</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [7,7,7,7,7,7,7,7,7,7,7,7,7,7],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/kazakhstan.html
Normal file
172
public/countries/kazakhstan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.199Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Kazakhstan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,1,1,1,1,2,3,3,6,5,6,6,6,7,8,10,10,10,12,14,16,17,17,17,17,19,19,19,20,25,25,25],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Kazakhstan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="25" data-yesterday="0" data-week="6" data-month="23"><td class="sort-order">1</td><td><em class="text-muted">All Kazakhstan</em></td><td class="text-right">25</td><td class="text-right">0</td><td class="text-right">6</td><td class="text-right">23</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [12,14,16,17,17,17,17,19,19,19,20,25,25,25],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/kenya.html
Normal file
172
public/countries/kenya.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.253Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Kenya</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,3,4,4,4,6,6,6,7,7,7,8,9,9,10,11,11,12,14,14,14,14,14,14,14,14],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Kenya"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="14" data-yesterday="0" data-week="0" data-month="13"><td class="sort-order">1</td><td><em class="text-muted">All Kenya</em></td><td class="text-right">14</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">13</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [9,9,10,11,11,12,14,14,14,14,14,14,14,14],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/korea--south.html
Normal file
172
public/countries/korea--south.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.309Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Korea, South</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,6,8,10,12,13,13,16,17,28,28,35,35,42,44,50,53,54,60,66,66,72,75,75,81,84,91,94,102,111,111,120,126,131,139,144,152,158,162,165,169,174,177,183,186,192,200,204,208,211,214,217,222,225,229,230,232,234,236,237,238,240,240,242,243],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Korea, South"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="243" data-yesterday="1" data-week="7" data-month="81"><td class="sort-order">1</td><td><em class="text-muted">All Korea, South</em></td><td class="text-right">243</td><td class="text-right">1</td><td class="text-right">7</td><td class="text-right">81</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [217,222,225,229,230,232,234,236,237,238,240,240,242,243],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/kosovo.html
Normal file
172
public/countries/kosovo.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.305Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Kosovo</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,4,5,5,7,7,7,7,8,8,11,12,12,12,12,12,12,12,12,12,12],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Kosovo"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="12" data-yesterday="0" data-week="0" data-month="11"><td class="sort-order">1</td><td><em class="text-muted">All Kosovo</em></td><td class="text-right">12</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">11</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [7,8,8,11,12,12,12,12,12,12,12,12,12,12],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/kuwait.html
Normal file
172
public/countries/kuwait.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:33.363Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Kuwait</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,3,3,3,5,6,7,9,11,13,14,15,19,20],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Kuwait"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="20" data-yesterday="1" data-week="11" data-month="20"><td class="sort-order">1</td><td><em class="text-muted">All Kuwait</em></td><td class="text-right">20</td><td class="text-right">1</td><td class="text-right">11</td><td class="text-right">20</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [2,3,3,3,5,6,7,9,11,13,14,15,19,20],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/kyrgyzstan.html
Normal file
172
public/countries/kyrgyzstan.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.360Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Kyrgyzstan</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,4,4,4,5,5,5,5,5,5,5,5,5,5,7,7,7,8,8,8,8],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Kyrgyzstan"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="8" data-yesterday="0" data-week="1" data-month="8"><td class="sort-order">1</td><td><em class="text-muted">All Kyrgyzstan</em></td><td class="text-right">8</td><td class="text-right">0</td><td class="text-right">1</td><td class="text-right">8</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [5,5,5,5,5,5,5,7,7,7,8,8,8,8],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
172
public/countries/laos.html
Normal file
172
public/countries/laos.html
Normal file
@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html><head><title>Global Deaths</title><meta charset="utf8"><link rel="stylesheet" href="/bootstrap.css"><script src="/Chart.bundle.js"></script><style>table td {
|
||||
vertical-align: middle !important;
|
||||
}</style></head><body><div class="container"><h1>Covid-19 Data</h1><p class="text-muted"><em>Data from <a href="https://github.com/CSSEGISandData/COVID-19">Johns Hopkins CSSE</a>.
|
||||
This page generated from latest data as of 2020-04-27T03:01:36.413Z.
|
||||
</em></p><div class="main-content"><h2><a class="float-right" href="/" style="font-size: 50%">◀ All Countries</a>Laos</h2><div class="card"><div class="card-body"><canvas class="mx-auto" id="main-chart" width="800" height="450"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('main-chart');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31","2020-02-01","2020-02-02","2020-02-03","2020-02-04","2020-02-05","2020-02-06","2020-02-07","2020-02-08","2020-02-09","2020-02-10","2020-02-11","2020-02-12","2020-02-13","2020-02-14","2020-02-15","2020-02-16","2020-02-17","2020-02-18","2020-02-19","2020-02-20","2020-02-21","2020-02-22","2020-02-23","2020-02-24","2020-02-25","2020-02-26","2020-02-27","2020-02-28","2020-02-29","2020-03-01","2020-03-02","2020-03-03","2020-03-04","2020-03-05","2020-03-06","2020-03-07","2020-03-08","2020-03-09","2020-03-10","2020-03-11","2020-03-12","2020-03-13","2020-03-14","2020-03-15","2020-03-16","2020-03-17","2020-03-18","2020-03-19","2020-03-20","2020-03-21","2020-03-22","2020-03-23","2020-03-24","2020-03-25","2020-03-26","2020-03-27","2020-03-28","2020-03-29","2020-03-30","2020-03-31","2020-04-01","2020-04-02","2020-04-03","2020-04-04","2020-04-05","2020-04-06","2020-04-07","2020-04-08","2020-04-09","2020-04-10","2020-04-11","2020-04-12","2020-04-13","2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18","2020-04-19","2020-04-20","2020-04-21","2020-04-22","2020-04-23","2020-04-24","2020-04-25","2020-04-26"],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Deaths',
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
fill: true,
|
||||
borderColor: 'rgb(196, 64, 64)',
|
||||
backgroundColor: 'rgba(196, 64, 64, 0.5)',
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
title: {
|
||||
display: true,
|
||||
position: 'top',
|
||||
text: "Laos"
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: true,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></div></div><div class="table-responsive" id="table"><table class="table table-sm table-hover"><thead><tr><th>#</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:name:asc">▲</a><a href="#sort:name:desc">▼</a></span>State/Province</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:total:asc">▲</a><a href="#sort:total:desc">▼</a></span>Deaths</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:yesterday:asc">▲</a><a href="#sort:yesterday:desc">▼</a></span>…since yesterday</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:week:asc">▲</a><a href="#sort:week:desc">▼</a></span>…since last week</th><th><span class="sortables float-left mr-2 d-inline-flex flex-column" style="font-size: 50%"><a href="#sort:month:asc">▲</a><a href="#sort:month:desc">▼</a></span>…month-to-date</th><th>Last 14 days</th></tr></thead><tbody><tr id="row-" data-name="" data-total="0" data-yesterday="0" data-week="0" data-month="0"><td class="sort-order">1</td><td><em class="text-muted">All Laos</em></td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td class="text-right">0</td><td><canvas id="sparkline-0" width="200" height="50"></canvas><script>(function() {
|
||||
const canvas = document.getElementById('sparkline-0');
|
||||
const chart = new Chart(canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14 ],
|
||||
datasets: [
|
||||
{
|
||||
data: [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
|
||||
}
|
||||
],
|
||||
},
|
||||
options: {
|
||||
responsive: false,
|
||||
legend: {
|
||||
display: false,
|
||||
},
|
||||
elements: {
|
||||
line: {
|
||||
borderColor: '#000000',
|
||||
borderWidth: 1,
|
||||
},
|
||||
point: {
|
||||
radius: 0,
|
||||
},
|
||||
},
|
||||
tooltips: {
|
||||
enabled: false,
|
||||
},
|
||||
scales: {
|
||||
yAxes: [
|
||||
{
|
||||
display: false,
|
||||
ticks: {
|
||||
precision: 0,
|
||||
beginAtZero: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
xAxes: [
|
||||
{
|
||||
display: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
</script></td></tr></tbody></table></div><script>(function() {
|
||||
const tbody = document.getElementById('table').querySelector('tbody');
|
||||
const allRows = [].slice.call(tbody.querySelectorAll('tbody tr'));
|
||||
|
||||
const resortTable = () => {
|
||||
let nextChild = null;
|
||||
for (let i = allRows.length - 1; i >= 0; i--) {
|
||||
const row = allRows[i];
|
||||
if (!row) {
|
||||
continue;
|
||||
}
|
||||
if (row === nextChild) {
|
||||
continue;
|
||||
}
|
||||
|
||||
tbody.insertBefore(row, nextChild);
|
||||
row.querySelector('.sort-order').textContent = (i + 1).toString();
|
||||
nextChild = row;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSort = (value, dir) => {
|
||||
const newSortDir = dir === 'desc' ? 'desc' : 'asc';
|
||||
const sortByNumberThenName = (attr) => {
|
||||
allRows.sort((a, b) => {
|
||||
const aValue = Number(a.getAttribute('data-' + attr));
|
||||
const bValue = Number(b.getAttribute('data-' + attr));
|
||||
if (aValue === bValue) {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return aValue < bValue ?
|
||||
(newSortDir === 'asc' ? -1 : 1) :
|
||||
(newSortDir === 'asc' ? 1 : -1);
|
||||
});
|
||||
resortTable();
|
||||
};
|
||||
switch (value) {
|
||||
case 'name':
|
||||
allRows.sort((a, b) => {
|
||||
const aName = a.getAttribute('data-name');
|
||||
const bName = b.getAttribute('data-name');
|
||||
if (newSortDir === 'asc') {
|
||||
return aName.localeCompare(bName);
|
||||
}
|
||||
|
||||
return bName.localeCompare(aName);
|
||||
});
|
||||
resortTable();
|
||||
break;
|
||||
case 'total':
|
||||
sortByNumberThenName('total');
|
||||
break;
|
||||
case 'yesterday':
|
||||
sortByNumberThenName('yesterday');
|
||||
break;
|
||||
case 'week':
|
||||
sortByNumberThenName('week');
|
||||
break;
|
||||
case 'month':
|
||||
sortByNumberThenName('month');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const handleHash = (hash) => {
|
||||
const sortValue = hash.replace(/^#sort:/, '').split(':');
|
||||
handleSort(sortValue[0], sortValue[1]);
|
||||
};
|
||||
|
||||
window.addEventListener('hashchange', () => {
|
||||
handleHash(window.location.hash);
|
||||
});
|
||||
|
||||
handleHash(window.location.hash);
|
||||
}());</script></div></div></body></html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user