www.crosshyou.info

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

OECD Household savings data analysis 4 - Join World Bank per capita GDP data using R inner_join() function

Generated by Bing Image Creator: Photographs of rape blossoms like an illustrated book, more shiny and green

www.crosshyou.info

This post is following of above post. In the previous post, I found year 2000 is a special year for household savings using linear regression analysis.

Next, I would like to analyze relationship between per capita GDP and household savings.

Since OECD data web site has changed, I could not download per capita GDP data from OECD web site, I download per capita GDP data from World Bank web site. GDP per capita (current US$) | Data (worldbank.org)

I got CSV file like below.

I use read_csv() to import data.

Since World Bank's CSV file is not "tidy" data, I need some workaround for tidying data.

Then, I use inner_join() function.

Good! 

Let's make a scatter plot to see savings and per_capita_gdp relationship.

I see overall relationship between househould savings and per capita gdp is positive correlation.

That's it!   Thank you!

Next post is

www.crosshyou.info

 


To read from the first post,

www.crosshyou.info