OECD Non-Financial Corporations Debt to Surplus Ratio Analysis 1 - Load CSV file data using R

UnsplashJeremy Thomasが撮影した写真 

In this post, I will use R for analysis about OECD Non-Financial Corporations Debt to Surplus Ratio.

This ratio is debt outstanding / annual flow if gross operating surplus. So, the higher the ratio, the more debt & the less surplus.

Firstly, I downloaded the data from OECD website and got below CSV file.

Let's analyze this data using R.
First of all, I load tidyverse package with library() function.

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

I use glimpse() function to see this data frame.

I see there are 833 obervations(Rows) and 7 variables(Columns).

Let's check each variables.


LOCATION is for country, I see main number of observations are 26 or 27.



INDICATOR means data name, it is NONFINCORP only. I will delete this variable later.



I will remove SUBJECT later bacuase it has only one value:TOT.



I will remove MEASURE too.



I will remove FREQUENCy too. A means Annual.



TIME is for year. I see 2015, 2016 and 2017 have 35 observations. So I will use 2015, 2016 and 2017 data only.



Value is the Non-Financial Corporations Debt to Surplus Ratio. I see there is not NA observations.


So, I will use LOCATION, TIME(only 2015, 2016 and 2017) and Value.

I will make new data frame.

summary() finction shows data frame summary stats

That's it. Thank you!

The next post is