SPAG: Function calculating the coverage, distance and overlap...

Description Usage Arguments Examples

Description

Function calculating the coverage, distance and overlap components of the SPAG Index.

Usage

1
2
3
SPAG(companiesDF, shp, theoreticalSample = 1000, empiricalSample = 1000,
  numberOfSamples = 1, columnAreaName, companiesProjection, CRSProjection,
  totalOnly = FALSE, theoreticalDistributionType = "regular")

Arguments

companiesDF

- data frame with information regarding the companies. The data frame needs four columns: the longitude and latitude, the number of employees in each company and a category to which the company is assigned. The columns should be provided in the aforementioned order.

shp

- SpatialPolygonsDataFrame object obtained via loading a shapefile.

theoreticalSample

- number of Companies used of the estimation of the average distance between companies assuming uniform distribution.

empiricalSample

- number of companies used for the estimation of the average distance between companeis for which the distance index is being calculated.

numberOfSamples

-

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(CompaniesPoland)
data(MapPoland)
spagIndex <- SPAG(CompaniesPoland,shp = MapPoland)
print(spagIndex)
plot(spagIndex)
plot(spagIndex, addCompanies = FALSE)
plot(spagIndex, category = "A")
plot(spagIndex, category = "A") + coord_map("orthographic")
plot(spagIndex, category = "B")
plot(spagIndex, category = "C")

pbiecek/SPAG documentation built on May 24, 2019, 10:36 p.m.