www.crosshyou.info

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

都道府県別の水質汚濁物排出量総合調査のデータ分析7 - R で階層的クラスタリング

Bing Image Creator で生成: Summer season, Landscape, Green Mountains which have snow on the top, yellow flowers, Photo www.crosshyou.info の続きです。 今回は、R で階層的クラスタリングをしてみようと思います。 まずは、クラスタリングのための…

都道府県別の水質汚濁物排出量総合調査のデータ分析6 - R で水質が改善した都道府県、悪化した都道府県を調べた。

Bing Image Creator で生成: Blue image landscape, Japanese local area, splendid moment, photo style www.crosshyou.info の続きです。 前回は、R でシミュレーションベースの回帰分析を実行しました。l_quality は l_quantity, l_fuka と関連があること…

都道府県別の水質汚濁物排出量総合調査のデータ分析5 - R の infer で tidy な 重回帰分析 (Multiple Regression Analysis)

Bing Image Creator で生成: North Area Landscape, breezing wind, photograph style www.crosshyou.info の続きです。前回は、R の infer パッケージを利用して、ANOVA(Analysis of Variance) 分析をしました。今回は、infer パッケージで Multiple Regres…

都道府県別の水質汚濁物排出量総合調査のデータ分析4 - R の infer で tidy な ANOVA(Analysis of Variance) 分析

Bing Image Creator で生成: Photo, landscape of higher mountains and great fall, a few flowers, white clouds, blue sky www.crosshyou.info の続きです。前回は箱ひげ図を作成して、生活環境項目 5 項目ごとのデータの分布を見ました。前々回はヒスト…

読書記録 - 「法とは何か 新版」 渡辺 洋三 著 (岩波新書)

法とは何か 新版 (岩波新書) 作者:渡辺 洋三 岩波書店 Amazon 旧版は 1979 年に出版され、この新版は 1998 年に出版されています。 新版とはいえ、四半世紀以上昔の本なので、現代の法律制度とは違っている部分があるので、その点は注意が必要かと思いました…

都道府県別の水質汚濁物質排出量総合調査のデータ分析3 - R で箱ひげ図を作成して、各生活環境項目別のデータを視覚化する

Bing Image Creatorで生成: Landscape, southern islands, green grass, white cloud, tiny flowers, photo www.crosshyou.info の続きです。前回は各年度別のヒストグラムを作成しました。年度によって大きな違いはなさそうでした。 今回は、five: 生活環境…

都道府県別の水質汚濁物質排出量総合調査のデータ分析2 - R でヒストグラムを作成して、各年度の分布を視覚化する

Bing Image Creatorで生成: Photo, Landscape in Summer season, quiet sense of wonder, hibiscus flowers www.crosshyou.info の続きです。 前回は各変数の度数や平均値などの統計量を調べました。 今回は変数のデータを視覚化してみます。 num: 事業場数…

都道府県別の水質汚濁物質排出量総合調査のデータ分析1- R に CSV ファイルのデータを読み込み、分析用のデータフレームを作成する。

Bing Image Creatorで生成: Photo, Spring Landscape, quiet flower garden今回は、都道府県別の水質汚濁物質排出量総合調査のデータを分析してみようと思います。政府統計の総合窓口(www.e-stat.go.jp)からデータを取得します。 こんな感じのデータです。 …

都道府県別の自動車(バス)輸送統計調査のデータ分析8 - R の princomp() 関数で主成分分析

Bing Image Generatorで生成: Photo, Winter snow field with red cameria www.crosshyou.info の続きです。 今回は、R で主成分分析をしてみようと思います。 Rによるデータサイエンス(第2版):データ解析の基礎から最新手法まで 作者:金 明哲 森北出版 Amaz…

読書記録 - 「化石に眠るDNA 絶滅動物は復活するか」 更科 功 著 (中公新書)

