team_10: Polygon and geographic information from a shapefile

Description Usage Arguments Value Examples

Description

Get polygon and geographic information from a shapefile that is thinned to a more feasible dimension. This is team 10's results

Usage

1
team_10(file, tolerance = 0.1, fileread = TRUE)

Arguments

file

path to a shapefile (.shp) with spatial geometry data OR (if fileread = F) a simple features object that contains a geometry column

tolerance

A numeric value greater than 0. How much should the data set be thinned?

fileread

Should the data be read from a file? Default is TRUE, use fileread=FALSE if the object is already a simple features object in the environment, perhaps read in via read_sf(). This may be useful if you already have the file read into the environment for another purpose

Value

A data frame, with each row corresponding to a unique polygon point and its associated polygon and geographic information.

Examples

1
2
3
4
5
6
7
#get data for plotting
oz <- ozbig
aus <- team_10(file = oz, tolerance = 0.1, fileread=FALSE)

#plot using ggplot2
library(ggplot2)
ggplot(data=aus)+geom_path(aes(x=long,y=lat,group=pgroup)) + theme_bw()

stharms/stat585Lab3Group10 documentation built on May 9, 2019, 1:12 a.m.