Dark-eyed Junco image credit: Public Domain Files

Hamilton Christmas Bird Count: Part 2b

Visualizing the Hamilton Christmas Bird Count data

Dark-eyed Junco image credit: Public Domain Files

Hamilton Christmas Bird Count: Part 2b

Visualizing the Hamilton Christmas Bird Count data


This is the second (and a half) part of four for this dataset.


What am I hoping to learn from this dataset?

  1. Compare the first count year’s data to the latest year

  2. See how many species are seen each year

  3. Highlight certain species to look at any changes over time

To start, we’ll load all of the packages we’ll be using and set the plot theme:


hamilton_cbc <- read_rds(here("content",

A wonderful reference I’ve been using for this post is the book Birds of Hamilton and Surrounding Areas by Robert Curry and the Hamilton Naturalists’ Club, particularly the chapter called Hamilton Christmas Bird Count by Ian Richards.


Comparing the count’s first and latest year

Let’s start by looking at the first year anyone went out to do the count, in 1921. In Curry (2006), Ian Richards mentions that 2 observers went out that year for 8 hours, and they saw 9 species.

hamilton_cbc %>%
  filter(year == min(year),
         how_many_counted != 0) %>%
  select(species, how_many_counted) %>%
  arrange(-how_many_counted, species) %>%
  kable() %>%
  kable_styling(full_width = FALSE, position = "left")
species how_many_counted
American Tree Sparrow 12
Black-capped Chickadee 9
Blue Jay 3
Downy Woodpecker 2
White-breasted Nuthatch 2
American Robin 1
Brown Creeper 1
Gray Jay 1
Ruffed Grouse 1

Oh wow, they saw a Gray Jay! How many times have Gray Jays been seen on Hamilton Christmas Bird Counts?

hamilton_cbc %>%
  filter(species == "Gray Jay",
         how_many_counted != 0) %>%
  kable() %>%
  kable_styling(full_width = FALSE, position = "left")
year species species_latin how_many_counted total_hours how_many_counted_by_hour
1921 Gray Jay Perisoreus canadensis 1 8 0.125

That was the only time! At first I thought it might have been a mistake, but Curry (2006) mentions, in the Gray Jay historical records section, that at least two Gray Jays were seen that winter. (This book is so thorough!)

How does the first year’s count compare to the most recent year’s count?

hamilton_cbc %>%
  filter(year == max(year),
         how_many_counted != 0) %>%
  arrange(-how_many_counted, species) %>%
  head(15) %>%
  kable() %>%
  kable_styling(full_width = FALSE, position = "left")
year species species_latin how_many_counted total_hours how_many_counted_by_hour
2017 Canada Goose Branta canadensis 6665 198.75 33.534591
2017 Mallard Anas platyrhynchos 5034 198.75 25.328302
2017 Long-tailed Duck Clangula hyemalis 3465 198.75 17.433962
2017 European Starling Sturnus vulgaris 2844 198.75 14.309434
2017 House Sparrow Passer domesticus 2731 198.75 13.740880
2017 Common Goldeneye Bucephala clangula 2180 198.75 10.968554
2017 Greater Scaup Aythya marila 1378 198.75 6.933333
2017 Dark-eyed Junco Junco hyemalis 1068 198.75 5.373585
2017 Black-capped Chickadee Poecile atricapillus 935 198.75 4.704402
2017 Rock Pigeon Columba livia 875 198.75 4.402516
2017 White-winged Scoter Melanitta fusca 725 198.75 3.647799
2017 Mourning Dove Zenaida macroura 699 198.75 3.516981
2017 Ring-billed Gull Larus delawarensis 629 198.75 3.164780
2017 Northern Cardinal Cardinalis cardinalis 550 198.75 2.767296
2017 American Goldfinch Spinus tristis 473 198.75 2.379874

Those species look more familiar! And almost 200 person-hours were put in, amazing!

In 2017, how many species were seen in total?

hamilton_cbc %>%
  filter(year == max(year),
         how_many_counted != 0) %>%
  count() %>%
## [1] 100

100 species, nice! It’s not easy to get 100 species during a Christmas Bird Count. Only four other Ontario Christmas Bird Counts have done it, at least by 2004 (the latest year of Christmas Bird Count data in Curry (2006)).

Number of species counted each year

Below is a re-creation of a plot found in Curry (2006). It’s a plot of the number of species seen and the number of person-hours put in each year. Person-hours are the total number of hours the counters put in during that count. For example, if 3 people went out for four hours, there were 12 person-hours (4 * 3).

hamilton_cbc %>%
  group_by(year, total_hours) %>% # Bringing total_hours along for the grouping. Adding it won't affect the grouping because its value is constant within the grouping of each year, and this way we can use it for plotting after we use summarise
  filter(how_many_counted != 0) %>%
  summarise(number_of_species_that_year = n()) %>%
  ggplot() +
  geom_line(aes(x = year, y = number_of_species_that_year, color = "Number of species heard or seen"),
            size = 1) +
  geom_line(aes(x = year, y = total_hours, color = "Number of person-hours"),
            size = 1) +
  labs(x = "Year",
       y = "Number of species and person-hours") +
  scale_color_manual(values = c("Number of person-hours" = "orange", 
                                "Number of species heard or seen" = "blue")) +
  theme(legend.title = element_blank(),
        legend.position = "bottom",
        legend.direction = "vertical")

As the number of hours of person-hours increases, so does the number of species counted. But only up to a point, after which the number of species levels off. This probably means that, as long as there are at least 200 or so person-hours in a count, the Hamilton Christmas Bird Count counters will be finding all or almost all of the species in the Hamilton area on count day.

Here is a plot of the cumulative number of species seen during each count. I think the main take-away of this plot is that it is getting harder to see new species every year, which makes sense.

hamilton_cbc %>%
  filter(how_many_counted != 0) %>%
  group_by(species) %>%
  filter(year == min(year)) %>% # What's the first year any species was counted?
  ungroup() %>%
  group_by(year) %>%
  summarise(number_of_new_species_that_year = n()) %>%
  mutate(cumulative_new_species = cumsum(number_of_new_species_that_year)) %>%
  ggplot() +
  geom_point(aes(x = year, y = cumulative_new_species), col = "orange", size = 2) +
  labs(x = "Year",
       y = "Cumulative number of species counted")

Highlighting specific species

I now want to look at some of the species and how their counts have changed over the course of the count’s history. There is a lot to look at!

Curry (2006) mentions that the Hamilton Christmas Bird Count count circle was a different size before 1955, so, for most of the plots, I will only show information starting after 1955. But sometimes I think it’s interesting to look at all years of the data, so I might do that too! 😄

Since the code of these plots will be very similar, I am going to make a function for the plotting, where only the species plotted and the start year will vary:

plot_species <- function(cbc_df, start_year, species_to_plot) {
  cbc_df %>%
    filter(species %in% species_to_plot,
           year >= start_year) %>%
    ggplot() +
      x = year, 
      y = how_many_counted,
      color = species),
      size = 1) + # Put the size of the line outside of the aes because we're not varying it
    labs(x = "Year",
         y = "Number counted",
         color = "Species") +
               scales = "free",
               dir = "v") +
    scale_y_continuous(label = scales::comma) + # Add commas for thousands where necessary
    theme(legend.position = "none",
          plot.margin = margin(2, 20, 2, 2))


Introduced species

Everyone is interested in introduced species. The four I will be plotting are the European Starling, the House Sparrow, the Rock Pigeon, and the Ring-Necked Pheasant.

According to Curry (2006), Rock Pigeons only started being counted in 1973 and House Sparrows in 1931 (I think due to them being introduced species).

introduced <- c("European Starling",
                "House Sparrow",
                "Rock Pigeon",
                "Ring-necked Pheasant")

hamilton_cbc %>%
  mutate(how_many_counted = ifelse(species == "Rock Pigeon" &
                                     year < 1973,
                                   how_many_counted)) %>% # Make Rock Pigeon values pre-1973 to be NA as they were not counted
  plot_species(start_year = 1955,
               species_to_plot = introduced)

Look at the number of European Starlings! It’s so interesting that the numbers peaked in the 60,000’s in the 1980’s and have since seen a sharp decrease. House Sparrow counts have been pretty consistent. Pigeon numbers have slowly increased, and there was one year, in 2005, with over double the expected number. And the Ring-necked Pheasants have declined to be almost non-existent. Curry (2006), referencing a 1973 Waterdown Review article, says that a change in urbanization pattern, with areas now going directly from intensive farming to sub-divisions, with no scrubby brush period in between (which is where the pheasants like to live), is the main reason for the decline.

