Sunday, 1 August 2021

A small man on Mannetjiesberg

 

I never thought I would ever climb a mountain covered in snow in the middle of winter wearing just a t-shirt. My backpack was stuffed full of winter weather clothes, but we never needed any of them. Some time ago Charlie had mentioned that he would like to climb Mannetjiesberg, the highest peak in the Kammanassie mountains. Anja suggested to him that perhaps he would like to do that for his birthday, as in the age of COVID birthday parties are a little bit hard to organize. Charlie was delighted by the idea and so we started to lay out plans.

 


The Kammanassie mountains fall under the jurisdiction of CapeNature. I obtained the permits from the local office in Uniondale in exchange for the promise of bird list contributions. One also must traverse private property owned by the Woudberg family to access the reserve. So, we decided to book their guest house at the bottom of the mountain. Currently this is managed by Estelle Gilles: landsrivierselfcatering@gmail.com.

 

Mannetjiesberg stands at just shy of 2000 meters at 1995 meters above sea level. Previously Anja and I had climbed the mountain hiking all the way from the guest cottage. However, neither of us are as fit as we used to be and with Elena 10 and Charlie turning 8 on the day of the climb, it made sense to drive as high as possible up the mountain.

 

Mannetjiesberg

On Saturday morning, after warming ourselves by the fire in the guest cottage, we packed the Land Cruiser and started the trek up the mountains. We parked the vehicle on the side of the road at one of the few places where the four by four track allows vehicles to pass. The vegetation was quite a bit thicker than on our previous ascents as it has been several years since there has been a fire. Large stands of bearded protea cackled with Cape Sugarbirds. Orange-breasted Sunbirds flitted around us beeping and tweeting wondering what these strange beings were trespassing on their territory. We decided to navigate the first ascents over a rocky scree slope despite the fact the boulders might be loose. This was a wonderful playground for the children who scampered way ahead of mommy and daddy. By the time we reached them at the top of the scree slope, they had built a Little Rock jumper snowman. Or should I say snow bird. After more biscuits and snacks, we had to make for the Ridge.

 



Drifts of snow were becoming more common. By this time, we had stripped of all our outer layers of clothes down to our T shirts. It was strange to be walking through snow in T shirts, but the shade of the South slope protected icy patches from the melting sun - the temperatures were easily in the mid 20s due to a Berg wind blowing in hot air from the north. As we ascended we had to navigate some of the rocks covered in treacherous black ice. Moving through the snowdrifts was tricky especially for Charlie and Elena, who had only welly boots which would frequently fill with ice and snow. Eventually we crossed the Ridge to the northern slope which was free of ice and made the last assault on the summit . The children were delighted to finally spot the distinctive mirror covered beacon that marks the top of Mannetjiesberg. It had taken us 3 hours from the vehicle to reach the summit, where we spent half an hour having a picnic while soaking in the views and drying out socks. To the South, the Tsitsikamma and Outeniqua mountains, to the north the Swartberg and to the east we could make out our very own Blue Hill.

 


 

 


For the descent we decided to stick to the northern slope to avoid the snow. However, this would take us into uncharted terrain and would be quite a bit longer than our summit route. The going was easy over tussocky restios and Watsonias. I would scout ahead to ensure that our route was not leading us to any precipices or cliffs. Eventually we had to switch onto a South facing slope but by this time we were low enough that the snow was no longer a challenge and provided relief to those who had spiked their hands on thorny bushes during the inevitable tumbles, the product of weary legs, too much speed, and steep and uneven ground. By this time, we'd been out for over 5 hours, and everyone was very tired. We chose a well vegetated steep ridge-line for our final descent to the mountain track, allowing us to slide down the vegetation wherever possible: but this did mean that most of us had shredded trousers by the time we were on the track. Once we were all in the vehicle and ready to head back down to Uniondale we'd been out for six hours.

 

Again, it was surprising that for the middle of winter we had been able to fulfill Charlie's wish, the angels must surely have been smiling. While an Internet search does not reveal any other summits of Mannetjiesberg by children this young of course digital records do not go back far enough for us to guarantee that he was the first boy of his age on the mountain. However, I am very sure that he is the first boy of his age to summit the peak in the middle of winter.

