owned this note changed 7 years ago
Linked with GitHub

Maps in R - 林怡

歡迎來到 https://hackmd.io/c/COSCUP2018 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開議程列表。

請從這裡開始

講者

  • Yi Lin
  • Majored in Geography.
  • Map lover
  • Work @ TOMTOM
  • An engineer test whole world maps every day.
  • Geodesign TPE Co-Organizer
  • Hackthon Challenger

Outline

  • MAPs 101 Intro
  • Data Visualization in Maps
  • Packages in R ?

When will yor need to use map

  • 想再網頁上顯示自家店面位置
  • 紀錄自己的旅遊地點
  • 想展現各區域的各種統計資料
  • 需要導航規劃路限時
  • 需要紀錄各種位置資訊時
  • location
  • travel info
  • navigation
  • data visualization

GeoSpatial Data Type

  • Feature Data
    • Point,Polyline, and Polygon.
    • River line, Building Area, POIs (Point of Interest), Country boudary, etc.
  • Raster Data
    • DTM(數位高程模型)/DEM , Satellite imagery
    • Any data put in the grids

範例

  • oBike

How to start to drawing a map

  • 你對甚麼好奇?
  • 發表地圖

Spatial Data Types

  • .shp shapefile 圖形資料
  • .dbf - attribute data , can be opened by excel
  • .kml - kind of XML
  • .kmz - a zip KML file
  • geojson

Data Visualization in Maps

Maps

R

安裝 Map package: install.packages('maps')

經緯度:geocode("台北市",output= "more")

畫地圖:

TPmap <- get_map(location = 'TaipeiCity' , zoom = 11 , maptype = 'roadmap' , language = "zh-TW") ggmap('TPmap')
mapTN <- get_map(location = c(lon = , lat = ), zoom = , language =)

maptye 可指定地圖類型

darken 指定透明度語顏色

ggmap(map1,darken = c(0.5 , "white"))

R 進階

Packages:

  • rgdal
  • maptools
  • ggplot2

Use packages :

  • library(package_name)

投影:
proj <-CRS("")

Resources

Maptools

rgdal

GISTools

座標投影設定

tags: COSCUP2018 gis
Select a repo