EVOLUTION-MANAGER
Edit File: st_interpolate_aw.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Areal-weighted interpolation of polygon data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for st_interpolate_aw {sf}"><tr><td>st_interpolate_aw {sf}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Areal-weighted interpolation of polygon data</h2> <h3>Description</h3> <p>Areal-weighted interpolation of polygon data </p> <h3>Usage</h3> <pre> st_interpolate_aw(x, to, extensive, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>object of class <code>sf</code>, for which we want to aggregate attributes</p> </td></tr> <tr valign="top"><td><code>to</code></td> <td> <p>object of class <code>sf</code> or <code>sfc</code>, with the target geometries</p> </td></tr> <tr valign="top"><td><code>extensive</code></td> <td> <p>logical; if TRUE, the attribute variables are assumed to be spatially extensive (like population) and the sum is preserved, otherwise, spatially intensive (like population density) and the mean is preserved.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>ignored</p> </td></tr> </table> <h3>Examples</h3> <pre> nc = st_read(system.file("shape/nc.shp", package="sf")) g = st_make_grid(nc, n = c(20,10)) a1 = st_interpolate_aw(nc["BIR74"], g, extensive = FALSE) sum(a1$BIR74) / sum(nc$BIR74) # not close to one: property is assumed spatially intensive a2 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE) # verify mass preservation (pycnophylactic) property: sum(a2$BIR74) / sum(nc$BIR74) a1$intensive = a1$BIR74 a1$extensive = a2$BIR74 plot(a1[c("intensive", "extensive")], key.pos = 4) </pre> <hr /><div style="text-align: center;">[Package <em>sf</em> version 0.9-5 <a href="00Index.html">Index</a>]</div> </body></html>