Which peak next? Peak Fomosa apparently…. As I write my leg muscles send painful reminders they are not what they used to be and I’d better do some training to be able to keep up with this young and avid mountain climber. 

 

 

Tuesday, 11 May 2021

Name change of The Auk: how it looks to the rest of us in Ornithology

 


 

The journal formally known as ‘The Auk’ is one of ornithology’s oldest journals, established in 1884. It is one of two journals of the Ornithological Society of North America. As of the last several decades it has been consistently one of the world’s top ranked ornithological journals. This year, 2021, it was rebranded simply as ‘Ornithology’. The reason given:

“The new title is part of a long-term effort to increase the quality and international stature of the American Ornithological Society’s publications.”

But it was already one of the best! Also, how does a name change increase the quality? That is a matter of editorial process or even supporting the ornithological method that is published in the journal. In terms of international stature, how is removing a name used for over one hundred years and replacing it with a generic term going to help? The journal identity is completely lost by doing so: a move to be considered by a journal wishing to reinvent itself and shed itself of unwanted baggage. At worst its an offence to those that have manned the journal for over a hundred years! Its also damaging in that decades of Brand Identity have been flushed away.

Critically for those wishing to improve bibliometric quality, research shows the opposite effect when names change because of errors assigning the correct journal name to the appropriate journal: confusion reigns!  

I’ve pointed out how the use of bird names for journal names is an unusual quirk of ornithological journals: but it helps paint their identity. The Auk has a history of publishing North American ornithology. What does the name change say about that? That there isn’t growth potential anymore in this market and that instead they want all the world’s ornithology (or specifically are they eyeing the stratospheric growth of the Asian market)? But at the same stroke, the editorial announcing the name change requests articles fitting very specific dimensions: papers that use birds to test … hypotheses; innovative phylogenetic and taxonomic studies; and integrative reviews …. In other words, there are multiple dimensions of ornithology that would be less welcome. This suggests Ornithology is a totally inappropriate name for this journal. “Select Ornithology” might be better.

Of course, I have not been privy to the reports and recommendations leading to this decision. I suspect that the steering committee was becoming anxious about a lack of change in the impact factor, or prestige scores. I would argue that has nothing to do with the journal, but sadly, simply the place of ornithology in the world of science. Or did the committees look at the world of Twitter and simply decide to hijack the hashtag for almost all ornithology publications? An imperialistic move perhaps?

It could be argued that any journal name is meaningless: in our digital era where everything is numerically ranked, it is may well be that H factor and Impact Factor are everything, while the name is but a means to an end. If so, sad world, and I’ll maintain the identity associated with Ostrich for as long as possible, and encourage that future editors do so too. At least I know what Ostrich stands for beyond bibliometric rankings.

 

Tempest, D. (2005) “The effect of journal title changes on impact factors”, Learned Publishing, Vol 18, issue 1, pp. 57–62.

Friday, 16 April 2021

The problem with Purrr (for Biologists)

 

So, it took me forever to complete the DataCamp course on Functional Programming with Purrr.

https://learn.datacamp.com/courses/foundations-of-functional-programming-with-purrr

With a bit of programming background, I’m a fan of functional programming, the aim of which is to avoid copy pasting errors and allows execution of functions on various subsets of data.

I started this course ages ago, and gave up repeatedly, electing to do other courses instead (with easy, standard R code). It should have been an ideal course for me, with famous ornithologist Auriel Fournier and some bird data.

Doing this course made me realise this version of reality:

Venn diagrams of the intersection between programmers and biologists.

In essence, all top blog posts on purrr are praiseworthy (this is a product of R code developer Messiah Hadley Wickham). The package implements ‘better’ versions of the ‘apply’ set of base R functions, which are ‘higher order’ functions, that really are useful (if you can put into the time to master them, since it requires multilevel thinking).

What is ‘better’? Well, I think there may well be two definitions, depending on where you sit on the coder-biologist spectrum. Better for a programmer is a ‘readability’ and ‘succinctness’. Better for biologists is also readability, but with the trust in the final answer a lot more important. I.e. things break down at the ‘succinctness’ level: because in a line of piped code, a biologist is wanting to know what happens at each level. A line of piped biologist code will have been built step by step to ensure that each line is doing what it should do. A programmer will weave these all together to achieve succinctness, while it may well make a lot more sense for a biologist to have ‘expanded’ code.

