Skip to content

Instantly share code, notes, and snippets.

[
{ "country": "Korea", "cases": "6593", "deaths": "43", "death_rate": "0.0065"},
{ "country": "Iran", "cases": "4747", "deaths": "124", "death_rate": "0.0261"},
{ "country": "Italy", "cases": "3927", "deaths": "148", "death_rate": "0.0377"},
{ "country": "Diamond Princess Cruises", "cases": "696", "deaths": "6", "death_rate": "0.0086"},
{ "country": "France", "cases": "577", "deaths": "7", "death_rate": "0.0121"},
{ "country": "Germany", "cases": "565", "deaths": "0", "death_rate": "0"},
{ "country": "Japan", "cases": "416", "deaths": "6", "death_rate": "0.0144"},
{ "country": "Spain", "cases": "345", "deaths": "5", "death_rate": "0.0145"},
{ "country": "United States", "cases": "234", "deaths": "14", "death_rate": "0.0598"},
[
{ "country": "韓国", "cases": "6593", "deaths": "43", "death_rate": "0.0065"},
{ "country": "イラン", "cases": "4747", "deaths": "124", "death_rate": "0.0261"},
{ "country": "イタリア", "cases": "3927", "deaths": "148", "death_rate": "0.0377"},
{ "country": "Diamond Princess", "cases": "696", "deaths": "6", "death_rate": "0.0086"},
{ "country": "フランス", "cases": "577", "deaths": "7", "death_rate": "0.0121"},
{ "country": "ドイツ", "cases": "565", "deaths": "0", "death_rate": "0"},
{ "country": "日本", "cases": "416", "deaths": "6", "death_rate": "0.0144"},
{ "country": "スペイン", "cases": "345", "deaths": "5", "death_rate": "0.0145"},
{ "country": "アメリカ", "cases": "234", "deaths": "14", "death_rate": "0.0598"},
@kenmomd
kenmomd / epi.r
Last active March 27, 2020 15:18
とりあえず作った日本のエピカーブ作成のRスクリプトです
#とりあえず作った日本のエピカーブ作成のRスクリプトです
#とりあえずエクセルで、不明、不詳、N/Aを空白にしてRで削除する形でやりました
library(tidyverse)
library(readxl)
#エクセルファイルから読み込み
P <- read_excel("positivelist.xlsx")
P %>%
<html>
<head>
<meta charset="utf-8" />
<title>Results</title>
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" ;
color: #333333 ;
<html>
<head>
<meta charset="utf-8" />
<title>Results</title>
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" ;
color: #333333 ;
<html>
<head>
<meta charset="utf-8" />
<title>Results</title>
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" ;
color: #333333 ;
<html>
<head>
<meta charset="utf-8" />
<title>Results</title>
<style>
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" ;
color: #333333 ;
@kenmomd
kenmomd / Fukuoka0407.R
Last active April 8, 2020 14:33
Rスクリプト。2020-4-7時点での福岡のCOVID-19症例数のグラフ
#ライブラリ読み込み
library(tidyverse)
library(lubridate)
#カラーパレット
library(ggsci)
#パーセント処理
library(scales)
#作業フォルダ指定
setwd("~/nCov2019/r/")
県名 日付 検査数 累積陽性者数 累積経路不明数 週間陽性率 日別経路不明数 日別陽性者数 週間陽性率(経路不明のみ) 日別検査数 陽性(発症日) 陽性(経路不明)(発症日) 陽性(渡航歴)(発症日)
北海道 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
青森県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
岩手県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
宮城県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
秋田県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
山形県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
福島県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
茨城県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
栃木県 2020/1/25 0 0 0 0 0 0 0 0 0 0 0
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 16 columns, instead of 8. in line 8.
ID,都道府県,陽性者数,陽性者数.経路不明,人口100万人あたり陽性者数,人口100万人あたり経路不明数,検査数,人口100万人あたり検査数,人口.1000人,可住地面積.km2,電車通勤率,バス通勤率,公共交通機関通勤率,cluster1,コメント,ソース
01,北海道,914,415,173 ,79 ,6312,1194 ,5286,21900.73,8.2,4.9,13.1,2,電車バスの通勤・通学率は%。平成22年国勢調査より,https://www.stat.go.jp/data/kokusei/2010/final/pdf/01-11_5.pdf
02,青森県,26,6,21 ,5 ,644,510 ,1263,3204,1.5,3,4.5,1,面積,https://www.e-stat.go.jp/stat-search/files?page=1&query=面積&layout=dataset&toukei=00200502&tstat=000001067959&cycle=0&tclass1=000001067961&stat_infid=000028462316&metadata=1&data=1
03,岩手県,0,0,0 ,0 ,341,275 ,1241,3710.12,2.5,2.5,5,1,陽性者数は5/4時点、検査数は4/29,https://docs.google.com/spreadsheets/d/1Cy4W9hYhGmABq1GuhLOkM92iYss0qy03Y1GeTv4bCyg/
04,宮城県,88,43,38 ,19 ,1811,782 ,2316,3130.32,8.5,4.1,12.6,1,人口,https://docs.google.com/spreadsheets/d/198iLFeCeiSOwNjNK4Isvh23Pm89OLNcKBK3rrMpkRuQ/
05,秋田県,16,9,16 ,9 ,827,843 ,981,3154.63,2,1.6,3.6,1,,
06,山形県,69,12,63 ,11 ,2138,1961 ,1090,2850.08,1.9,0.9,2.8,1,,
07,福島県,80,30,43 ,16 ,1736,931 ,1864,4218.29,3,1.7,4.7,1,,
08,茨城県,168,50,58 ,17 ,3437,1195