Description Usage Arguments Value
View source: R/sample-locations.R
Sample from a particular polygon shapefile
1 2 | sample_locations_uniform(place_id, n_house, shapefile, noise = 0.001,
shapefile_id = NULL)
|
place_id |
numeric specifiying the ID of the region we are subsampling |
n_house |
numeric indicating the number of households |
shapefile |
sp class with all of the locations for each place id |
noise |
numeric indicating how must noise to add to sampled points This is only used if the number of points to sample exceeds 100,000, in which case the spsample function takes too long. Instead, we sample 100,000 points, sample n_house from these 100,000, and then add random noise. |
shapefile_id |
optionally include a shapefile id for subsetting shapefile |
SpatialPoints object with coordinates for the n households
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.