新型コロナウイルス感染症に関する報道発表資料(発生状況、国内の患者発生、海外の状況、その他)
https://www.mhlw.go.jp/stf/seisakunitsuite/bunya/0000121431_00086.html
データサンプル
https://www.mhlw.go.jp/stf/newpage_13640.html
const html = `(上のテーブルをコピペする)`
// カンマ区切りの数字のカンマ削除、タブを,に変換して CSVライクにする
const csv = html.replaceAll(',', '').replaceAll('\t', ',')
// 改行ごとに配列に変換
const arr = csv.split('\n')
// ほしいデータに整形
const data = arr.map(d => {
const [name, a,b ] = d.split(',')
return {name, a: parseInt(a, 10), b: parseInt(b, 10)}
})
// 感染者数の降順にする
data.sort((a, b) => -(a.a - b.a))