The main goal of this routine is to generate n hexagon side by side in a set as a hexagon wall, similar to a bee hive but with a shape aproximately with the Brazil's geometry coordinates. The inspiration for this work comes from the Mitchell O'Hara-Wild Bol's post posted in JULY 11, 2018. The hex sticker feature wall was presented at useR! 2018, in Birsbane, and it involved arranging approximately 200 stickers in the shape of Australia. Our goal is to replicate this for Brazil.
But, Why hexagons to fill the area of a map? According to Nicholas Lewin-Koh, hexbing R package author:
"There are many reasons for using hexagons, at least over squares. Hexagons have symmetry of nearest neighbors which is lacking in square bins. Hexagons are the maximum number of sides a polygon can have for a regular tesselation of the plane, so in terms of packing a hexagon is 13% more efficient for covering the plane than squares. "
which can be read in more details by clicking here
We divide this routine in 3 steps:
-
First one, we will use the function hexwal which is implemented in the file
hexwall.R
initially written by Mitchell O'Hara-Wild which can be found on his Github or simply downloaded by clicking Here. -
Later
rstudio/hex-stickers blog.mitchelloharawild.com/blog/hexwall/)
https://drive.google.com/file/d/1s6e8crbTxhlVMTuLUqzMaJmuKwc6KvV2/view?usp=sharing