www.crosshyou.info

政府統計の総合窓口のデータや、OECDやUCIやのデータを使って、Rの練習をしています。ときどき、読書記録も載せています。

2022-10-01から1ヶ月間の記事一覧

OECD Researchers data analysis 3 - 5 Named Graphs in R

UnsplashのPhong Nguyenが撮影した写真 www.crosshyou.info This post is following of the above post.In this post I will create 5 names graphs in R. I refer to Chapter 2 Data Visualization | Statistical Inference via Data Science (moderndive.c…

OECD Researchers data analysis 2 - Converting long format dataframe to wide format dataframe and merge two dataframes with R

UnsplashのSakuraが撮影した写真 www.crosshyou.info This post is floowing of the above post. Let's explore gdp dataframe. gdp dataframe has more LOCATION than researcher dataframe. gdp dataframe INDICATOR has only one calue, GDP. So I can re…

読書記録 - 「生物学探偵セオ・クレイ 森の捕食者」 アンドリュー・メイン著 ハヤカワ・ミステリ文庫

生物学探偵セオ・クレイ 森の捕食者 (ハヤカワ・ミステリ文庫) 作者:アンドリュー メイン 早川書房 Amazon 著者は有名なマジシャンだそうです。才能がいっぱいあるのですね。 主人公のセオ・クレイは生物工学(原著を確認していなですが、たぶん、bioinfomati…

OECD Researchers data analysis 1 - Load CSV file into R with read_csv() function.

UnsplashのMarek Piwnickiが撮影した写真 In this post, I will analyze OECD Researchers data. Researchers are professionals engaged in the conception or creation of new knowledge, products, processes, methos and systems, as well as in the man…

都道府県別の経済構造実態調査のデータの分析6 - R言語のlm()関数で回帰分析をして、ggplot() + geom_point() + geom_abline()で散布図に回帰直線を重ねる

UnsplashのClement Souchetが撮影した写真 www.crosshyou.info の続きです。 前回はANOVA分析をしてみました。今回は回帰分析をしてみようと思います。 pc_val: 一人当たりの売上高を被説明変数にして回帰分析をしてみます。 まず、p_male304050: 30代40代50…

都道府県別の経済構造実態調査のデータの分析5 - R言語のaov()関数でANOVA分析

UnsplashのAlex Personが撮影した写真 www.crosshyou.info の続きです。 前回行ったクラスタリングの結果をデータフレーム、dfにくっつけます。 まず、dfがどんなものだったか、str()関数で確認します。 これにクラスタリングの結果をくっつけたいので、まず…

読書記録 - 「東京国税局査察部」 立石勝規 著 岩波新書

東京国税局査察部 (岩波新書) 作者:立石 勝規 岩波書店 Amazon 1999年に出版された本なので、東京国税局査察部が現在もこの本に書かれているようなものなのかはわかりませんが、1999年当時を思い出すことができました。 金丸信の脱税や、山一證券の自主廃業…

都道府県別の経済構造実態調査のデータの分析4 - R言語でhierarchial clusteringとk-means clusteringを実行する。

UnsplashのSebastian Unrauが撮影した写真 www.crosshyou.info 前回はデータフレームを大きい順、小さい順に並び替えました。東京都や大阪府などが値が大きくて、奈良県などが値が小さかったです。 そこで今回は、R言語でクラスタリングを実行してみたいと思…

都道府県別の経済構造実態調査のデータの分析3 - R言語でデータフレームを大きい順・小さい順に並び替える。

UnsplashのBoris Smokrovicが撮影した写真 www.crosshyou.info の続きです。 前回は都道府県ごとの統計値のデータフレーム、(stat_prefと名前をつけた)、を作成しました。今回はこのデータフレームを並び替えてどういう都道府県が値が大きいのかを調べてみま…

都道府県別の経済構造実態調査のデータの分析2 - R言語の tapply() 関数で産業別、都道府県別の統計値を算出する。

UnsplashのMarek Piwnickiが撮影した写真 www.crosshyou.info の続きです。 前回はCSVファイルにあるデータをR言語に読み込ませ、分析用のデータフレームを作成するところまで進みました。 まず、hist()関数でvalue: 売上高(百万円単位)の分布をみてみましょ…

都道府県別の経済構造実態調査のデータの分析1 - R言語にCSVファイルのデータを読み込む。

UnsplashのAaron Burdenが撮影した写真 今回は都道府県別の経済構造実態調査のデータを分析してみようと思います。 まず、政府統計の総合窓口(e-stat.go.jp)からデータをダウンロードします。 経済構造実態調査は、我が国の製造業及びサービス産業における企…

読書記録 - 「日本のコメ問題 - 5つの転換点と迫りくる最大の危機」 小川真如 著 中公新書

日本のコメ問題-5つの転換点と迫りくる最大の危機 (中公新書 2701) 作者:小川 真如 中央公論新社 Amazon コメ問題と田んぼ問題がごちゃまぜになっていることが問題のようです。 今世紀中、この本では2052年ごろに、日本の農地が余る状態、つまり、全部の農…

OECD Non-Financial Corporations Debt to Surplus Ratio Analysis 6 - Hierarchical Clustering using R

UnsplashのWolfgang Hasselmannが撮影した写真 www.crosshyou.info This post is following of the above post.In this post, I will do hierarchical clustering using R. It is very easi with R. Firstly, I make a matrix for hierarchical clustering. …

OECD Non-Financial Corporations Debt to Surplus Ratio Analysis 5 - arranging data frame and make a bar chart using R.

UnsplashのPierre Lemosが撮影した写真 www.crosshyou.info Thsi post is following of the above post. In this post I will arrange data frame with arrange() function of dplyr packkage. Let's make a graph with ggplot2 packages. LUX has the highe…

OECD Non-Financial Corporations Debt to Surplus Ratio Analysis 4 - t-test, Wilcoxon rank sum test and correlation test using R

Unsplashのmartin bennieが撮影した写真 www.crosshyou.info This post is following of above post. Let's calculate difference between Y2016 and Y2015 Let's see a histogram of d2016 Then, let's calculate difference between Y2017 and Y2016 Let's…