R/fortify_hexagon.R
fortify_hexagon.Rd
Creates the points that define a hexagon polygon for plotting
fortify_hexagon(data, sf_id, hex_size)
a data frame created by the allocate function
a string to indicate the column to identify individual polygons
a float value in degrees for the diameter of the hexagons
a data frame of the seven points used to draw a hexagon
# same column is used in create_centroids
fortify_hexagon(data = tas_lga_hexctr, sf_id = "lga_code_2016", hex_size = 0.2)
#> # A tibble: 174 × 16
#> lga_code_2016 longitude latitude points focal_longitude focal_latitude
#> <chr> <dbl> <dbl> <chr> <dbl> <dbl>
#> 1 60210 148. -41.4 Hobart 147. -42.9
#> 2 60210 148. -41.4 Hobart 147. -42.9
#> 3 60210 148. -41.4 Hobart 147. -42.9
#> 4 60210 148. -41.4 Hobart 147. -42.9
#> 5 60210 148. -41.4 Hobart 147. -42.9
#> 6 60210 148. -41.4 Hobart 147. -42.9
#> 7 60410 147. -42.7 Hobart 147. -42.9
#> 8 60410 147. -42.7 Hobart 147. -42.9
#> 9 60410 147. -42.7 Hobart 147. -42.9
#> 10 60410 147. -42.7 Hobart 147. -42.9
#> # ℹ 164 more rows
#> # ℹ 10 more variables: focal_dist <dbl>, focal_angle <dbl>, rownumber <int>,
#> # hex_long <dbl>, hex_lat <dbl>, hex_id <int>, long <dbl>, lat <dbl>,
#> # point_id <int>, poly_type <chr>