Introduction

Reaching robust conclusions about ecological phenomena typically requires extensive data collection through large-scale study methods, particularly when studying species distribution and its temporal changes (Yoccoz et al. 2001). Appropriate methodologies to monitor species distribution are usually expensive in order to cover an adequate spatiotemporal range (Akçay et al. 2020). However, scientific resources are limited and the phenomena to be studied cannot always be approached at the necessary scale. To address this need, the engagement of the public in scientific research and knowledge generation has evolved into a highly advanced and esteemed methodology, extending globally and being applied across diverse scientific disciplines (Fraisl et al. 2020). The involvement of non-professional individuals proliferates through the development of numerous citizen observation networks, which aim to collect information on a wide spectrum of taxa and natural processes. Nowadays, these citizen science platforms has become increasingly important within the field of conservation science (Tulloch et al. 2013; Sullivan et al. 2014; Fraisl et al. 2022).

The Eurasian Magpie Pica pica (henceforth “Magpie”) is a member of the corvid family and a resident species which is widely distributed throughout Asia, Europe and North Africa with several subspecies and races (Madge et al. 2020). The species is found in different habitats, such as open country, preferably with at least scattered trees, or patches of trees and shrubs. It is common in anthropogenic landscapes such as gardens, parks, or mixed crops (Madge et al. 2020). The Magpie is not globally threatened (Least Concern) and it is widespread and common in much of its range (Birdlife International 2023). In most European countries it has apparently increased over recent decades, most notably spreading into cities from the countryside (Madge et al. 2020).

In Spain, the Iberian Magpie subspecies P. p. melanotos is widely distributed throughout the Iberian Peninsula except for the southwestern sector, which includes the Spanish provinces of Cádiz, Málaga, and Córdoba (Martinez et al. 2003). In a recent update of the Spanish Atlas of breeding species, Magpies seems to have undergone a slight expansion in some specific areas of the south of the peninsula, namely Seville and Cádiz province. However, the Spanish population trend shows a moderate decrease overall (~ 7% decrease) (Molina and Martínez 2022).

Magpies are omnivorous, though primarily carnivorous scavengers. The diet varies depending on the local habitats, although they mostly feed on invertebrates, especially beetles (Coleoptera), small mammals, lizards, frogs, bird eggs, and chicks (Kryštofková et al. 2011; Sánchez-Oliver et al. 2014). Recently, shorebird breeding failures have been reported in the Russian steppes due to the predatory behaviour of Magpies (Kubelka et al. 2019). Due to their predation on eggs and bird chicks, Magpies are considered a harmful bird species by some conservationists and hunters (Birkhead 1991).

In the context of a potential Magpie expansion in the southwest of the Iberian Peninsula with the colonization of new habitats, may have adverse effects on local populations of species that Magpies prey upon. Specifically, we hypothesize that vulnerable bird species, namely the Kentish Plover Charadrius alexandrinus, the Black-winged Stilt Himantopus himantopus, and the Pied Avocet Recurvirostra avosetta, could experience an increase in predation on their eggs and chicks by Magpies (Madden et al. 2015).

Methods

Study area

The province of Cádiz (Spain) (7436 km2) is located on the southern tip of the Iberian Peninsula (Fig. 1). Its climate is typically Mediterranean with Atlantic influences, characterized by mild winters and hot, dry summers and low rainfall. The province of Cádiz holds a great diversity of habitats (mountains, forests, crops, cliffs, marshes, dunes and beaches), making it an area of great environmental value, rich and diverse in species, with a special relevance to ornithological biodiversity (de Juana and Garcia 2015). The area hosts 49 areas within the Natura 2000 Network, among which the 14 Special Protection Areas (SPAs) stand out. In particular, the study area is home to the Bahía de Cádiz Natural Park (located around the cities of Cádiz, San Fernando, Puerto Real, Chiclana de la Frontera and El Puerto de Santa María). This is a protected area of special importance for aquatic birds (waterfowl and waders), having been included since 2002 in the List of the RAMSAR Convention on Wetlands of International Importance (BOE 2002).

Fig. 1
figure 1

Study area analysed in the demographic expansion of the Magpie Pica pica together with the protected natural areas of the Natura 2000 Network and the Special Protection Areas for Birds. Bahía de Cádiz Natural Park, where Magpie pellets were collected is shown in red

Distribution data

