ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
778 stars 116 forks source link

Add hexagonal representation of Brazilian States (and other in the future?) #326

Open JoaoCarabetta opened 9 months ago

JoaoCarabetta commented 9 months ago

I just spent some time making a hexagonal representation of Brazil. I couldn't find it ready anywhere and had to do it myself. The hexagonal representation of states is usual in dataviz worldwide, especially in the USA. It is quite useful b/c it lets you compare states of sizes, keeping the geographical intuition of their location and neighborhood.

Below, there is a hexagonal representation that I generated after combining complicated hexagonal grid maths and LabVis UFRJ study on the topic.

image

Currently, geobr is focused on official spatial data sets of Brazil. But, practically, it is also a dataviz tool to plot Brazilian datasets in friendly and well-behaved shapes. People come here to make dirty plots of their data or beautiful publication-grade visualizations.

A counter-argument argues that these are 'artistic' representations, so size, spacing, ordering, and other specs should be customizable. The geobr package only pretends to serve geometries, not to modify them. Given that, I suggest we choose one set of specs of our liking and publish it as it is.

Given the prevalence of hexagonal visualization of states on foreign media and the use of the package. Adding this representation to the package seems reasonable, not as official data, but in a particular category. Also, more special geometries might be added in the future.

Considering the above, there are two options to add these special geometries:

1) Add one generic function that will contain all special geometries. read_special_geom( type='state_hex)

2) Add one function to each special geometry read_state_hex(year=2010)