OSM에서 제세동기

R-Blogger · 블로그·해설 · 2023-11-17

R-Blogger블로그·해설한국어2023-11-17

OSM에서 제세동기

OSM에서 가져온 제세동기이번 30DayMapChallenge 15일 차에 Theo Crazzolara가 제공한 CC-BY 라이선스의 Bleeding Heart 데이터를 사용하여 Auvergne‑Rhône‑Alpes 지역의 제세동기(AED) 웹 지도를 제작합니다.필요한 R 패키지 로드library(tidyverse) library(sf) library(osmdata) library(glue) library(leaflet) library(htmltools)오버패스 API를 사용한 데이터 조회우리는 {osmdata} 패키지를 통해 Overpass API 쿼리를 전송합니다.# 프랑스 지역 필터링 # 데이터 처리 방법은 해당 페이지를 참고하십시오. fr %>% filter(insee_reg > "06")OSM 데이터 가져오기 및 캐시 저장# 프랑스 OSM 데이터를 가져오고 aed.rds 파일로 캐시합니다. if (!file.exists("aed.rds")) { aed %>% add_osm_features(features = c('"emergency"="defibrillator"')) %>% osmdata_sf() %>% pluck("osm_points") %>% st_join(fr, left = FALSE) %>% write_rds("aed.rds") } else { aed %>% filter(insee_reg == 84, left = FALSE) %>% leaflet(options = leafletOptions(preferCanvas = TRUE)) %>% addTiles() %>% addAwesomeMarkers( clusterOptions = markerClusterOptions(), icon = icons, popup = ~glue( "locatisation {htmlEscape(coalesce(`defibrillator:location:fr`, `defibrillator:location`))} intérieur{htmlEscape(coalesce(indoor, `indoor:description`))} niveau{htmlEscape(level)} accès{htmlEscape(access)} horaires{htmlEscape(opening_hours)} opérateur{htmlEscape(operator
원문 URL
전체 글은 원문 페이지에서 이어서 읽을 수 있습니다.
원문에서 전체 글 읽기
작성자
R-Blogger
출처
R-Blogger
플랫폼
R-Blogger
분류
블로그·해설
언어
한국어
발행일
2023-11-17