Data on Magpie distribution was acquired through the citizen science platform eBird (http://ebird.org/). This platform is among the largest-scale initiatives and has generated data that significantly contributes to scientific advances and various conservation applications (La Sorte et al. 2018; Rosenblatt et al. 2022). eBird collects information about the distribution and abundance of birds, taking advantage of the enormous popularity of bird-watching to create a global network of volunteers who submit bird observations via the Internet to a central data repository (Sullivan et al. 2014). eBird benefits from a robust review process, focused on ensuring correct locations and species identification (Johnston et al. 2021). In recent years, eBird data has been used to assess changes in the distribution of bird species with revealing results such as the expansion or recolonization of sensitive species (Torres-Cristiani et al. 2020) or to monitor the effect of climate change on migratory bird populations (Masto et al. 2022). Furthermore, concerning the inherent citizen participation in urban settings, eBird has demonstrated remarkable effectiveness, particularly in studies linked on bird populations within urban areas (Callaghan et al. 2020; Hernández-Brito et al. 2022).

eBird data 2001–2020 were downloaded on November 07th 2021 for the Magpie within Cádiz province. eBird data are structured as ‘checklists’, where each checklist is a list of bird species recorded during 1 period of bird-watching. Moreover, eBird data offer semi-structured information, which means most eBird checklists have associated metadata describing the effort or observation process. To avoid bias using data from citizen science platforms, we follow the recommendations described in Johnston et al. (2021) and Clark (2017), suggesting: (1) the use of complete checklists (where observers report all the species they detect and identify) and (2) the use of covariates describing variation in effort (effort time or sampled area) and detectability protocol (e.g. observer travelling or stationary) for each checklist. To make comparable protocols, we analysed traveling plus stationary complete checklists with standardized effort by time (hours of bird-watching) (Johnston et al. 2021).

Annual Magpie distribution maps were generated on a 5 × 5 km grid, calculating the relative abundance of birds as average number of normalized Magpies (Magpies/hour) per checklist considered using the geographic information system software ArcGis 10.6.

We used generalised linear models (GLM) fitted with a quasi-binomial family (pertinent for binomial models using proportion data) to assess the population trend of the Magpie (Zuur et al. 2010; Buchan et al. 2021). Since the considerable recent popularity of citizen science platforms, such as eBird, and the increased frequency of checklists contributed by users to the platform, we might consider that a potential positive trend in the Magpie population could indicate heightened effort due to the growing habit of adding checklists to eBird by birders in recent years. To address this potential bias associated with the increase in the number of checklists over time, we used the percentage of the number of lists with the presence of Magpies over the total number of lists uploaded to the platform as a dependent variable, with years as an independent variable applying MASS package (Venables and Ripley 2002).

To analyse the species’ presence in the province of Cádiz for the period preceding the one examined in this study (before the year 2000) and thereby assess whether the demographic increase is due to recolonization or a new expansion of the Magpie, we examined all available data (1960–2000) from another citizen science source, GBIF (Global Biodiversity Information Facility) (GBIF.org 2023).

Diet data

The assessment of the Magpie diet was conducted analysing pellets collected from the primary magpie roost in the province, where approximately 150 individuals congregated nightly in a stand of eucalyptus trees situated within the port facilities of El Puerto de Santa María, one of the principal cities in the Cádiz province, located within Cádiz Bay Natural Park. A plastic sheet (4 × 4 m) was placed below the main place of the roost before sunset, when Magpies arrived at the roost, and collected the following morning after the Magpies had left. To evaluate potential differences between reproductive periods (when eggs and chicks of other species are available) and winter periods, pellets were collected during the winter (January and February 2022) and during the spring (May 2022). Given the difficulty of a correct identification of prey at the species level, class level was considered an appropriate identification level for Magpie prey (Oro et al. 1997).

We conducted an analysis of both occurrence (the percentage of pellets in which at least one remnant of a prey item is present) and dominance (the percentage of a prey item in relation to the total identified prey items). The main dietary differences were assessed using Pearson’s Chi-square statistic. Differences between the prey dominance in relation to the season of the year were analysed using the permutational multivariate analysis of variance, the Permanova test (Anderson 2001).

Results

Geographical expansion

During the 2001–2020 period, we analysed 33,566 checklists. The presence of the Magpie in eBird checklists in the province of Cádiz has grown notably between 2001 and 2020, especially since 2015. The preliminary results addressing potential biases due to the correlation between the total number of checklists uploaded by users to the eBird platform and the percentage of checklists with Magpie presence per year are shown in Figure S1–S3. Although the results of these correlations are similar, the different ‘R-square’ coefficients suggest the appropriate consideration of potential sampling bias.

The number of occupied grid cells started with a maximum of 1 in the first 6 years, reaching more than 40 cells in 2020. Similarly, Magpie abundance rises from an average of 1–2 Magpies per cell in the first years of the study to more than 20 individuals per cells in the northwest of the province by 2020. This population growth and expansion in the north-western sector of the province is clear, while in the south and east only occasional presence is shown (Fig. 2).

Fig. 2
figure 2

Maps of the distribution and abundance of the Eurasian Magpie Pica pica throughout the years 2001–2020 in Cádiz province

Moreover, the percentage of occurrence of the Magpie in eBird checklists has grown remarkably in the last 20 years, from 1.7% presence in 2001 to almost 9% in 2020. These average annual population growth rates (0.21 ± 0.60) show exponential growth (~ Year estimate 0.116; p < 0.001; Deviance explained 52.54%) (Fig. 3, Table S1), which translates into a spatial occupation from 25 km2 in 2001 to almost 1000 km2 in 2020 (Fig. 2).

Fig. 3
figure 3

Eurasian Magpie Pica pica population trend in Cádiz province from 2001–2020. Orange line show model fit estimated throughout GLM (quasi-binomial error distribution, log link function) and grey area show 95% confidence interval

On the other hand, in Fig. S4, we present the species’ presence in the province of Cádiz before the considered study period with data sourced from GBIF. In this figure, we can observe that the species exhibits sporadic presence in the province until the late 1990s.

Diet analysis

Sixty pellets were analysed, 30 during the breeding season and 30 during winter. Two hundred fifty items were detected within the pellets, of which 88 could be identified at the class level. The class Insecta (hereafter, insects) constituted the most abundant category, comprising 53.4% of the identified items, primarily consisting of parts of elytra, tibiae, and heads. This was followed by the class Gastropoda (hereafter, snails) at 23%, primarily composed of remnants of shells. The classes Magnoliopsida, Mammalia, and Reptilia (hereafter referred to as seeds, mammals, and lizards, respectively) accounted for 5% (predominantly seed remains), 5% (primarily dental, humerus, and fur remnants), and 6% (mainly tibia and tarsus) of the identified items, respectively. Finally, the Aves class (hereafter, birds), was only present in 2% of the items identified (X-squared = 104.82, df = 5, pvalue < 0.01; Fig. 4).

Fig. 4
figure 4

Frequency of the different types of prey in the pellets of the Eurasian Magpie Pica pica throughout the summer and winter in the province of Cádiz

Regarding prey dominance, insects and snails are the most abundant groups in Magpie pellets. However, we did not find significant differences between the breeding and wintering season (Permanova, F = 0.7186, p = 0.577) (Fig. 5).

Fig. 5
figure 5

Pellets prey dominance in the diet of the Eurasian Magpie Pica pica during summer and winter in the province of Cádiz. The mean is shown in red

Discussion

Expansion and distribution

Our findings indicate that the range of Magpies is currently undergoing expansion in the southern region of the Iberian Peninsula, with this expansion being particularly pronounced since 2015. Within the province of Cádiz, this increase is clearly more pronounced in the area surrounding the Bay of Cádiz, where the species is present in all the cells surrounding the largest cities. This expansion towards urban areas is a trend that has been repeated throughout Europe, especially since the 1960s and 1970s (Madge et al. 2020). Moreover, this increase in occupied areas in the province of Cádiz seems to be repeated in the rest of the provinces of southern Spain, areas that the species had not colonized in the twentieth century (Molina and Martínez 2022).

Why has the Magpie not expanded in the study area until very recently? In other regions of the southern Iberian Peninsula, where the Magpie is widespread, their distribution and abundance seems to be related to the abundance of the Great Spotted Cuckoo Clamator glandarius, which parasitizes its nests (Soler et al. 2001). The scarce presence of the Great Spotted Cuckoo in the province of Cádiz supports the limited presence of the Magpie in the province to date.

A plausible hypothesis could be related to the change in persecution behaviour that the species has suffered in recent years. Magpie is considered a nest predator of game and non-game birds in Europe, and therefore in rural areas, Magpie control is commonly used as a management tool in small game hunting estates (Díaz-Ruiz et al. 2010). Outside of urban areas, active hunting or persecution occurs, whether legally (e.g. during hunting season) or illegally, while Magpies in urban areas are in close proximity to non-threatening humans more often than they are in rural areas (Jerzak 2001). In fact, in the southwestern regions of Spain where Magpies are not widely distributed, as they are in they in other regions (https://ebird.org/spain/species/eurmag1), they have larger hunting areas as indicated in the most recent regional government hunting management plan (Consejería de Medio Ambiente 2007). However, when we compare these southern regions where Magpies are more abundant, with areas like Cádiz province, we find that the latter areas have a smaller percentage of hunting grounds, approximately 74%. Since the province of Cádiz currently does not exceed 77% hunting grounds in its territory (Junta de Andalucía 2023), this could be a conditioning factor in the distribution of the species, since a decrease in the persecution of the species favours its establishment (Jokimäki et al. 2017). This behaviour of tolerance towards urban areas while fleeing from the disturbances typical of rural areas is more frequent in birds larger than passerines (Samia et al. 2015). Experiencing this lack of persecution by humans, the Magpie has found in urban areas new favourable niches for its reproduction and feeding (Jokimäki et al. 2017; Šálek et al. 2020).

In light of the current situation, initially, we had suggested that the Magpie’s expansion in the study area might be more indicative of a recolonization movement than an expansion. However, the lack of comprehensive data spanning the entire period during which hunting activities occurred in the area prevents us from definitively resolving this uncertainty. In addition, upon cross-referencing information from other citizen science databases such as GBIF (GBIF.org 2023) covering the period from the 1960s to just before our study (2000), the species’ presence appears to be sporadic over these 40 years. Consequently, we dismiss the recolonization theory and are inclined to consider this as a demographic expansion within the species distribution in the study area. This expansion of Magpies in the region could potentially originate from the population of the species in nearby Doñana National Park, where species persecution and hunting are prohibited, and the species is the most abundant compared to its surrounding areas (Molina and Martínez 2022).

Diet composition

Magpies predate on chicks and eggs of waterfowl and are sometimes one of their main predators (Bravo et al. 2020; Holopainen et al. 2020). Given the current demographic expansion of the Magpie around the Bay of Cádiz, an internationally important wetland for shorebirds, we hypothesized a negative effect on some species of birds of Magpie predation. In particular, we expected predation on eggs or chicks of sensitive breeding shorebirds species in the area such as the Kentish Plover Charadrius alexandrinus, the Black-winged Stilt Himantopus himantopus and the Pied Avocet Recurvirostra avosetta, on which predation has been previously documented in areas where Magpies are abundant (Rocha et al. 2016; Kubelka et al. 2019). However, after analysing the pellets during breeding and wintering season, we found no traces of these bird species and only traces of some passerines, but in very low quantities only in summer, which could suggest some predation of the nests of birds (Tatner 1983). The presence of mammal remains is observed exclusively during the winter season. While we did not find a clear explanation, it might be because insects, their primary food source, are less available during this time, leading them to search for alternative food (Tatner 1983). Indeed, the diet of the Magpie in the study area is based mainly on insects, snails and seeds (> 86%), as documented in other urban areas of the Iberian Peninsula (Díaz-Ruiz et al. 2015). Nonetheless, since the Magpies can prey on bird eggs and this would not leave remains in the pellets, we cannot completely rule out some level of pressure on the regional avifauna. Therefore, these results must be approached with caution, as other traces of soft tissue or organ remains from other animals could go undetected without more sophisticated molecular analyses.

On other hand, and contrary to our expectation, Magpie pellets did not contain anthropogenic food, which would be expected after a colonization of the urban environment. This suggests that the benefits that a urban area offers the Magpies may be more related to the availability of suitable habitats for reproduction, such as type of tree, tree height, coverage of green areas and reduced human disturbance, all factors necessary for the species to thrive (Kryštofková et al. 2011; Jokimäki et al. 2017).

Conclusion

Our research spanning two decades from 2001 to 2020 in southwestern Spain has revealed a significant demographic expansion of Magpies, mainly associated with urban areas. Its presence increased notably, with a 40-fold expansion of its distribution area, indicating an exponential growth pattern. The population growth and demographic expansion of this species do not seem to have a detrimental impact on other local bird species, as evidenced by the pellet analysis from the primary roost area in the province. The Magpies’ main dietary components primarily comprise insects and snails, with bird predation accounting for a minor proportion. Population increase is apparently favoured by less persecution in urban areas and suitable nesting conditions. This study highlights the importance of monitoring the long-term impacts of Magpie demographic expansion on the local ecosystem. Furthermore, our study demonstrates how the use of data from citizen science projects, such as the eBird platform, is undeniably valuable for obtaining good and reliable data in research projects, as demonstrated by this demographic expansion of a species into urban habitats, providing tools essential for possible spatial planning.