R-CMD-check Scrape

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

The goal of gsovn is to scrape dataset from gso.gov.vn (Vietnam General statistic organization)

Installation

You can install the development version of gsovn from GitHub with:

# install.packages("devtools")
devtools::install_github("vohai611/gsovn")

TODO

  1. Add option to download csv

  2. use {{crul}} to send asynch request in the case download multiple dataset

Example

You can check what dataset is now on gso.gov.vn

library(gsovn)
df = gso_avail()
head(df)

To get the data set you want, use gso_read(url).

df$link[2] |> gso_read()

This function call rvest::html_table() to parse html to tibble, therefore the result might be slow. I will add the option to download csv file in the future



vohai611/gsovn documentation built on April 29, 2022, 5:46 a.m.