Presentation is loading. Please wait.

Presentation is loading. Please wait.

The visualization of pollution data distribution in Taiwan, using Open Data and R BY CHENG CHANG LU & YU LAN CHIANG.

Similar presentations


Presentation on theme: "The visualization of pollution data distribution in Taiwan, using Open Data and R BY CHENG CHANG LU & YU LAN CHIANG."— Presentation transcript:

1 The visualization of pollution data distribution in Taiwan, using Open Data and R BY CHENG CHANG LU & YU LAN CHIANG

2 Outline Target Data acquisition and clean up Use R to analyze and visualize geospatial data Use Shiny to share results The impression

3 Target Big Data Data Sources Geospatial data processing Visualization

4 Data acquisition and clean up TGOS(Taiwan Geospatial One Stop) Metadata Data structures, definitions and content analysis Data used :  pollution petition case distribution map of 2013  County (city) administrative boundaries (the island of Taiwan region)

5 TGOS URL:http://tgos.nat.gov.twhttp://tgos.nat.gov.tw TGOS Introduction

6 Metadata data about data Reality:

7 Data structures, definitions and content analysis Pollution petition case distribution map of 2013(TWD97) From_Org,To_Org Columns Case_exnum Columns Reference: Pollution petition admissible network system Pollution petition admissible network system Polltion_* Columns Case_date Columns County (city) administrative boundaries (the island of Taiwan region)(WGS84) Geocoding Reference: Spatial Reference GDAL - Geospatial Data Abstraction Library Spatial Reference GDAL - Geospatial Data Abstraction Library

8 Use R to analyze and visualize geospatial data 1. The target of analyzation and visualization The spatial distribution of different types of pollution 2. Loading and analyzing data Installation and usage of rgdal Data compilation and conversion 3. Data visualization Use classInt and RColorBrewer build palette Use plot and spplot charting 4. Use Shiny build interactive interface and results Encoding problem

9 Geospatial data processing Geocoding conversion: #Geocoding to convert WGS84 EPSG <- make_EPSG() EPSG[3826,3] harzard.linglat <- spTransform(harzard_s, CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")) county.linglat <- spTransform(county_s, CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))

10 Geospatial data processing Use sp package over function to merge data sc.linglat <-over(harzard.linglat, county.linglat) Use subset function to remove useless columns cc2 <- subset(cc,select=c(SerID,ALIAS,D_NAME,D_NAME1)) RDS file format to accelerate the use of data access saveRDS(harzard_sc.linglat, "data/harzard.rds") saveRDS(county.linglat, "data/county.rds")

11 Data visualization Use classInt and RColorBrewer function 8 color palette to create a range of intervals aliquots Use plot and spplot charting

12 Use Shiny share results Use selectInput object to select pollution build three results show chart, map and dataTableOutpu renderDataTable the "Big5", "UTF8" encoding issues

13 DEMO

14 The impression Rich packages Active community forums


Download ppt "The visualization of pollution data distribution in Taiwan, using Open Data and R BY CHENG CHANG LU & YU LAN CHIANG."

Similar presentations


Ads by Google