lawn_featureeach | R Documentation |
Iterate over features in any GeoJSON object
lawn_featureeach(x, fun = NULL, lint = FALSE)
x |
any data-GeoJSON object |
fun |
a Javascript function. if not given, returns self |
lint |
(logical) Lint or not. Uses geojsonhint. Takes up increasing
time as the object to get linted increases in size, so probably use by
default for small objects, but not for large if you know they are good
geojson objects. Default: |
matrix of coordinates, where each row in the matrix is a coordinate pair
x <- "{ type: 'Feature', geometry: null, properties: { foo: 1, bar: 3 } }" # don't apply any function, identity essentially lawn_featureeach(x) lawn_featureeach(lawn_data$points_count) # appply a function callback lawn_featureeach(lawn_data$points_count, "z.geometry") lawn_featureeach(lawn_data$points_count, "z.geometry.type") lawn_featureeach(lawn_data$points_count, "z.properties") lawn_featureeach(lawn_data$points_count, "z.properties.population")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.