sp_to_json: Transform sp to json

Description Usage Arguments Value

View source: R/sp_to_json.R

Description

Get json map for echart4r from sp data download from GADM (raster)

Usage

1
sp_to_json(sp = NULL, scope = NULL, std_name = TRUE)

Arguments

sp

Sp object. Might be downloaded from raster:getdata()

scope

The scope of map data: town or district.
Eample of town: Ha Noi, Ha Tinh.
Example of district: Vinh, Hong Linh, Nghi Xuan

std_name

Should use standard name or not
For example, "Hà Tĩnh" is non-standard name, while "Ha Tinh" is standard name

Value

A json map ready to feed echarts4r::e_map_register()


vohai611/haitools documentation built on Dec. 23, 2021, 4:10 p.m.