95
Motivation Color Scale Draw Map Assign Colors Results Geographically Weighted Regression Quantile Regression & Geographically Weighted Quantile Regression Discussion Introduction of geospatial data visualization and geographically weighted regression (GWR) Frank Fan Vanderbilt University August 16, 2012 Frank Fan Introduction of geospatial data visualization and geographically weighted reg

Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Introduction of geospatial data visualization andgeographically weighted regression (GWR)

Frank Fan

Vanderbilt University

August 16, 2012

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 2: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Study Background

(1) Information of breast cancer or population characteristic such asmortality rate, median household income, and ethnicity ...etc aroundNashville area or US.

(2) Data are summarized in different levels.I StateI CountyI Zip Code

(3) The goal is generating several geographic maps with colorrepresenting information of interests.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 3: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Study Background

(1) Information of breast cancer or population characteristic such asmortality rate, median household income, and ethnicity ...etc aroundNashville area or US.

(2) Data are summarized in different levels.I StateI CountyI Zip Code

(3) The goal is generating several geographic maps with colorrepresenting information of interests.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 4: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Study Background

(1) Information of breast cancer or population characteristic such asmortality rate, median household income, and ethnicity ...etc aroundNashville area or US.

(2) Data are summarized in different levels.I StateI CountyI Zip Code

(3) The goal is generating several geographic maps with colorrepresenting information of interests.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 5: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Tennessee

Zip Code Zip City County Female Mortality Rateper 100K

37013 Antioch Davidson 20.0537072 Goodlettsville Davidson 28.1337076 Hermitage Davidson 25.3437080 Joelton Davidson 29.3937115 Madison Davidson 31.5237138 Old Hickory Davidson 28.7137189 Whites Creek Davidson 34.2437201 Nashville Davidson 27.40. . . .. . . .. . . .

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 6: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Tasks

I Generate a color scaleHow to represent, for example mortality rate, in a map with

color ?

I Draw a mapWhere to get information or R functions to plot the map ?

I Fill in the colorWho is who ?

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 7: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Tasks

I Generate a color scaleHow to represent, for example mortality rate, in a map with

color ?

I Draw a mapWhere to get information or R functions to plot the map ?

I Fill in the colorWho is who ?

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 8: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Study BackgroundData OverviewAlgorithm

Tasks

I Generate a color scaleHow to represent, for example mortality rate, in a map with

color ?

I Draw a mapWhere to get information or R functions to plot the map ?

I Fill in the colorWho is who ?

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 9: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Get Colors

I The idea is get a single color scale showing severity of mortality fromlight (less server) to dark (more server).

I colorRampPalette {grDevices}Return as a function

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”))col.lists <- color.scales(8)

I col.lists“#FFA500”“#FF8D00”“#FF7500”“#FF5E00”“#FF4600”“#FF2F00”“#FF1700”“#FF0000”

I It’s called hexadecimal color codes.There are also RGB color function in R available.rgb(228,26,28,max=255)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 10: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Get Colors

I The idea is get a single color scale showing severity of mortality fromlight (less server) to dark (more server).

I colorRampPalette {grDevices}Return as a function

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”))col.lists <- color.scales(8)

I col.lists“#FFA500”“#FF8D00”“#FF7500”“#FF5E00”“#FF4600”“#FF2F00”“#FF1700”“#FF0000”

I It’s called hexadecimal color codes.There are also RGB color function in R available.rgb(228,26,28,max=255)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 11: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Get Colors

I The idea is get a single color scale showing severity of mortality fromlight (less server) to dark (more server).

I colorRampPalette {grDevices}Return as a function

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”))col.lists <- color.scales(8)

I col.lists“#FFA500”“#FF8D00”“#FF7500”“#FF5E00”“#FF4600”“#FF2F00”“#FF1700”“#FF0000”

I It’s called hexadecimal color codes.There are also RGB color function in R available.rgb(228,26,28,max=255)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 12: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Get Colors

I The idea is get a single color scale showing severity of mortality fromlight (less server) to dark (more server).

I colorRampPalette {grDevices}Return as a function

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”))col.lists <- color.scales(8)

I col.lists“#FFA500”“#FF8D00”“#FF7500”“#FF5E00”“#FF4600”“#FF2F00”“#FF1700”“#FF0000”

I It’s called hexadecimal color codes.There are also RGB color function in R available.rgb(228,26,28,max=255)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 13: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Get Colors

