콘텐츠로 바로가기

가축을 사육하여 판매하거나 젖·알·꿀을 생산하는 업소정보. 이용허락범위 제한 없음.

사용법

farmGIS

양식

A data frame with 34 variables.

예시 코드

DT::datatable(head(farmGIS))
library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.2, PROJ 8.2.1; sf_use_s2() is TRUE library(tidyverse) #> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── #> tibble 3.1.8 purrr 1.0.0 #> tidyr 1.2.1 stringr 1.5.0 #> readr 2.1.3 forcats 0.5.2 #> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── #> dplyr::filter() masks stats::filter() #> dplyr::lag() masks stats::lag() library(leaflet) library(inlmisc) farm <- farmGIS %>% separate(col = "도로명전체주소", into = c("시도", "시군구"), sep = " ") %>% filter(주사육업종 == "한우") %>% filter(영업상태명 == "영업/정상") %>% mutate( x = as.numeric(좌표정보_x), y = as.numeric(좌표정보_y), idx = row_number() ) %>% select(사업장명, x, y, idx) %>% filter(!is.na(y)) %>% st_as_sf(coords = c("x", "y"), crs = 5174) %>% st_transform(4326) #> Warning: Expected 2 pieces. Additional pieces discarded in 118710 rows [1, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 37, 38, 39, 40, ...]. leaflet() %>% addTiles() %>% addMarkers(data = farm, label = ~as.character(사업장명), clusterOptions = markerClusterOptions(), group="marker") %>% inlmisc::AddSearchButton(group = "marker", zoom = 15, textPlaceholder = "Search here")