polygons from coordinates
I've got a data.frame with lat s and lng s that define the boundaries of rectangular boxes, like so geohash north_lat south_lat east_lng west_lng 1 gbsuv 48.69141 48.64746 -4.306641 -4.350586 2 gbsuy 48.69141 48.64746 -4.262695 -4.306641 What's the easiest way to convert this into an sf object that holds a column of POLYGON s? The key to creating polygons is that the coordinates have to be in sequence to form a closed area (i.e., the last point is the same as the first point). So your data will need a bit of manipulation to create the coordinates, and put them in order. In my example I've done