Exploratory point pattern analysis.

Share:

Description

This function is design to provide an exploratory point pattern analysis. Is base on spatstat package a to do a basic point pattern analysis of Homogeneous an Inhomogeneous Poisson.

Usage

1
tspan(geotweets,bw, cont, acontour)

Arguments

geotweets

Geotagged tweets as a SpatialPointsDataFrame or a SpatialPointsDataFrame.

bw

Bandwith for Kernel Smoothed Intensity. Note that if you are using directly geotweets comming from tweet2r and t2SpatialPointDataFrame units are degrees.

cont

FALSE by default, geotweets bounding box provide the countour. If TRUE a countour must be provaided

acontour

Optional. A Spatial object with a defined bbox.

Details

In order to do a wider point pattern analysis is better to use directly the spatstat package

Value

tweetspphp

Simpliest Object of class"ppp"representing a point pattern dataset in the two-dimensional plane with no marks, (ppp)

hp

Homogeneous Poisson fitted point process model to an observed point pattern (ppm).

ihp

Inhomogeneous Poisson fitted point process model to an observed point pattern (ppm).

int

Computed kernel smoothed intensity function from a point pattern. (density.ppp).

Author(s)

Pau Aragó

References

Baddeley, Adrian, y Rolf Turner. «Spatstat: An R Package for Analyzing Spatial Point Patterns». Journal of Statistical Software 12, n.º 6 (2005). doi:10.18637/jss.v012.i06. http://www.jstatsoft.org/v12/i06/

See Also

spatstat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(sp)
library(spatstat)

#loada a SpatialPointsDataFrame
data("meuse.grid_ll")


# run function without contour
tspan(meuse.grid_ll,bw=0.0005)

#providing a contour as SpatialPointDataFrame
data("meuse.area")

#build the acontour layer 
cont<-SpatialPoints(meuse.area, proj4string = CRS("+init=epsg:28992"))
#transform to meuse.grid_ll reference system
cont<-spTransform(cont, CRS("+init=epsg:4326"))

# run function with contour
tspan(meuse.grid_ll,bw=0.0005, cont = TRUE, acontour=cont)
{
  }