How do I fix the hexagon distortion when plotting a 2D hexbin map of US in r?

I was trying to make a 2D hexbin map of the US in R and I followed this guide:
https://r-graph-gallery.com/328-hexbin-map-of-the-usa.html
Context: I was only able to find a couple “how to’s” online for what I was trying to do, and the above link is the one I was able to successfully reproduce with my data; the above guide is very similar, if not the same, as the other guides though. Further, judging by screenshots on the others I found, however, it does appear as if they all ended up with the same distorted hexagon issue that I did, so I at least know the solution is not as simple as trying one of those others I found instead, or if it is an issue with a package used in the above guide, it is also presenting as an issue in others that used different packages but similar processes (i.e., https://dges.carleton.ca/CUOSGwiki/index.php/Creating_Hexbin_Maps_in_R)

Anyways, I “successfully” completed the process outlined in that guide, however, some of the hexagons are distorted (AK and HI are most obvious, but not the only ones that are not uniform). You can see this in my final plot, the link/image for which I included at the end, below my code. Now, if you look at the guide I used (as well as others, like I said), you will see that the same issue is occurring in many of the images they post to illustrate the different steps of making this visualization. The only place I don’t see the issue is when I navigate to the original source of the geo data (which all the guides I found reference to use for this purpose: https://team.carto.com/u/andrew/tables/andrew.us_states_hexgrid/public/map), however I don’t know if that is because the issue isn’t with the file, because the view they are showing isn’t a still image, or because the image they are showing is actually being pulled from somewhere else entirely.

Now, I know from GIS coursework as a grad student that projection is important in map making, and map distortion can happen when your projection isn’t right because you are trying to take something 3D and make it flat, but I’m not certain whether or not that is even related here for a couple reasons (i.e., projection setting isn’t visible in this code?)

I can confirm that it does not appear to be a result of resizing the image produced in R. At first, I thought it was because the images had been stretched between plotting them and the creation of the guide (i.e., resizing screenshots), but that does not appear to be the case either. Mine turned out the same (i.e., distorted). And the other reason I thought that the map projection aspect wasn’t the issue was because I’m only trying to make 2D hexagons that should all be the same size to create what ‘looks like’ but does not proportionately represent, the US. [Am I wrong? Is it still a projection issue?]

Can anyone help me figure out how to fix this (or even just help me identify exactly where the issue is coming in, if not a full solution) so I can fix it and make it so each of the hexagons are uniform? Everywhere I see other people referencing using the same shapefile (and similar but varying code to combine it with their data), and in most of their plots, they are also skewed like mine, but it is unclear why it ends up skewed, and no one mentions the distortion anywhere I can find. I just know my visualization won’t get approved for what I need it for with that distortion.

Here is my code, that I adapted for my data, from the aforelinked guide.
FYI I tried it with both the SHP version of the file and the GEOJSON versions of the geo data, and that didn’t make a difference in the distortion aspect.


# Load this file. (Note: I stored in a folder called DATA)
my_sf <- read_sf("us_states_hexgrid.geojson")

# Bit of reformatting
my_sf <- my_sf %>%
  mutate(google_name = gsub(" \(United States\)", "", google_name))

my_sf <- my_sf %>% rename(State = google_name)


# Show it
plot(st_geometry(my_sf))


ggplot(my_sf) +
  geom_sf(fill = "skyblue", color = "white") +
  geom_sf_text(aes(label = iso3166_2)) +
  theme_void()

# Load MAP data

library(readxl)
state_level_policy_data_for_R_data_viz <- read_excel("state level policy data for R data viz.xlsx")
View(state_level_policy_data_for_R_data_viz)

policy <- state_level_policy_data_for_R_data_viz
remove(state_level_policy_data_for_R_data_viz)

#Perform spatial join 
my_sf2 <- my_sf %>% 
  left_join(. , policy, by=c("State")) 
#Check if the join was successful
view(my_sf2)

library(viridis)
 my_palette <- rev(magma(8))[c(-1, -8)]
  
ggplot(my_sf2) +
 geom_sf(aes(fill = `Overall Category`), linewidth = 0, alpha = 0.9) +
 geom_sf_text(aes(label = iso3166_2), color = "white", size = 3, alpha = 0.6) +
   theme_void() +
    scale_fill_discrete(breaks=c("High", "Medium", "Fair", "Low", "Negative"))```

Here is my plot: (please also see those in the guide)
[hexbin map](https://i.sstatic.net/WuvPpBwX.png)

New contributor

user25722924 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật