pts <- '{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"population": 5
},
"geometry": {
"type": "Point",
"coordinates": [5, 5]
}
}, {
"type": "Feature",
"properties": {
"population": 40
},
"geometry": {
"type": "Point",
"coordinates": [1, 3]
}
}, {
"type": "Feature",
"properties": {
"population": 80
},
"geometry": {
"type": "Point",
"coordinates": [14, 2]
}
}, {
"type": "Feature",
"properties": {
"population": 90
},
"geometry": {
"type": "Point",
"coordinates": [13, 1]
}
}, {
"type": "Feature",
"properties": {
"population": 100
},
"geometry": {
"type": "Point",
"coordinates": [19, 7]
}
}
]
}'
lawn_quantile(pts, 'population', c(25, 50, 75, 99))
lawn_quantile(pts, 'population', c(25, 50, 75, 95))
lawn_quantile(pts, 'population', c(25, 50, 75))
lawn_quantile(pts, 'population', c(1, 50, 99.9))
Run the code above in your browser using DataLab