www.crosshyou.info

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

OECD Gender wage gap data analysis 2 - Data Visualization using R ggplot() + geom_histogram(), geom_points(), geom_line()

f:id:cross_hyou:20210829140157j:plain

 Photo by Luca Bravo on Unsplash  

www.crosshyou.info

 This post is following of above post.

I will makse some graphs for data visualization using R.

Fist, let's see how our data are distributed.

I use ggplot() + geom_histogram()

First, emp(employed gendar gap)

f:id:cross_hyou:20210829140525p:plain

f:id:cross_hyou:20210829140536p:plain

We see double top distribution for emp.

How about self(selfemployed gendar gap)

f:id:cross_hyou:20210829140702p:plain

f:id:cross_hyou:20210829140713p:plain

self is single top distribution form.

How about year?

f:id:cross_hyou:20210829140848p:plain

f:id:cross_hyou:20210829140859p:plain

Some year has more than 20 observations.

Next, let's see scatter plots using ggplot() + geom_point()

First, emp vs. self

f:id:cross_hyou:20210830113603p:plain

f:id:cross_hyou:20210830113612p:plain

There seems not strong linear relationship.

year vs. emp

f:id:cross_hyou:20210829141646p:plain

f:id:cross_hyou:20210829141658p:plain

I added year average line with using geom_line().

There seems slightly down trend.

How about year vs. self?

f:id:cross_hyou:20210829142041p:plain

f:id:cross_hyou:20210829142052p:plain

Maybe, there seems weak downtrend.

Next, let's see country vs. emp

f:id:cross_hyou:20210829142401p:plain

f:id:cross_hyou:20210829142421p:plain

I use reorder() function to re-order country by average emp.

We see many countries lowered gendar gap.

How about year vs. self?

f:id:cross_hyou:20210829143351p:plain

f:id:cross_hyou:20210829143403p:plain

For self, we see negative gender gap, it means female wage is higher than male age.

That's it. Thank you!

Next post is

 

www.crosshyou.info

 



To read from the 1st post,

 

www.crosshyou.info