The goal of place is to specify a region simply as point (longitude,latitude) and a region around that.
This package does absolutely nothing with this information, but other packages might (get where I’m going …?).
Data at virtualearth.
You can install the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("mdsumner/place")
This is a basic example which shows you how to solve a common problem:
library(place)
## get me outta here
where()
#> where : 88.63528, 27.45667 (lon, lat)
#> width : 111120
#> height: 111120
Ok, get me somewhere specific.
where(156, 34, wh = 100000) ## 100km either side of that location
#> where : 156, 34 (lon, lat)
#> width : 1e+05
#> height: 1e+05
More useful, give me a defined discretized region around a location.
where(147, -42, wh = c(1, 1) * 5000)
#> where : 147, -42 (lon, lat)
#> width : 5000
#> height: 5000
place("1 George St, Bathurst NSW", wh = c(1, 1.6) * 15000, dimension = 1024)
#> Loading required namespace: tidygeocoder
#> $extent
#> [1] -15000 15000 -24000 24000
#>
#> $dimension
#> [1] 1024 1638
#>
#> $projection
#> [1] "+proj=laea +lon_0=149.6 +lat_0=-33.4 +datum=WGS84"
Please note that the place project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.