analyzing spatial data in r roger bivand
TRANSCRIPT
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
1/30
Odofysjde Wpotjof Coto jd [2 Uarmlc lxoipfl2
elastotjstjgs
[aelr Kjvodc
Clportildt an Lgadaijgs
Darwlejod Wghaaf an Lgadaijgs odc Kusjdlss Ocijdjstrotjad
Klreld& Darwoy
7? Oueust ;005
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
2/30
Uarmlc lxoipfl2 elastotjstjgs
Elastotjstjgs js o kjt fjml thl ofghliy an spotjof stotjstjgs&nagusslc iarl ad prlcjgtjad thod iaclf ttjde
Wjdgl thl rlosad nar iaclffjde js ghjly prlcjgtjad jdprl)iaclf)koslc elastotjstjgs& odc ta o eaac lxtldt jd
iaclf)koslc elastotjstjgs& wlff ofsa mllp ta jdtlrpafotjad hlrl Jdtlrpafotjad js tryjde ta ioml os eaac eulssls os passjkfl an
thl vofuls an thl vorjokfl an jdtlrlst nar pfogls whlrl thlrl orlda akslrvotjads (god kl jd ?& ;& 7& $ $ $ cjildsjads*
Shlsl orl koslc ad thl rlfotjvl pasjtjads an pfogls wjthakslrvotjads odc pfogls nar whjgh prlcjgtjads orl rlqujrlc& odcthl akslrvlc vofuls ot akslrvotjads
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
3/30
Elastotjstjgs pogmoels
Shl estot pogmoel pravjcls o wjcl rodel an nudgtjads nar
udjvorjotl odc iuftjvorjotl elastotjstjgs& ofsa nar forelrcotoslts& whjfl ela[ odc ela[efi gadtojd nudgtjads nariaclf)koslc elastotjstjgs
O sjijfor wjcl rodel an nudgtjads js ta kl naudc jd thl lfcs
pogmoel$ Shl spotjof pogmoel js ovojfokfl os port an thl ^[kudcfl (shjpplc wjth kosl [*& odc gadtojds slvlrof garlnudgtjads
Shl [odcaiNjlfcs pogmoel pravjcls nudgtjads nar thlsjiufotjad odc odofysjs an rodcai lfcs$ Nar cjoedastjgs an
vorjaerois& thl vorcjoe pogmoel god kl uslc Shl selastot pogmoel js ofsa ovojfokfl= wjthjd thl soil
eldlrof tapjgof orlo orl thl trjpogm nar trjodeufotjad odc thlomjio pogmoel nar spfjdl jdtlrpafotjad
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
4/30
Ilusl sajf coto
Shl Ioos rjvlr kodm sajf paffutjad coto (Fjikure& ShlDlthlrfodcs* orl soipflc ofade thl Cutgh kodm an thl rjvlrIoos (Ilusl* darth an Ioostrjght= thl coto orl thasl uslc jdKurraueh odc IgCaddlff (?::8& pp$ 70:7??*
Shlsl orl o sukslt an thl coto pravjclc wjth estot odc sp&kut hlrl wl usl thl soil sukslt os thl vlry wlff rleorclc EJWtlxtkaam& jd gosl grass)ghlgmjde js an jdtlrlst
Shl coto uslc hlrl orl o shoplfl doilc KIgC$shp wjth jtscoto tokfl wjth thl zjdg ppi ilosurlildts wl orl jdtlrlstlc
jd jdtlrpafotjde& odc od OWGJJ erjc an aac nrlquldgjls nar thlport an thl rjvlr kodm wl orl jdtlrlstlc jd& ejvjde thlprlcjgtjad fagotjads
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
5/30
[locjde thl coto
4 fjkrory(recof*4 KIgC 6) rlocAE[(+$+& +KIgC+*
AE[ coto saurgl wjth crjvlr2 LW[J WhoplnjflWaurgl2 +$+& foylr2 +KIgC+wjth :8 raws odc ?< gafuids
4 KIgC#Nfcn 6) nogtar(KIgC#Nfcn*4 doils(KIgC*
]?Y +x+ +y+ +xf+]3Y +yf+ +lflv+ +cQrjvlr+]5Y +Gc+ +Gu+ +Pk+
]?0Y +Rd+ +FAJ+ +Nfcn+]?7Y +Wajf+ +fjil+ +fodcusl+
4 prab3strjde(KIgC* 6) G[W(+-jdjt9lpse2;8::;+*
Ofthaueh recof js uslc hlrl& thlioptaafs nudgtjad rlocWhoplPajdts
gaufc kl uslc$ Wjdgl o vorjokfl anjdtlrlst aac nrlquldgy js ogotlearjgof vorjokfl kut rloc osduilrjg& jt js slt ta nogtar
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
6/30
Akslrvlc zjdg ppi flvlfs
Rd
qqqqqqqqqqqqqqqqqqqqq
q
qqq
q
q
q
q
q
qqqqqqq
q
q
qq
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
qq
q
q
qq
q
q
qqq
q
q
q
qq
q
qq
qq
qqq q
qqqqqq
??7?8>$;l)?;[lsjcuofs :< :0?7> :388?
4 lrls 6) lrrarlst(Rd ~ Nfcn& coto 9 os(KIgC& +coto$nroil+*& iaclf 9 fi&- lst$poro 9 gadtraf$lrrarlst(m 9 draw(KIgC*& rodcai 9 NOFWL&- prlcjgtjads 9 S[\L**4 raudc(lrls#lrrar& ;*
]?Y 7?0$53
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
14/30
Ospotjof aac nrlquldgy iaclf
Nfaac nrlquldgy iaclf jdtlrpafotjad
q
q
q
q
q
qq
q
q
q
q
qqq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
qq
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q q
q
udclr ?70
?70 ?
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
15/30
Shjd pfotl spfjdl jdtlrpafotjad
Shl dlxt ottlipt usls tps nrai lfcs ta ca thjd pfotl spfjdljdtlrpafotjad& rst jd o faap ta ca FAA G^24 fjkrory(njlfcs*4 plQtps 6) duilrjg(draw(KIgC**4 gKIgC 6) gaarcjdotls(KIgC*
4 nar (j jd slq(ofade 9 plQtps** {- tpsj 6) Sps(gKIgC])j& Y& KIgC#Rd])jY*- prj 6) prlcjgt(tpsj& gKIgC]j& & crap 9 NOFWLY*- plQtps]jY 6) KIgC#Rd]jY ) prj- }4 raudc(sqrt(ilod(plQtpsT;**& ;*
]?Y ;>7$>:
4 tps 6) Sps(gaarcjdotls(KIgC*& KIgC#Rd*
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
16/30
Shjd pfotl spfjdl jdtlrpafotjad
Shjd pfotl spfjdl iaclf
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
qq
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
udclr ?70
?70 ?
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
17/30
Iaclffjde thl fagof siaath
Jn wl ghaasl ta usl elastotjstjgofilthacs& wl dllc o iaclf an fagofclpldcldgl& odc gadvldtjadoffy tod lxpadldtjof iaclf ta thl zjdg
ppi coto24 fjkrory(estot*4 gvei 6) vorjaeroi(Rd ~ ?& coto 9 KIgC&- wjcth 9 ?00& gutann 9 ?000*4 lnjttlc 6) njt$vorjaeroi(gvei&- vei(psjff 9 ?& iaclf 9 +Lxp+&- rodel 9 ?00& dueelt 9 ?**4 lnjttlc
iaclf psjff rodel? Due ;?>
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
18/30
A cj m j j cj j
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
19/30
Arcjdory mrjejde prlcjgtjads
Njttlc lxpadldtjof AM iaclf
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
qq
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
udclr ?70
?70 ?
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
20/30
Arcjdory mrjejde stodcorc lrrars
Njttlc lxpadldtjof AM stodcorc lrrars
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
qq
qq
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q q
q
udclr ;30
;30 ;0 ;50
;50 ;80
;80 ;:0
;:0 700
700 7
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
21/30
\djvlrsof mrjejde occjde aac nrlquldgjls
Ul mdaw thot aac nrlquldgjlsioml o cjfflrldgl god wl gaikjdlthl fagof siaath wjth thot efakofsiaath14 gvei 6) vorjaeroi(Rd ~ Nfcn&- coto 9 KIgC& wjcth 9 ?00&- gutann 9 ?000*4 ulnjttlc 6) njt$vorjaeroi(gvei&- vei(psjff 9 ?& iaclf 9 +Lxp+&- rodel 9 ?00& dueelt 9 ?**4 ulnjttlc
iaclf psjff rodel
? Due 75;00 800
q
qq
q
q q
q q
q
q
7;
?5>
;;?
;5 ;800
800
?000
?;00
?300
?>00
?800
\sjde sppfat& wl god cjspfoy off thlprlcjgtjads taelthlr& ta ejvl o vjlw
an aur praerlss24 pts 9 fjst(+sp$pajdts+& KIgC&- pgh 9 3& gaf 9 +kfogm+&- glx 9 0$
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
26/30
Lxpartjde o gaipfltlc prlcjgtjad
Ul wjff doffy try ta lxpart thl udjvlrsof mrjejde prlcjgtjads os oElaSjff fl& odc rloc jt jdta OrgEJW$ Jd progtjgl& thjs rlqujrls usjde
Saafkax
[ostlr
Gofgufotl stotjstjgs& odc thld rjeht)gfjgmjdead thl foylr2 Praplrtjls Wyikafaey Gfossjlc24 wrjtlECOF(KIgCQerjc]+\MQprlc+Y& +\MQprlc$tjn+*
Shl lxpartlc rostlr vjlwlc jd OrgEJW
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
27/30
Shl lxpartlc rostlr vjlwlc jd OrgEJW
Urjtjde o EL jioel avlrfoy
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
28/30
Urjtjde o EL jioel avlrfoy
4 fjkrory(ioptaafs*4 erc 6) os$WpotjofPafyeads$WpotjofPjxlfs(KIgCQerjc*4 prab3strjde(erc* 6) G[W(prab3strjde(KIgC**4 erc$udjad 6) udjadWpotjofPafyeads(erc& rlp(+x+& fldeth(sfat(erc& +pafyeads+****4 erc$udjad$ff 6) spSrodsnari(erc$udjad& G[W(+-prab9fadefot+**4 ffE[C 6) ELQWpotjofErjc(erc$udjad$ff& ioxPjxlfs 9 ?00*4 ffE[CQjd 6) avlrfoy(ffE[C#WE& erc$udjad$ff*4 ffWPjx 6) os(WpotjofErjcCotoNroil(erjc 9 sfat(ffE[C#WE& +erjc+*& prab3strjde 9 G[W(prab3strjde(ffE[C#WE**
- coto 9 coto$nroil(jd0 9 ffE[CQjd**& +WpotjofPjxlfsCotoNroil+*4 WPjx 6) spSrodsnari(ffWPjx& G[W(+-jdjt9lpse2;8::;+**4 z 6) prlcjgt(AMQnjt& dlwcoto 9 WPjx& clkue$flvlf 9 0*4 ffWPjx#prlc 6) z#AMQnjt$prlc4 pde(njfl 9 +zjdgQAM$pde+& wjcth 9 ffE[C#wjcth& hljeht 9 ffE[C#hljeht&- ke 9 +trodsporldt+*4 por(ior 9 g(0& 0& 0& 0*& xoxs 9 +j+& yoxs 9 +j+*4 jioel(ffWPjx& +prlc+& gaf 9 kpy$gafars(;0**4 clv$ann(*
4 mifAvlrfoy(ffE[C& +zjdgQAM$mif+& +zjdgQAM$pde+*
Shl jioel avlrfoy vjlwlc jd EL
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
29/30
Shl jioel avlrfoy vjlwlc jd EL
Gadgfusjads
-
7/31/2019 Analyzing Spatial Data in R Roger Bivand
30/30
Gadgfusjads
Shl sp gfossls god kl uslc (iarl ar flss* fjml coto nroils jdiody gadtlxts
Shl cjspfoy ilthacs ad eldlrotlc prlcjgtjads odc stodcorclrrars god kl uslc cjrlgtfy& wjth spotjof pasjtjad kljde hodcflcwjthjd thl sp gfoss akblgts
Eldlrotjde autput nar jdtlrnogjde wjth athlr santworl js o kjtpjgmy (Org prlnlrs sjdefl)kodc ElaSjffs& whjfl LD^J wjff cjelstiuftj)kodc fls wjth da opporldt cjsgainart*
Odc wl orl stjff bust ot thl klejddjde an iomjde prlcjgtjads
thlrl orl nor iarl saphjstjgotlc ilthacs aut thlrl& kut thlyofsa kldlt nrai losl an stodcorcjslc coto jipart& lxpart&odc cjspfoy