Eastern Bluebird

The next species I want to look at is the Eastern Bluebird. I volunteer with a local group that maintains bluebird nest boxes and wanted to see if the Hamilton Christmas Bird Count numbers showed any changes in Eastern Bluebird numbers since the Ontario Eastern Bluebird Society started in 1988.

hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = "Eastern Bluebird")

Perhaps the nest boxes are helping! Bluebird numbers have certainly increased since the 1980’s. Although I’m not sure what would cause such interesting cyclical increases and decreases since the late 1990’s!

However, in Curry (2006), there is a chapter by Bill Read called History of the Eastern Bluebird in the Hamilton Study Area, where he writes that the reason more bluebirds are overwintering now is mainly due to warming winter weather patterns. So maybe it’s not the nest boxes! 🤷‍♀


hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = c("Ruddy Duck", 
                                   "Long-tailed Duck", 
                                   "Greater Scaup", 
                                   "Lesser Scaup", 

hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = c("Common Goldeneye",
                                   "Northern Shoveler",
                                   "Ring-necked Duck",
                                   "Surf Scoter",

I picked a sampling of ducks that show a trend of increasing since about the mid-1990’s. Ian Richards in Curry (2006) believes that these increases are due to warmer winters (with an increase in open water), and, for ducks like the Greater and Lesser Scaup, due to the introduced Zebra Mussel in Lake Ontario, which they feed on.

Some of these increases are absolutely incredible! The Long-tailed Duck went from practically non-existent up to 25,000 in the mid-2000’s!

This is also a good reminder for me that the winter birds I think are “normal” in Hamilton (like Mallards and Long-tailed Ducks) may actually be quite recent phenomena.

Canada Goose

In fact, another bird that is very common now is the Canada Goose, which I learned, as I looked through the data, was not always so common!

hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = "Canada Goose")

Curry (2006) talks about the Canada Goose’s history. The Canada Goose was originally considered a “symbol of wild, untamed Canada” and in the late 1800’s, Canada Geese actually avoided the Hamilton area due to “their haunts [being] invaded by trolley cars, electric lights, telegraph wires and other innovations” (Thomas McIlwraith, 1886). 🚎😄

However, in the 1960’s, people decided to introduce the largest, heaviest sub-species of the Canada Goose into southern Ontario, because it would supposedly make Ontario “richer”. However, with few natural predators, the Giant Canada Goose has now increased in numbers and degrades habitat and competes with other, migratory sub-species.😑

Effects of DDT

Two species I had often heard of having been affected by the pesticide DDT were the Double-crested Cormorant and the Bald Eagle. DDT was first used in 1947 and was finally banned in Canada in 1973. According to Curry (2006), by 1980, Bald Eagles were experiencing complete reproductive failure in southern Ontario (due to the thin eggshells).

So, do the numbers match up with DDT use?

hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = c("Double-crested Cormorant",
                                   "Bald Eagle")) +
  geom_vline(xintercept = 1973, size = 1) +
  geom_text(x = 1980,
            y = 90,
            label = "1973: DDT was \nbanned in Canada")