I The idea is get a single color scale showing severity of mortality fromlight (less server) to dark (more server).

I colorRampPalette {grDevices}Return as a function

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”))col.lists <- color.scales(8)

I col.lists“#FFA500”“#FF8D00”“#FF7500”“#FF5E00”“#FF4600”“#FF2F00”“#FF1700”“#FF0000”

I It’s called hexadecimal color codes.There are also RGB color function in R available.rgb(228,26,28,max=255)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 14: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

8 Levels Between Orange and Red

1 2 3 4 5 6 7 8

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 15: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

More Colors ?!?!

I Can we get more than two colors and have the scales between all ofthem ?

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”,“green”))col.lists <- color.scales(21)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 16: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

More Colors ?!?!

I Can we get more than two colors and have the scales between all ofthem ?

I Usage :color.scales <- colorRampPalette(c(“orange”,“red”,“green”))col.lists <- color.scales(21)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 17: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Map

I Maps package doesn’t have either zip code’s boundary or maps ofAlaska & Hawaii, so I can’t use map function to get those plotted.

I More tasks need to be done.

I Zip code boundary data (or Alaska & Hawaii boundary data)I R function to draw the frame of each zip code area.I Same or different function to fill in the color.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 18: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Map

I Maps package doesn’t have either zip code’s boundary or maps ofAlaska & Hawaii, so I can’t use map function to get those plotted.

I More tasks need to be done.

I Zip code boundary data (or Alaska & Hawaii boundary data)I R function to draw the frame of each zip code area.I Same or different function to fill in the color.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 19: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Map

I Maps package doesn’t have either zip code’s boundary or maps ofAlaska & Hawaii, so I can’t use map function to get those plotted.

I More tasks need to be done.I Zip code boundary data (or Alaska & Hawaii boundary data)

I R function to draw the frame of each zip code area.I Same or different function to fill in the color.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 20: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Map

I Maps package doesn’t have either zip code’s boundary or maps ofAlaska & Hawaii, so I can’t use map function to get those plotted.

I More tasks need to be done.I Zip code boundary data (or Alaska & Hawaii boundary data)I R function to draw the frame of each zip code area.

I Same or different function to fill in the color.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 21: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Map

I Maps package doesn’t have either zip code’s boundary or maps ofAlaska & Hawaii, so I can’t use map function to get those plotted.

I More tasks need to be done.I Zip code boundary data (or Alaska & Hawaii boundary data)I R function to draw the frame of each zip code area.I Same or different function to fill in the color.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 22: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Boundaries

I Boundary Data.

I US Census

I It’s back !! called “TIGER/Line Shapefiles”

I http://www.census.gov/geo/www/tiger/shp.html

I http://www.census.gov/cgi-bin/geo/shapefiles2010/main

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 23: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Boundaries

I Boundary Data.

I US Census

I It’s back !! called “TIGER/Line Shapefiles”

I http://www.census.gov/geo/www/tiger/shp.html

I http://www.census.gov/cgi-bin/geo/shapefiles2010/main

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 24: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Boundaries

I Boundary Data.

I US Census

I It’s back !! called “TIGER/Line Shapefiles”

I http://www.census.gov/geo/www/tiger/shp.html

I http://www.census.gov/cgi-bin/geo/shapefiles2010/main

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 25: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Boundaries

I Boundary Data.

I US Census

I It’s back !! called “TIGER/Line Shapefiles”

I http://www.census.gov/geo/www/tiger/shp.html

I http://www.census.gov/cgi-bin/geo/shapefiles2010/main

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 26: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Zip Code Boundaries

I Boundary Data.

I US Census

I It’s back !! called “TIGER/Line Shapefiles”

I http://www.census.gov/geo/www/tiger/shp.html

I http://www.census.gov/cgi-bin/geo/shapefiles2010/main

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 27: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Maptools Package

I Need a way to read .shp file into R.

I readShapeSpatial{maptools}I TN.zip.map <- readShapeSpatial(“zt47 d00.shp”)

I str(TN.zip.map)Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with

5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

I and another 1277 more lines !!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 28: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Maptools Package

I Need a way to read .shp file into R.

I readShapeSpatial{maptools}

I TN.zip.map <- readShapeSpatial(“zt47 d00.shp”)

I str(TN.zip.map)Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with

5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

I and another 1277 more lines !!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 29: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Maptools Package

I Need a way to read .shp file into R.

I readShapeSpatial{maptools}I TN.zip.map <- readShapeSpatial(“zt47 d00.shp”)

