Package 'tidycensuskr.sf'

Title: District Boundaries by Censal Years for tidycensuskr Package
Description: This file-only package provides district boundaries by censal years for use with the tidycensuskr package. It contains spatial boundary data (sf objects) for South Korean administrative districts from census years 2010, 2015, and 2020.
Authors: Insang Song [aut, cre] (ORCID: <https://orcid.org/0000-0001-8732-3256>), Sohyun Park [aut, ctb] (ORCID: <https://orcid.org/0000-0002-1231-5662>), Hyesop Shin [aut, ctb] (ORCID: <https://orcid.org/0000-0003-2637-7933>)
Maintainer: Insang Song <[email protected]>
License: MIT + file LICENSE
Version: 0.1.4
Built: 2026-05-30 09:11:02 UTC
Source: https://github.com/sigmafelix/tidycensuskr.sf

Help Index


Basemap layout for tmap in South Korea

Description

This function first downloads adjacent country polygon data from GADM and then creates a basemap layout with insets for South Korea. The sf objects are reprojected to EPSG:5179 (Korea 2000 / Unified CS).

Usage

basemap_kor(geodata_path = "~/geodata")

Arguments

geodata_path

A character string specifying the directory to store the downloaded GADM data. Default is "~/geodata".

Value

A tmap object representing the basemap layout for South Korea.

Note

The output is a tmap object that can be further customized. It is recommended to export the map using tmap::tmap_save() with a high resolution (i.e., dpi > 200).


Basemap layout for tmap in South Korea

Description

This function first downloads adjacent country polygon data from GADM and then creates a basemap layout with insets for South Korea. The sf objects are reprojected to EPSG:5179 (Korea 2000 / Unified CS).

Usage

basemap_kor_in(year = 2020)

Arguments

year

An integer specifying the year of the administrative level 2 data. Default is 2020.

Value

A tmap object representing the basemap layout for South Korea.

Note

The output is a tmap object that can be further customized. It is recommended to export the map using tmap::tmap_save() with a high resolution (i.e., dpi > 200).


Convert administrative level 2 sf polygons to basic local government boundaries

Description

This function converts administrative level 2 polygons from Ministry of Data and Statistics (formerly Statistics Korea) to basic local government boundaries. Basic local governments are administrative units with their own local councils and mayors, such as cities (si), counties (gun) and districts (gu), but without districts in populous non-metropolitan cities.

Usage

convert_basic_adm2(adm2_sf = NULL, year = 2020)

Arguments

adm2_sf

An sf object containing administrative level 2 polygons from Ministry of Data and Statistics.

year

An integer specifying the year of the administrative level 2 data. Default is 2020. This value is ignored when adm2_sf is provided.

Value

An sf object containing basic local government boundaries.