Cool! The numbers of Double-crested Cormorants and Bald Eagles did increase after DDT was banned in Canada. Yay for fewer dangerous 💀pesticides💀!

West Nile virus

hamilton_cbc %>%
  plot_species(start_year = 1955,
               species_to_plot = c("American Crow",
                                   "Common Raven",
                                   "Blue Jay")) +
  geom_vline(xintercept = 2003, size = 1) +
  geom_text(x = 2010,
            y = 4000,
            label = "2003: Height of \nWest Nile virus")

I decided to plot some corvids to see how their numbers have been doing, especially given that the West Nile virus happened in the early 2000’s.

When I was younger, I remember having thousands of crows in my neighbourhood. Our neighbourhood even paid a guy to come with a trained hawk to scare them away. Nothing got them to leave… And then West Nile happened. For years afterwards, there were no crows, and now there are still only a few. My experience certainly matches with the count numbers.

The Blue Jays were also affected by West Nile, but they seem to have bounced back with no problem (according to the count numbers and my personal experience). They feed at bird feeders though, so that might be helping them.

While Ravens would have also been affected by West Nile, it doesn’t seem to show in the numbers. Perhaps there were too few birds for the virus to have had much of an impact on them. Curry (2006) says that, before the early 1800’s, Ravens were common in the Hamilton area, but retreated north due to deforestation, shooting by farmers, and eating poisoned bait set out for wolves 😠. Their recent increase in numbers maybe shows they are returning to their former area!

Snow Bunting

hamilton_cbc %>%
  plot_species(start_year = 1921,
               species_to_plot = "Snow Bunting")

I personally have not seen a Snow Bunting yet, but I just think their count numbers are so cool! They are an Arctic bird, so what in the world was happening in the Arctic in the 1970’s to cause such huge spikes!? Ahh, such a great mystery!

Also, in the 1800’s, Snow Buntings used to be called Snowflakes and there is this fantastic quote by Thomas McIlwraith in 1886 in Curry (2006), saying, “all our Canadian boys and girls are familiar with the Snowflake, which is frequently the only one they see when out for the first sleigh ride of the season.” 😄

Ruffed Grouse

hamilton_cbc %>%
  plot_species(start_year = 1921, 
               species_to_plot = "Ruffed Grouse")

I plotted the Ruffed Grouse (aka the partridge) since 1921, and it’s clear that this bird has been pretty much gone from the Hamilton area since the late 1980’s. Curry (2006) says the Ruffed Grouse is a bird of mixed forests, and, due to intensive agriculture, woodlot harvesting and urban sprawl, the Hamilton area no longer has the right habitat for the Ruffed Grouse. 😞

Northern Cardinal

hamilton_cbc %>%
  plot_species(start_year = 1921, 
               species_to_plot = "Northern Cardinal")

I also plotted the Northern Cardinal numbers since 1921. Cardinals used to only be in Canada occasionally at Point Pelee (Canada’s most southern point), where the first recorded breeding happened in 1901. According to O’Neill (2006), the Point Pelee locals used to call these unusually-coloured birds “war birds”! 🐦

Now they are quite common in the Hamilton area through the winter, with Curry (2006) giving the reasons of climate warming (causing less snow depth), increasing edge habitats where they like to live (due to deforestation), and more bird-feeders. 🌻🌰🌻

This is another bird I thought had always been common to the Hamilton area!

That is it for now, but in the next blog post, I will be making a ✨Shiny app✨ so that anyone can dig into the data!

And thank you to the Christmas Bird Count! The Christmas Bird Count Data was provided by National Audubon Society and through the generous efforts of Bird Studies Canada and countless volunteers across the western hemisphere.


Curry, Robert. 2006. Birds of Hamilton and Surrounding Areas. Heidy Lawrance Associates. http://hamiltonnature.org/publications/birds-of-hamilton/.

O’Neill, Henrietta. 2006. Birding at Point Pelee : A Birder’s History of One of Canada’s Most Famous Birding Spots. James Lorimer & Company Ltd.