Introduction
New Zealand boasts an amazing array of avians, be it the Kiwi as it’s national icon, the beautiful songbird that is the Tui, or the cheeky parrot the Kea. That is why it is of great concern that approximately 74% of the 168 extant species are threatened or endangered. A significant contributing factor to this is habitat change due to the ongoing effects of climate change, including the degradation of food sources. As with anything in nature nothing exists in a vacuum, and this report seeks to examine how different species are connected by the food they eat, and perhaps contribute to the effort to save the birds. [1][2][3]
Data
The data was sourced from data.govt.nz, created by Wood et al. to study the relationship between birds (including several extinct species) and the plants they consume. The dataset contains a list of 34 bird species (and family) found in New Zealand’s South Island, along with each plant species (and family) they consume. This data was imported into Excel and three subsets were created (1) listed plants by species (2) listed plants by family and (3) listed plants by family with duplicate plant/bird pairs removed.
Each was then transformed using a custom python script to transform the data from “bird-plant” to “bird-plant-bird”, and then count each distinct bird pairing. The script exported two CSV files, one containing each unique bird to serve as the vertices, the other containing weighted bird pairs to serve as our edges, both with header rows that could be recognised by Gephi. Lastly, common names were added to the list of vertices for ease of labelling.
Creating the Network
Once each of the three subsets of the data had been transformed, they were then imported into Gephi to transformed into network diagrams. Several statistics were also generated for each graph, including degree, density, and modularity (seen above as a colour facet), and each graph was set to a Fruchterman Reingold layout for comparison. Given all of the above, it was decided that the plant species subset would be the sole focus of future efforts as it created the richest data and network.
Other experimentation was done in Gephi. This included alternate layouts (see below), different resolution for the modularity, and colouring different aspects. Ultimately, however, the initial build seemed to offer the best insight into the network.
Lastly was the process of building the network out into something exportable. Following the example of several peers, a dark background was chosen to allow the colours of the edges to be more readily apparent. A white text with black border was chosen for readability, and vertices were given a black border to help them stand out from the edges. The final image was then exported.
Results
Poor Blue Duck is out on their lonesome as they consume only a single food source and it’s unique to them. This could likely be explained by incomplete data, and an educated guess would put them in the Blue modularity class, which also contains the Black Duck and Black Swan. Although that same class also contains the Brown Kiwi and two species of now extinct Moa so the exact definition is uncertain. Our other four classes are comprised of smaller birds such as Robins and Pippits (Yellow) that prey mostly on berries, omnivorous small birds such as the Fantail (Green), Medium sized birds such as the Kereru and Kokako (Red), and two parrots and a swamp hen which seem to eat pretty much anything (Pink).
A key limitation of the data is that it is limited only to plant based food sources. Many birds within New Zealand consume bugs, and some (such as the falcon) consume other birds or fish. This additional information would likely delineate the Blue group. It would also be worth exploring the effect range and population has on the weighting of the nodes, as birds such as Tui or Kereru are significantly more populous than the Kiwi. One final factor might be due to the size of the country as a whole, allowing for much more homogeneity amongst the bird population.
Discussion
Let’s first turn our attention to the Moa in the room: the connectedness of this graph. The graph has a density of 55% which is decidedly high. It also had a diameter of 3 and average degree of 18.2, meaning that it wasn’t only a few central vertices pulling them together. Even when trying other layouts the problem would shift rather than be solved. For instance a Force Atlas layout better spacing of the vertices, but lowered visual acuity of the edges (and also required significantly more user input to achieve something legible). Additional research, and possibly additional data, may be required.
Some time was spent outside of Gephi attempting to format the diagram and provide additional context, but in the end it didn’t seem to add anything of value. If this lab were to be started again from scratch, a different, less connected dataset would be chosen. Perhaps instead a family tree. However, I’m still satisfied with the overall methodology.
Update: Post class discussion, the following insights have been made: Force Atlas is perhaps a better view for this particular network, and part of the difficulty in rendering it previously was due to the unconnected vertex being flung far from the main network. Due to the relative density of the network, opting instead for an interactive approach may be preferable, allowing users to explore the data and highlight specific nodes and edges for easier viewing.