Rで何かをしたり、読書をするブログ

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

OECD Household disposable income data analysis 1 - import data into R

f:id:cross_hyou:20210813192102j:plain

Photo by Bob Brewer on Unsplash

f:id:cross_hyou:20210813191610p:plain

In this post, I will analyze OECD Household disposable income.

Household accounts - Household disposable income - OECD Data

I got below CSV file from the web site.

f:id:cross_hyou:20210813192409p:plain

I will import this data into R.

First of all, I load tidyverse packages.

f:id:cross_hyou:20210813192630p:plain

Then, I use read_csv() function to import CSV data into R.

f:id:cross_hyou:20210813193009p:plain

I use tolower() function to variable names into lowercase.

f:id:cross_hyou:20210813193158p:plain

From location to frequency, I change them to factor class.

f:id:cross_hyou:20210813193506p:plain

Then, I use summary() function to see data frame; df summary.

f:id:cross_hyou:20210813193657p:plain

We see indicator has one observation value; HHDI. HHDI stands for HouseHold Disposable Income, I think. We can delete this variable. frequency also has only one observation value; A. A means Annual. We can also delete this.

We see there is not NA value in the data frame.

f:id:cross_hyou:20210813194136p:plain

That's it. Thank you!

The next post is..

 

www.crosshyou.info