South Korea Weather map Weather map Weather map

  • Slides: 12
Download presentation

South Korea Weather map 고도에 따른 Weather map 기온에 따른 Weather map 습도에 따른

South Korea Weather map 고도에 따른 Weather map 기온에 따른 Weather map 습도에 따른 Weather map

코드 : Weather. R library(dplyr) allzips <- read. csv("data/data. csv", strings. As. Factors=T, file.

코드 : Weather. R library(dplyr) allzips <- read. csv("data/data. csv", strings. As. Factors=T, file. Encoding="CP 949") allzips$altitude <- as. numeric(allzips$altitude) cleantable <- allzips %>% select( # 날씨 측정지점 ID ID = id, # 날씨 측정일 Date = date 1, Name = point. Name, # 좌표 명 EName = Engpoint. Name, # 좌표 영문명 Addr = point. Address, # 좌표 주소 Lat = latitude, # 위도 Long = longitude, # 경도 Alt = altitude, # 고도 Temp =temperature, # 기온 Wind = wind. Speed 10, # 풍속 Humi = humidity, # 습도 Press = pressure # 기압 )

코드 : Server. R library(shiny) library(leaflet) library(RColor. Brewer) library(scales) library(lattice) library(dplyr) zipdata <- allzips

코드 : Server. R library(shiny) library(leaflet) library(RColor. Brewer) library(scales) library(lattice) library(dplyr) zipdata <- allzips shiny. Server(function(input, output, session) { output$map <- render. Leaflet({ leaflet() %>% add. Tiles( url. Template = "//{s}. tiles. mapbox. com/v 3/jcheng. map-5 ebohr 46/{z}/{x}/{y}. png") %>% set. View(lng = 127. 463153, lat = 36. 6320679, zoom = 8) %>% add. Circle. Markers(lat = allzips$latitude, lng = allzips$longitude, color= "purple", popup =paste('번호 : ', allzips$id, ' ', '지역 : ', allzips$point. Name, ' ', '주소 : ', allzips$point. Address, ' ', '고도 : ', allzips$altitude, ' ', '기온 : ', allzips$temperature, ' ', '풍속 : ', allzips$wind. Speed 10, ' ', '습도 : ', allzips$humidity, ' ',

코드 : UI. R library(shiny) library(leaflet) vars <- c( "고도" = "altitude", "기온" =

코드 : UI. R library(shiny) library(leaflet) vars <- c( "고도" = "altitude", "기온" = "temperature", "풍속" = "wind. Speed 10", "습도" = "humidity", "기압" = "pressure" )shiny. UI(navbar. Page("Weather", id="nav", tab. Panel("South Korea Weather map", div(class="outer", tags$head( include. CSS("styles. css"), include. Script("gomap. js")), leaflet. Output("map", width="100%", height="100%"), absolute. Panel(id = "controls", class = "panel-default", fixed = TRUE, draggable = TRUE, top = 60, left = "auto", right = 20, bottom = "auto",

Reference 1. Shiny Package ◦ http: //shiny. rstudio. com/ 2. Shiny Example ◦ https:

Reference 1. Shiny Package ◦ http: //shiny. rstudio. com/ 2. Shiny Example ◦ https: //github. com/rstudio/shiny-examples 3. leaflet Package ◦ https: //rstudio. github. io/leaflet/ 4. Java Crawler ◦ https: //github. com/Super. Martin/Korea. Weather 4 j 5. 기상청 지역별상세정보 ◦ http: //www. kma. go. kr/weather/observation/aws_table_popup. jsp