Skip to content

Latest commit

 

History

115 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vietnam Macroeconomic Monitor

  • (2025/06/06): Data archived until 20250601 was released.
  • (2024/11/20): Data archived until 2023q2 was released.
  • (2024/11/22): New data until 2024q3 are available now.

Purposes

This project aims to provide the most accurate and up-to-date data on the Vietnamese economy.

Data retrieving procedure:

  • Data is sourced from NSO's e-DSBB Excel files (stored at nsdp.nso.gov.vn). There are 5 datasets: GDP, CPI, IIP, LMI, PPI.
  • nso_scraper.py downloads, parses, and plots the data directly from NSO's Excel files.
  • Legacy XML scraping from GSO is also available via scrape_all.py (15 databases → single .json file).
  • To download pre-built data, see Release on the right panel.

The comprehensive data can be found in e-DSBB at the Excel sheets provided by NSO.

Usage

To install all dependencies, run

pip install -r requirements.txt

NSO Excel scraper (new)

python nso_scraper.py

Downloads and caches Excel files to data/, parses all indicators into tidy CSVs, and saves plots. Available datasets:

Key Description File
GDP National Accounts (quarterly & annual) GDP_VNM.xlsx
CPI Consumer Price Index CPI_VNM.xlsx
IIP Industrial Production Index IIP_VNM.xlsx
LMI Labor Market Indicators LMI_VNM.xlsx
PPI Producer Price Index PPI_VNM.xlsx

To scrape a specific dataset in your own script:

from nso_scraper import download_excel, parse_nso_sheet, get_series, NSO_LINKS

content = download_excel(NSO_LINKS["GDP"])
df = parse_nso_sheet(content, "Dataset_Q")       # quarterly sheet
gdp = get_series(df, "NGDP_R_PA_XDC")           # real GDP series

GSO XML scraper (legacy)

  • To scrape all data at once, run scrape_all.py
  • After scraping, filter variables of interest with make_df.py
  • Data description: dsbb_indicator_desc.csv
  • All databases listed in: dsbb_database.csv

Tiếng Việt

Để tiện cho mục tiêu nghiên cứu, mình viết một số script trên Python để cho máy đọc dữ liệu chính thức từ Tổng cục thống kê GSO.

Với CSDL này, chúng ta có thể vẽ các biểu đồ cơ bản hoặc ước lượng các mô hình vĩ mô.

Hiện nay GSO có 15 CSDL kinh tế, chủ yếu quan tâm đến các dữ liệu vĩ mô theo quý.

Những ai cần dùng có thể tải về toàn bộ data ở mục Release.

Do link SDMX của GSO không ổn định, nhiều khi không truy cập được nên mình chỉ sử dụng các đường link sao lưu trên Internet Archive ở thời điểm gần nhất (2023/12/31). Riêng dữ liệu về Tài khoản quốc gia có từ 2010q1 đến 2023q2. Dữ liệu từ 2023q2 trở đi có thể truy cập thủ công ở các bảng tính Excel cung cấp bởi GSO.

Trong tương lai, khi đường link chính ổn định hơn, mình sẽ update Release mới.

Phần link gốc không có mô tả ý nghĩa @INDICATOR. Ai quan tâm có thể tham khảo ở file dsbb_indicator_desc.csv.


Data sources

ASEAN:

Code Reference:

To visualize data structure

Deployed at Macro Monitor

Releases

Packages

Used by

Contributors

Languages