化石に眠るDNA 絶滅動物は復活するか (中公新書) 作者:更科功 中央公論新社 Amazon 自然界には生物の死骸や糞尿、汗などの由来の DNA がそこらじゅうにあるそうです。環境 DNA というらしいです。 なので、化石から DNA を取り出して分析するときは、それ…

都道府県別の自動車(バス)輸送統計調査のデータ分析7 - R で階層的クラスタリング

Bing Image Creator で生成: 風景写真、春の季節の穏やかな午後、小さな白い花が咲いている www.crosshyou.info の続きです。 前回、前々回で回帰分析をしました。バスの輸送人員の変化と人口の変化やエネルギー消費の変化と関係がないことがわかりました。 …

都道府県別の自動車(バス)輸送統計調査のデータ分析6 - エネルギー消費統計調査のデータも加えて回帰分析 - infer パッケージでシミュレーションベースの回帰分析

Bing Image Creator で生成: long far view photo, corn field and cotton flowers photo www.crosshyou.info の続きです。 前回は、輸送量の変化を人口の増減で回帰分析してみました。結果は人口は関係ない、という結果でした。 今回はさらに、 エネルギー…

都道府県別の自動車(バス)輸送統計調査のデータ分析5 - 人口の増減で回帰分析

Bing Image Creator で生成: 青い空に白い雲が3つあって、虹がかかっている。パンジーの花がたくさん咲いている、写真 www.crosshyou.info の続きです。 前回は輸送量の増えた地域、減った地域を調べてみました。 今回は、この増減が人口と関わりがあるのか…

読書記録 - 「悩みいろいろ - 人生に効く物語50」 金子 勝 著 (岩波新書)

悩みいろいろ――人生に効く物語50 (岩波新書) 作者:金子 勝 岩波書店 Amazon 慶應義塾大学の経済学の金子先生の、朝日新聞の人生相談欄での回答をまとめたものです。 この本の特徴は、相談者の悩みに対して、金子先生が、落語や小説などの中から相応しい話を…

都道府県別の自動車(バス)輸送統計調査のデータ分析4 - 2020年度と2022年度の比較で輸送量の増えた地域を探す

Bing Image Creator で生成: 春の日差しが暖かさを感じる。穏やかな日本の草原の写真 www.crosshyou.info の続きです。 前回の分析で、2020年度と2022年度では統計的に有意な違い、2022年度のほうが輸送量が増えていることがわかりました。 今回は、2020年度…

都道府県別の自動車(バス)輸送統計調査のデータ分析3 - R の lm() 関数で回帰分析をして、2020年度と2022年度に統計的に有意な違いがあるかどうかを調べる。

Bing Image Creator で生成: 幻想的な風景写真、春の小川 www.crosshyou.info の続きです。前回は各変数のヒストグラムを年度ごとにヒストグラムを作成しました。 その結果、どうやら、2020年度、2021年度、2022年度と年を経るごとに自動車(バス)の輸送量は…

都道府県別の自動車(バス)輸送統計調査のデータ分析2 - R のggplot() + geom_histogram() でヒストグラム

Bing Image Creator で生成: 透明感のある風景写真。大きな滝とスイセンの花 www.crosshyou.info の続きです。 前回は、CSV ファイルを R に読み込ませてデータフレームを作成しました。 今回は読み込んだデータの視覚化、ヒストグラムを描いてみます。 まず…

都道府県別の自動車(バス)輸送統計調査のデータ分析1 - Rにデータを読み込ませる。

Bing Image Creator で生成 : 風景写真、大きな入道雲と虹、ハイビスカスの花 今回は、都道府県別の自動車輸送統計調査のデータを分析してみます。 政府統計の総合窓口(e-stat)からデータを取得します。 このようなファイルです。 一般の乗合バス、高速の乗…

World Bank Population living in slums data analysis 6 - Hierarchical Clustering using R

