Introduction

GSO is the General Statistics Office of Vietnam (GSO). The gso package contains the updated (last update 03/2017), cleaned and tidy version of all the 316 tables available on the website. For the moment, only 113 data frames and 1 summary data frame are available within this package (more details in this vignette).

Installing the gso package:

devtools::install_github("choisy/gso")

Loading and attaching the gso package:

library(gso)

Content data frame

The package contains a data frame called content containing for each row, a data frame (in the column data) and some description of this data frame:

head(content)

The data frame contains different columns describing the data:

For more details:

?content

You can used content to select the data frame necessary for your study. You can filter the data by the category, subcategory or others parameters to see the data available by different criterium:

agri_forest_fish <- subset(content, category == "Agriculture, Forestry and Fishery", data)
agri_forest_fish <- agri_forest_fish$data[[1]]
str(agri_forest_fish)

or, to select a data frame related to HIV in Vietnam

sel <- grep("hiv", content$data_frame, ignore.case = TRUE)
content[sel, ] # permit to print more information
df_hiv <- content[sel, "data"]
df_hiv <- df_hiv$data[[1]]
head(df_hiv)

Or you can also used the function View() to print the data frame and explore all the data available, but the display can be quite long to open because of the column data

View(content)


choisy/gso documentation built on Aug. 22, 2019, 10:32 a.m.