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

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

World Bank's Pregnant women receiving prenatal care (%) data analysis 1 - Loading CSV file data into R

Generated by Bing Image Creator: Landscape of dogwood flowers.

I will analyze World Bank's "Pregnant women receivig prenatal care (%) data with R.

I got data from

https://data.worldbank.org/indicator/SH.STA.ANVC.ZS?view=map

The CSV file is like above screen-shot.

 

First, I load "tidyverse" package.

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

I modify some variable names using rename() function.

Since "df_raw" data frame is not tidy data frame, I use pivot_longer() function to tidy it.

All right, now I got a tidy data frame.
That's it. Thank you!

 

Next post is

www.crosshyou.info