Generated by Bing Image Creator: Unique landscape view traditional Japanese local area with rape blossoms, photo www.crosshyou.info This post is followong of the above post. In this post I will do hierarchical clustering using R. First I m…

World Bank Population living in slums data analysis 5 - Simulation based multiple regression analysis with R infer package

Generated by Bing Image Creator: Long view from far, small creek, a few trees, one side road along with beautiful flowers, blue sky and white clouds, photo www.crosshyou.info This post is followng of the above post. In this post, I will do…

World Bank Population living in slums data analysis 4 - Simulation based statistical inference with R infer package

Generated by Bing Image Creatpr: Wide large view of rice fields in the summer, blue sky and sunflower www.crosshyou.info This post is following of the above post. In this post I will do simulation based statistical inference with R infer p…

読書記録 - 「教養としての建築入門 - 見方、作り方、活かし方」 坂牛 卓 著 (中公新書)

教養としての建築入門-見方、作り方、活かし方 (中公新書 2764) 作者:坂牛 卓 中央公論新社 Amazon 非常に読みやすい本でした。なんでだろうと考えると、章や節にこの章/節では~~のことを話します、と導入があって、終わりには、~~とはこういうことでし…

World Bank Population living in slums data analysis 3 - Which country has decreased living in slums most?

Generated by Bing Image Creator: Long view from the sky, high mountains and green grass fields, photo www.crosshyou.info This post is following of the above post. In the previous post, I find data start from 2000 to 2020. So, let's see how…

World Bank Population living in slums data analysis 2 - making histograms using R

Generated by Bing Image Creator: Beautiful flower bucket, photo www.crosshyou.info This post is following of the above post. In the previous post, I load Population living in slums data into R. In this post, I will make histograms using R …

World Bank Population living in slums data analysis 1 - import CSV file data into R and tidying data.

Generated by Bing Image Creator: Local area photograph, apple trees, blue sky and white clouds In this post, I will analyze World Bank Population living in slums data using R. Population living in slums (% of urban population) | Data (worl…

UCI の Adult データの分析6 - R の rpart パッケージで決定木での分類 (Classification)

Generated by Bing Image Creator: 遠くの空からの風景写真。牧場に牛が数頭いる。可愛い青い花がたくさん咲いている。 www.crosshyou.info の続きです。 今回は R の rpart パッケージで決定木の方法で分類に挑戦してみたいと思います。まず、rpart, rpart.…

読書記録 - 「食の歴史」 ジャック アタリ 著 プレジデント社

食の歴史 作者:ジャック・アタリ プレジデント社 Amazon 知人が、面白いと言っていたので読んでみました。 面白かったです。 北京原人やアウストラロピテクスの頃から現在までの食の歴史、そしてこれからがコンパクト(といっても 360 ページくらい) にまとめ…

UCI の Adult データの分析5 - R の FNN パッケージで、k-nearest neighbors での Classification

Generated by Bing Image Creator: 広い野原に小川と小道があって、菜の花がいっぱい咲いていて、空は青空の写真 www.crosshyou.info の続きです。 今回は、R の FNN パッケージで、k-nearest neighbors での分類をします。 まずは、FNN パッケージの読み込…

UCI の Adult データの分析4- R の glmnet パッケージを使って、 LASSO, Ridge, Elastic-Net Regression で income の分類に挑戦

Generated by Bing Image Creator: Photo of old times, beautiful mountains scenery, blue sky and white clouds, cheerful flowers www.crosshyou.info の続きです。前回は、 glmnet パッケージで income の分類をするための前準備でした。今回は、実際に…

UCI の Adult データの分析3 - R の glmnet パッケージを使って LASSO, Ridge, Elastic-Net Regression で分類するための前準備

Generated by Bing Image Creator: Long wide view of green grass field. Blue sky and a few white clouds. red flower, yellow flower and blue flower are shining. Photo www.crosshyou.info の続きです。前回と前々回で income と他の変数との関係をグ…