‘BOO!” say the programmers.

I say: “That is alright”.

The truth is, for ‘normal’ biologists, it will probably take less time to filter your data in an Excel spreadsheet and apply multiple functions across columns to get what you want compared to debugging your first attempts to code a line using apply().

What are my issues with purrr? Well, I hardly ever use lists, and the double bracket notation is just intimidating. A lack of familiarity with this data form doesn’t help, although it is seen everywhere in R output (take those GLMs output for example).  Actually, a simple form of purrr uses the map set of functions (which can return data as logical or vector or dataframe) and can be used on dataframes, pretty much like apply(), except you get ‘standardized’ output, which is apparently why it is cool with those that code on a daily basis rather than trudge around swamps (or deserts) with binoculars (i.e. ornithologists).  

Using purrr will require learning yet another packaging coding style. For instance ~.x is used …. To get stuff? Well, I wish I could give you an honest simple explanation, but I can’t. Here is an example from the course:

map_chr(sw_films, ~.x[["episode_id"]]) # readable? Not a chance.

map_chr(your_data, ~x[["column_name"]]) #sort of this, then return the data as a character vector.

Okay, I’m loosing you, so lets take a hectic example from the course.

This is the problem question :

What is the distribution of heights of characters in each of the Star Wars films?

That is simple right? Just make a histogram on a vector (or column with numeric data from a data frame).

Using the sw_films data from the ‘repurrrsive’ package:

library(repurrrsive); library(tidyverse)

data(sw_films)

This is the ‘clue’ code provided. WTF!? Hectic tidyverse vocabulary required. But okay: we just need to fill in the blanks so how hard can it be?

# Turn data into correct dataframe format

film_by_character <- tibble(filmtitle = map____(___, ___)) %>%

    mutate(filmtitle, characters = map(___, ___)) %>%

    unnest()

 

Damn hard. Line 1: When do you use ~.x; should you use [[]] or just “variable_name”, not to mention I initially thought map_df was the appropriate map function here.

Then line 2 – I just piped some data, so that should be available right? So should that be . or .x? Neither… need the data assignment spelled out.  And I presume I’ll use the ~.x [[]] again… nope, just “variable_name” this time.

So this is the solution (well, code that doesn’t return a fatal error, we’ll ignore the new warning from unnest for now. Screw you, code evolution):

film_by_character <- tibble(filmtitle = map_chr(sw_films, ~.x[["title"]])) %>%

  mutate(filmtitle, characters = map(sw_films, "characters")) %>%

  unnest()

 

Geez. That was step 1. We still need to solve this:

# Pull out elements from sw_people. Create a dataframe with the "height", "mass", "name", and "url" elements from sw_people.

sw_characters <- map____(___, `[`, c(___, ___, ___, ___))

 


Thank heavens the ‘[‘ is in there, because you’d have never solved that by yourself. This the solution.

sw_characters <- map_df(sw_people, `[`, c("height", "mass", "name", "url"))

 

 

Step 3: join the data frames. This should be a breeze! I mean, I use the join functions all the time.

But wait, what the hell is this c(“___”) thing? Surely, we could just do a rename on the fly? This screwed me…. I couldn’t do the join. At this stage, was it the join code that was the problem or the initial tibble creation?

# Join the two new objects

character_data <- inner_join(___, ___, by = c("___" = ___)) %>%

   # Make sure the columns are numbers

    mutate(height = as.numeric(height), mass = as.numeric(mass))

 

# My incorrect solution

character_data <- inner_join(sw_characters, film_by_character, by = c("characters" = url)) %>%

    mutate(height = as.numeric(height), mass = as.numeric(mass))

 

# My cheat code to get what they wanted:
character_data <- inner_join(film_by_character, rename(sw_characters, characters=url)) %>%

  mutate(height = as.numeric(height), mass = as.numeric(mass))

 

Thank G. Last step was make a facet ggplot chart, actually easy.

My horror: that was the foundational course, so I nearly died when on completing it that I was then recommended to do intermediate functional programming with purrr. Oh … my …. G...

I guess I just don't have a purrrsonality that purrrs. Miaow.

 

Related Posts Plugin for WordPress, Blogger...