www.crosshyou.info

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

OECD Purchasing power parities (PPP) data analysis 2 - TUR, MEX and ISL have volatile PPP and LUX, BEL and CAN have stable PPP

f:id:cross_hyou:20211225085124j:plain

Photo by Drew Bae on Unsplash 

www.crosshyou.info

This post is following of the above post.

In this post, let's make some graphs.

Firstly, let's see year vs. ppp. I use plot() function.

f:id:cross_hyou:20211225090156p:plain

f:id:cross_hyou:20211225090207p:plain

We see 2 countries have relatively high ppp than oters.

Let's convert ppp to logarithmic value and make a graph.

f:id:cross_hyou:20211225090626p:plain

f:id:cross_hyou:20211225090639p:plain

We see 1960's ppp are more variance than 2020's ppp.

Let's make histogram. I use hist() function.

f:id:cross_hyou:20211225091506p:plain

f:id:cross_hyou:20211225091517p:plain

Then, let's see iso vs. ppp

f:id:cross_hyou:20211225091909p:plain

f:id:cross_hyou:20211225091921p:plain

I see ISL and JPN are very different than others.

Let's make a graph with log(ppp).

f:id:cross_hyou:20211225092206p:plain

f:id:cross_hyou:20211225092220p:plain

I see TUR, MEX and ISL are very volatile.

Let's see which country are volatile/stable for ppp. I use filter(), group_by(), summarize() and arrange() function.

f:id:cross_hyou:20211225092653p:plain

As you see in the previous graph, TUR, MEAX and ISL are top 3 volatiole ppp countries.

Which are stable countries?

f:id:cross_hyou:20211225093043p:plain

USA has zero sd because ppp is based on us dollar. LUX, BEL and CAN are top 3 stable ppp countries.
Let's make a barchart. I use ggplot() + geom_bar() function and I use coord_flip() function to flip X-axis and Y-axis.

f:id:cross_hyou:20211225093744p:plain

f:id:cross_hyou:20211225093757p:plain

That's it. Thank you!

Next post is

 

www.crosshyou.info

 

To read the 1st post,

 

www.crosshyou.info