knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(tibble.print_min = 5, tibble.print_max = 5)
We R Nusantara!
nusantr
is an R package which contains:
You need to use sf
package to enable the class of sf data frame.
# install.packages("devtools") install.packages("sf") install.packages("tidyverse") devtools::install_github("rasyidstat/nusantr")
You can get Indonesia map by using id_map
function that will return sf spatial data frame. It contains two parameters: region and level and currently only contains two regions: "indonesia" and "jakarta".
The data for Indonesia map will be dowloaded from GADM and the data for Jakarta map is get from from Jakarta Smart City.
library(sf) library(nusantr)
# get jakarta map for 'kelurahan' level jakarta_kelurahan <- id_map("jakarta", "kelurahan") jakarta_kelurahan
There are various datasets included on this package such as: Transjakarta data, KRL data, Indonesia name data, etc.
# transjakarta halte data transjakarta # transjakarta route data transjakarta_route
You also can convert NIK (Nomor Induk Kependudukan) or KTP ID to location (city and province), gender and birthdate using nik_to_all
, nik_to_gender
, nik_to_bd
, nik_to_city
or nik_to_prov
.
nik_to_all("3173060101000010")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.