utility - How many blocks and many other stats about blocks and sites
Source:R/getblocks_diagnostics.R
getblocks_diagnostics.Rd
utility - How many blocks and many other stats about blocks and sites
Arguments
- x
The output of
getblocksnearby()
like testoutput_getblocksnearby_10pts_1miles- detailed
if TRUE, also shows in console a long table of frequencies via
getblocks_summarize_blocks_per_site()
- see_pctiles
set to TRUE to see 20 percentiles of distance in a table
- see_distanceplot
if TRUE, also draws scatter plot of adjusted vs unadj distances
See also
This relies on getblocks_summarize_blocks_per_site()
and getblocks_summarize_sites_per_block()
Examples
getblocks_diagnostics(testoutput_getblocksnearby_10pts_1miles)
# library(data.table)
x <- data.table::copy(testpoints_10)
setDT(x)
pts <- rbind(data.table(lat = 40.3, lon = -96.23),
x[ , .(lat, lon)])
z <- getblocksnearbyviaQuadTree(pts, 1, quadtree = localtree, quiet = T)
z[ , .(blocks = .N) , keyby = 'ejam_uniq_id']
plotblocksnearby(pts, radius = 1, sites2blocks = z)
zz <- getblocks_diagnostics(z, detailed = T, see_pctiles = T)
cbind(stats = zz)
getblocks_diagostics(testoutput_getblocksnearby_1000pts_1miles, see_distanceplot = TRUE)