areal data

Plotting a Neighborhood Network with ggplot2

Here is an example of plotting a neighborhoods network with ggplot2 using the sf and sfdep packages for counties in a U.S. state. We can display the “weights” feature of the neighborhoods network as the size of the line segments by scaling the size aesthetic with + scale_size_identity().