Black & white

[This article was first published on, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

A photo of three Adelie Penguin

Adelie Penguin (Pygoscelis adeliae) – CC-BY-SA by Gregory “Slobirdr” Smith

Day 24 of 30DayMapChallenge: « Black & white » (previously).

All #RStats enthusiasts seem to love Penguins (at least as a toy dataset), so I made a map.




Data produced by the Antarctic Penguin Biogeography Project (Che-Castaldo, Humphries, and Lynch 2022) and downloaded from MAPPPD (Mapping Application for Penguin Populations and Projected Dynamics).

penguin_file <- "penguins.csv"
if (!file.exists(penguin_file)) {

penguins <- read_csv(penguin_file) |> 
  st_as_sf(coords = c("longitude_epsg_4326", "latitude_epsg_4326"),
        crs = "EPSG:4326") |> 

adelie <- penguins |> 
  filter(common_name == "adelie penguin") 

countries <- ne_countries(scale = 50, returnclass = "sf") |> 


bbox <- adelie |> 
  st_buffer(1e5) |> 
adelie |> 
  ggplot() +
  geom_sf(data = countries, fill = "white", color = "white") +
  geom_sf(size = 1.2) +
  coord_sf(xlim = bbox[c(1, 3)], 
           ylim = bbox[c(2, 4)]) +
  labs(title = "Adélie penguin distribution",
       subtitle = "*Pygoscelis adeliae*",
       x = "",
       y = "", 
       caption = glue("Data: Antarctic Penguin Biogeography Project
                       Basemap: Natural Earth
              {Sys.Date()}")) +
  theme_void() +
  theme(plot.subtitle = element_markdown(),
        plot.caption = element_text(size = 6),
        panel.background = element_rect(fill = "lightgrey"))

Map of the Adélie penguin distribution around Antarctica

Figure 1: Adélie penguin distribution


Che-Castaldo, Christian, Grant Humphries, and Heather Lynch. 2022. “Antarctic Penguin Biogeography Project: Database of Abundance and Distribution for the Adélie, Chinstrap, Gentoo, Emperor, Macaroni, and King Penguin South of 60 S.” SCAR – AntOBIS.
To leave a comment for the author, please follow the link and comment on their blog: offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)