View source: R/fetch_postcode.R
fetch_postcodes | R Documentation |
Fetch entire postcodes
fetch_postcodes(postcodes)
postcodes |
one or more postcodes (as numbers, which will be coerced to integers) |
Returns an entire postcode of address data. This is useful for generating samples on a per-postcode basis.
data.table containing all addresses and coordinates
load(system.file("extdata", "bne_addresses.rda", package = "PSMA")) bnedata <- fetch_postcodes(unique(bne_addresses$postcode)) # Select 3 addresses at random from each postcode bnedata[, .SD[sample(.N, 3)], by=.(POSTCODE)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.