Skip to contents

Get area codes from National Bureau of Statistics in China.

Usage

read_areacode(
  prov = "41",
  year = "2023",
  level = "county",
  cache_dir = "~/.cache_areacodes",
  cache_refresh = F
)

Arguments

prov

Province code.

year

Year

level

Level of returned data, options are 'city', 'county', 'xiang', 'cun', default is 'county'.

cache_dir

the directory of cache areacodes.

cache_refresh

logical value that refresh cache or not.

Value

A data frame contain area codes and their labels.