-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
86 lines (62 loc) · 2.45 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-",
warning = FALSE
)
```
# jpndistrict <img src="man/figures/logo.png" align="right" width="120px" />
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/jpndistrict)](https://cran.r-project.org/package=jpndistrict) [![Coverage status](https://codecov.io/gh/uribo/jpndistrict/branch/master/graph/badge.svg)](https://codecov.io/github/uribo/jpndistrict?branch=master)
## Overview
In this package, the administrative area data to be provided uses the National Land Numerical Information. Shinya Uryu is editing and processing this data. Therefore, when preparing a secondary work using this data, it is necessary to follow the term of the National Land Numerical Information.
This package provide map data is based on the Digital Map 25000 (Map Image) published by Geospatial Information Authority of Japan (Approval No.603FY2017 information usage <https://www.gsi.go.jp>).
## Installation
~~Install from CRAN.~~
It is currently not available for installation. Please install the next development version.
```{r, eval = FALSE, echo = TRUE}
# install.packages("jpndistrict")
```
For developers, please use the **remotes** package to install via the GitHub repository.
```{r, echo = TRUE, eval = FALSE}
install.packages("remotes")
remotes::install_github("uribo/jpndistrict")
```
## Usage
```{r, echo = TRUE, eval = FALSE}
# Load Package
library(jpndistrict)
```
### Administrative area data
```{r, eval = FALSE, echo = TRUE}
jpn_pref(14)
jpn_pref(14, district = FALSE)
jpn_cities(14, admin_name = "海老名市")
jpn_cities(33, admin_name = c("倉敷市", "笠岡市"))
```
```{r, eval = FALSE, echo = TRUE}
# Return mesh polygons included in administrative areas.
mesh_district(jis_code = "05")
mesh_district(jis_code = 33101)
```
### Administration office data
```{r, eval = FALSE, echo = TRUE}
jpn_admins(jis_code = 33)
jpn_admins(jis_code = c("33101", "33212"))
```
### Reverse geocoding in prefecture and city level
```{r, eval = FALSE, echo = TRUE}
find_pref(longitude = 133.915, latitude = 34.666)
find_city(longitude = 133.915, latitude = 34.666)
# sfg
find_city(geometry = sf::st_point(c(140.112, 36.083)))
```
### City name and code validation
```{r, eval = FALSE, echo = TRUE}
code_validate(jis_code = 33101)
code_reform(jis_code = c(1, "33", "08201"))
```