I str(TN.zip.map)Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with

5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

I and another 1277 more lines !!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 30: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Maptools Package

I Need a way to read .shp file into R.

I readShapeSpatial{maptools}I TN.zip.map <- readShapeSpatial(“zt47 d00.shp”)

I str(TN.zip.map)Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with

5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

I and another 1277 more lines !!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 31: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Maptools Package

I Need a way to read .shp file into R.

I readShapeSpatial{maptools}I TN.zip.map <- readShapeSpatial(“zt47 d00.shp”)

I str(TN.zip.map)Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with

5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

I and another 1277 more lines !!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 32: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Stracture of .shp File

Formal class ’SpatialPolygonsDataFrame’ [package ‘‘sp"] with 5 slots

..@ data :’data.frame’: 964 obs. of 8 variables:

.. ..$ AREA : num [1:964] 2.92e-03 2.34e-02 4.18e-03 2.02e-05 2.95e-05 ...

.. ..$ PERIMETER : num [1:964] 0.8641 1.3754 2.9457 0.0226 0.0326 ...

.. ..$ ZT47 D00 : int [1:964] 2 3 4 5 6 7 8 9 10 11 ...

.. ..$ ZT47 D00 I: int [1:964] 1 2 3 4 5 6 7 8 9 10 ...

.. ..$ ZCTA : Factor w/ 634 levels ‘‘37010",‘‘37012",..: 65 66 65 15 15 15 88 108 81 98 ...

.. ..$ NAME : Factor w/ 634 levels ‘‘37010",‘‘37012",..: 65 66 65 15 15 15 88 108 81 98 ...

.. ..$ LSAD : Factor w/ 1 level ‘‘Z5": 1 1 1 1 1 1 1 1 1 1 ...

.. ..$ LSAD TRANS: Factor w/ 1 level ‘‘5-Digit ZCTA": 1 1 1 1 1 1 1 1 1 1 ...

.. ..- attr(*, ‘‘data types")= chr [1:8] ‘‘F" ‘‘F" ‘‘N" ‘‘N" ...

..@ polygons :List of 964

.. ..$ :Formal class ’Polygons’ [package ‘‘sp"] with 5 slots

.. .. .. ..@ Polygons :List of 1

.. .. .. .. ..$ :Formal class ’Polygon’ [package ‘‘sp"] with 5 slots

.. .. .. .. .. .. ..@ labpt : num [1:2] -88 36.6

.. .. .. .. .. .. ..@ area : num 0.00292

.. .. .. .. .. .. ..@ hole : logi FALSE

.. .. .. .. .. .. ..@ ringDir: int 1

.. .. .. .. .. .. ..@ coords : num [1:169, 1:2] -88 -88 -88 -88 -88 ...

.. .. .. ..@ plotOrder: int 1

.. .. .. ..@ labpt : num [1:2] -88 36.6

.. .. .. ..@ ID : chr "0"

.. .. .. ..@ area : num 0.00292

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 33: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 34: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 35: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 36: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 37: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.

I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 38: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 39: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.

I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 40: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.

I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 41: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.

I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 42: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 43: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 44: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Decompose the Structure

I Take Hawaii as an example.

I Think it as a box with lots boxes inside.

I One huge box : object itself.

I 5 middle size box :

I General information.I Main parts with numbers of small boxes inside.

I Coordinates.I Center Coordinate.I Area, ID, ....etc.I No zip code.

I The other 3 median boxes which is not so important.

I Assumption : the zip code is saved with the order.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 45: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Plot the Shape & Colored Only by Coordinates

I Need a function to plot the shape by only giving a set of coordinates.

I If can handle the color as welll will be better.

I polygon{graphics}I Useage :

polygon(x, y = NULL, density = NULL, angle = 45,border = NULL, col = NA, lty = par(”lty”),...)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 46: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Plot the Shape & Colored Only by Coordinates

I Need a function to plot the shape by only giving a set of coordinates.

I If can handle the color as welll will be better.

I polygon{graphics}I Useage :

polygon(x, y = NULL, density = NULL, angle = 45,border = NULL, col = NA, lty = par(”lty”),...)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 47: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Plot the Shape & Colored Only by Coordinates

I Need a function to plot the shape by only giving a set of coordinates.

I If can handle the color as welll will be better.

I polygon{graphics}

I Useage :polygon(x, y = NULL, density = NULL, angle = 45,

border = NULL, col = NA, lty = par(”lty”),...)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 48: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Polygon

Plot the Shape & Colored Only by Coordinates

I Need a function to plot the shape by only giving a set of coordinates.

I If can handle the color as welll will be better.

I polygon{graphics}I Useage :

polygon(x, y = NULL, density = NULL, angle = 45,border = NULL, col = NA, lty = par(”lty”),...)

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 49: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Representing Information with Colors

Zip Code Female Mortality Rate 20% Quantileper 100K

37013 20.05 137072 28.13 437076 25.34 337115 22.52 237138 28.71 537189 34.24 537201 27.40 4

. . .

. . .

. . .

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 50: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Representing Information with Colors

Zip Code Female Mortality Rate 20% Quantile Correspondingper 100K Color

37013 20.05 1 #9999FF37072 28.13 4 #4C4CFF37076 25.34 3 #6666FF37115 22.52 2 #7F7FFF37138 28.71 5 #3333FF37189 34.24 5 #3333FF37201 27.40 4 #4C4CFF

. . . .

. . . .

. . . .

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 51: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Two Parts of Data

I Zip code with corresponding color.

I Boundary coordinates for each zip code.

I Now we are ready to plot !!!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 52: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Two Parts of Data

I Zip code with corresponding color.

I Boundary coordinates for each zip code.

I Now we are ready to plot !!!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 53: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Two Parts of Data

I Zip code with corresponding color.

I Boundary coordinates for each zip code.

I Now we are ready to plot !!!!

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 54: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I PI’s question : Does breast cancer mortality related to education,household income...etc.

I My first idea : Spearman’s correlation.

I The problem are :I What if we have more or fewer data points ?I Simple correlation can’t deal with multiple covariates at the same

time.

I Brunsdon (1996), “Geographically Weighted Regression: A Methodfor Exploring Spatial Nonstationarity”, Geographical analysis, Vol.28, No. 4, P.281.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 55: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I PI’s question : Does breast cancer mortality related to education,household income...etc.

I My first idea : Spearman’s correlation.

I The problem are :I What if we have more or fewer data points ?I Simple correlation can’t deal with multiple covariates at the same

time.

I Brunsdon (1996), “Geographically Weighted Regression: A Methodfor Exploring Spatial Nonstationarity”, Geographical analysis, Vol.28, No. 4, P.281.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 56: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I PI’s question : Does breast cancer mortality related to education,household income...etc.

I My first idea : Spearman’s correlation.

I The problem are :I What if we have more or fewer data points ?I Simple correlation can’t deal with multiple covariates at the same

time.

I Brunsdon (1996), “Geographically Weighted Regression: A Methodfor Exploring Spatial Nonstationarity”, Geographical analysis, Vol.28, No. 4, P.281.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 57: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I PI’s question : Does breast cancer mortality related to education,household income...etc.

I My first idea : Spearman’s correlation.

I The problem are :I What if we have more or fewer data points ?I Simple correlation can’t deal with multiple covariates at the same

time.

I Brunsdon (1996), “Geographically Weighted Regression: A Methodfor Exploring Spatial Nonstationarity”, Geographical analysis, Vol.28, No. 4, P.281.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 58: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Wherever a house is located, for example, the marginal priceincrease associated with an additional bedroom is fixed.

I It might be more reasonable to assume that rates of change aredetermined by local culture or local knowledge, rather than a globalutility assumed for each commodity.

I Variations in relationships over space, such as those described above,are referred to as spatial nonstationarity.

I Simple linear model is not not appropriate, but widely used in early90s for the data with geographic information.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 59: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Wherever a house is located, for example, the marginal priceincrease associated with an additional bedroom is fixed.

I It might be more reasonable to assume that rates of change aredetermined by local culture or local knowledge, rather than a globalutility assumed for each commodity.

I Variations in relationships over space, such as those described above,are referred to as spatial nonstationarity.

I Simple linear model is not not appropriate, but widely used in early90s for the data with geographic information.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 60: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Wherever a house is located, for example, the marginal priceincrease associated with an additional bedroom is fixed.

I It might be more reasonable to assume that rates of change aredetermined by local culture or local knowledge, rather than a globalutility assumed for each commodity.

I Variations in relationships over space, such as those described above,are referred to as spatial nonstationarity.

I Simple linear model is not not appropriate, but widely used in early90s for the data with geographic information.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 61: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Wherever a house is located, for example, the marginal priceincrease associated with an additional bedroom is fixed.

I It might be more reasonable to assume that rates of change aredetermined by local culture or local knowledge, rather than a globalutility assumed for each commodity.

I Variations in relationships over space, such as those described above,are referred to as spatial nonstationarity.

I Simple linear model is not not appropriate, but widely used in early90s for the data with geographic information.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 62: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

Simpson’s Paradox

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 63: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I y = α + βX + ε

I yi = αi + βiX + εiI Where i indicates that there is a set of coefficients estimated for

every observation in the data set.

I Key difference : We estimate a set of regression coefficients for eachobservation (i).

I To do so we weight near observations more heavily than moredistant ones.

I First law of geography: everything is related with everything else,but closer things are more related.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 64: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I y = α + βX + ε

I yi = αi + βiX + εiI Where i indicates that there is a set of coefficients estimated for

every observation in the data set.

I Key difference : We estimate a set of regression coefficients for eachobservation (i).

I To do so we weight near observations more heavily than moredistant ones.

I First law of geography: everything is related with everything else,but closer things are more related.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 65: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I y = α + βX + ε

I yi = αi + βiX + εiI Where i indicates that there is a set of coefficients estimated for

every observation in the data set.

I Key difference : We estimate a set of regression coefficients for eachobservation (i).

I To do so we weight near observations more heavily than moredistant ones.

I First law of geography: everything is related with everything else,but closer things are more related.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 66: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I y = α + βX + ε

I yi = αi + βiX + εiI Where i indicates that there is a set of coefficients estimated for

every observation in the data set.

I Key difference : We estimate a set of regression coefficients for eachobservation (i).

I To do so we weight near observations more heavily than moredistant ones.

I First law of geography: everything is related with everything else,but closer things are more related.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 67: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I y = α + βX + ε

I yi = αi + βiX + εiI Where i indicates that there is a set of coefficients estimated for

every observation in the data set.

I Key difference : We estimate a set of regression coefficients for eachobservation (i).

I To do so we weight near observations more heavily than moredistant ones.

I First law of geography: everything is related with everything else,but closer things are more related.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 68: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Decide how you are going to weight your nearby locations.I Fixed bandwidthI Variable bandwidthI User-defined bandwidth

I Bandwidth specifies shape of weights curve.

I Whether we will define our bandwidth based on distance (fixed) ornumber of neighbors (adaptive).

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 69: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Decide how you are going to weight your nearby locations.I Fixed bandwidthI Variable bandwidthI User-defined bandwidth

I Bandwidth specifies shape of weights curve.

I Whether we will define our bandwidth based on distance (fixed) ornumber of neighbors (adaptive).

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 70: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Decide how you are going to weight your nearby locations.I Fixed bandwidthI Variable bandwidthI User-defined bandwidth

I Bandwidth specifies shape of weights curve.

I Whether we will define our bandwidth based on distance (fixed) ornumber of neighbors (adaptive).

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 71: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

Fixed Bandwidth

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 72: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

Adaptive Bandwidth

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 73: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I R package : spgwr (dependent packages: sp, maptools)

I data(columbus)

I 5 variablesI crime - recorded crime per inhabitantI income - average income valuesI housing - average housing costsI x - latitudeI y - longitude

I Relationship between crime and income & housing.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 74: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I R package : spgwr (dependent packages: sp, maptools)

I data(columbus)

I 5 variablesI crime - recorded crime per inhabitantI income - average income valuesI housing - average housing costsI x - latitudeI y - longitude

I Relationship between crime and income & housing.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 75: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I R package : spgwr (dependent packages: sp, maptools)

I data(columbus)

I 5 variablesI crime - recorded crime per inhabitantI income - average income valuesI housing - average housing costsI x - latitudeI y - longitude

I Relationship between crime and income & housing.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 76: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I R package : spgwr (dependent packages: sp, maptools)

I data(columbus)

I 5 variablesI crime - recorded crime per inhabitantI income - average income valuesI housing - average housing costsI x - latitudeI y - longitude

I Relationship between crime and income & housing.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 77: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Need to find a bandwidth for a given geographically weightedregression by optimizing a selected function.

I gwr.sel(formula, data, coords, adapt=FALSE, ...)

I formula, data, coords.I adapt - either TRUE: find the proportion between 0 and 1 of

observations to include in weighting scheme (k-nearest neighbors), orFALSE find global bandwidth.

I Returns the cross-validation bandwidth.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 78: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Need to find a bandwidth for a given geographically weightedregression by optimizing a selected function.

I gwr.sel(formula, data, coords, adapt=FALSE, ...)

I formula, data, coords.I adapt - either TRUE: find the proportion between 0 and 1 of

observations to include in weighting scheme (k-nearest neighbors), orFALSE find global bandwidth.

I Returns the cross-validation bandwidth.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 79: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Need to find a bandwidth for a given geographically weightedregression by optimizing a selected function.

I gwr.sel(formula, data, coords, adapt=FALSE, ...)I formula, data, coords.

I adapt - either TRUE: find the proportion between 0 and 1 ofobservations to include in weighting scheme (k-nearest neighbors), orFALSE find global bandwidth.

I Returns the cross-validation bandwidth.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 80: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Need to find a bandwidth for a given geographically weightedregression by optimizing a selected function.

I gwr.sel(formula, data, coords, adapt=FALSE, ...)I formula, data, coords.I adapt - either TRUE: find the proportion between 0 and 1 of

observations to include in weighting scheme (k-nearest neighbors), orFALSE find global bandwidth.

I Returns the cross-validation bandwidth.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 81: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Need to find a bandwidth for a given geographically weightedregression by optimizing a selected function.

I gwr.sel(formula, data, coords, adapt=FALSE, ...)I formula, data, coords.I adapt - either TRUE: find the proportion between 0 and 1 of

observations to include in weighting scheme (k-nearest neighbors), orFALSE find global bandwidth.

I Returns the cross-validation bandwidth.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 82: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Fit GWR model.

I gwr(formula, data, coords, bandwidth, ...)

I formula, data, coords.I bandwidth - bandwidth used in the weighting function.I An example.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 83: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Fit GWR model.

I gwr(formula, data, coords, bandwidth, ...)

I formula, data, coords.I bandwidth - bandwidth used in the weighting function.I An example.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 84: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Fit GWR model.

I gwr(formula, data, coords, bandwidth, ...)I formula, data, coords.

I bandwidth - bandwidth used in the weighting function.I An example.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 85: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Fit GWR model.

I gwr(formula, data, coords, bandwidth, ...)I formula, data, coords.I bandwidth - bandwidth used in the weighting function.

I An example.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 86: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

spgwrgwr.selgwr

GWR

I Fit GWR model.

I gwr(formula, data, coords, bandwidth, ...)I formula, data, coords.I bandwidth - bandwidth used in the weighting function.I An example.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 87: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

QR & GWQR

I Quantile regression is also a method that could be applied to spatialdata.

I Another regression method called Geographically Weighted QuantileRegression (GWQR), as well as the corresponding R package areunder development.

I By integrating the features of QR into GWR, the GWQR permitsresearchers to investigate the spatial non-stationary across bothspace and the whole distribution of a dependent variable.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 88: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

QR & GWQR

I Quantile regression is also a method that could be applied to spatialdata.

I Another regression method called Geographically Weighted QuantileRegression (GWQR), as well as the corresponding R package areunder development.

I By integrating the features of QR into GWR, the GWQR permitsresearchers to investigate the spatial non-stationary across bothspace and the whole distribution of a dependent variable.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 89: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

QR & GWQR

I Quantile regression is also a method that could be applied to spatialdata.

I Another regression method called Geographically Weighted QuantileRegression (GWQR), as well as the corresponding R package areunder development.

I By integrating the features of QR into GWR, the GWQR permitsresearchers to investigate the spatial non-stationary across bothspace and the whole distribution of a dependent variable.

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 90: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 91: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 92: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 93: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 94: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)

Page 95: Introduction of geospatial data visualization and ...biostat.mc.vanderbilt.edu/...geospatial_data__GWR.pdfI Zip code boundary data (or Alaska & Hawaii boundary data) I R function to

MotivationColor ScaleDraw Map

Assign ColorsResults

Geographically Weighted RegressionQuantile Regression & Geographically Weighted Quantile Regression

Discussion

Discussion

I We can find lots of boundaries on line. If it’s a .shp file, we caneasily read it into R and use it now.

I However, the biggest assumption (but it should always followed) is,those blocks are following certain order.

I There are also lots of color platter available on line.

I GWR, QR, or GWQR should be applied for spatial data.

I Geographically Weighted Regression: The Analysis of SpatiallyVarying Relationships. WILEY (2002). $120 !!!

I Thank you !! & Questions ??

Frank Fan Introduction of geospatial data visualization and geographically weighted regression (GWR)