<iframe src="https://exploratory.io/viz/2ac8ae888097/0209867843760033?embed=true" frameborder="0" width="100%" height="100%" > </iframe>
各年代毎の横綱の在位期間を示したチャート。Qiitaの記事「昭和以降の全横綱データをスクレイプしてサバイバル分析にかけたら、突っ張り横綱は短命なのがわかった。」(https://qiita.com/hidekoji/items/8fc1d40f2ac1118ed0c5) で使われているデータです。
EDFをインポートした後に、画面左手のツリーのスクリプトの横のプラスボタンを押して、以下をカスタムスクリプトとして保存してください。
convert_from_gengo = function(gengo, year_column){ case_when( gengo == "寛政" ~ (year_column + 1789), gengo == "文政" ~ (year_column + 1818), gengo == "天保" ~ (year_column + 1831), gengo == "弘化" ~ (year_column + 1845), gengo == "嘉永" ~ (year_column + 1848), gengo == "文久" ~ (year_column + 1861), gengo == "元治" ~ (year_column + 1864), gengo == "慶応" ~ (year_column + 1865), gengo == "明治" ~ (year_column + 1868), gengo == "大正" ~ (year_column + 1912), gengo == "昭和" ~ (year_column + 1925), gengo == "平成" ~ (year_column + 1988) ); } convert_from_season_to_month = function(season_column){ case_when( str_detect(season_column, "春") ~ 3, str_detect(season_column, "夏") ~ 5, str_detect(season_column, "秋") ~ 9, str_detect(season_column, "冬") ~ 12, str_detect(season_column, "初") ~ 1, str_detect(season_column, "名") ~ 7, str_detect(season_column, "九") ~ 11, TRUE ~ 5 ) }
力士情報のスクレイピング元
http://sumo-hositori.com/ichiran/yokozuna.html http://sumo.or.jp/ResultData/torikumi https://ja.wikipedia.org/wiki/横綱一覧 (こちらの横綱一覧のページに、それぞれの横綱のページへのリンクがあります。)