code using polygon_df should not assume that the first and last point
within each id are the same. i.e. they may have to manulaly set a final
point equal to the initial point if that is what their graphics system
desires
Examples
df <- create_polygon_df(x = c(0, 0, 1, 1), y = c(0, 1, 1, 0))
is_polygon_df(df)
#> [1] TRUE
