Message Boards Message Boards

Find your Species Name on Darwin's Birthday!

[UPDATE] New Darwin's Day App for 2019 --> https://wolfr.am/BkFupgWe


Note: In this post I will show how to create THIS APP

enter image description here

Here what happens when you type a name:

enter image description here

Even Mathematica has its own spiecies! In this case Storena Mathematica is a spider:

enter image description here

Today is the Darwin Day! So, let's celebrate the Origin of the Species by creating a nice application. Do you know if there is any Species with your name? Let's find it out!

First, we need the list of Species with their Scientific Names. Luckily, the Wolfram Language has already built-in this information:

listofEntities = EntityList[EntityClass["Species", "Species"]]
species = Table[StringReplace[listofEntities[[i]][[2]], "Species:" -> ""], {i, Length[listofEntities]}]

enter image description here

Now, we want to split each scientific name in two words. Following the binomial nomenclature the second part identifies the species within the genus and it is the part we are interested in. Before splitting them we will use StringInsert to put a blank between the two parts.

listofSNames = Table[StringInsert[species[[i]], " ", StringPosition[species[[i]], _?UpperCaseQ][[2, 1]]], {i, Length[species]}];

There are couple of Species with a strange format but we will ignore them here and we use the StringSplit function:

listof2ndParts = StringSplit[list = Select[listofSNames, StringQ[#] &]][[All,2]];

So far, so good. Now, we can already apply our key function: Nearest which will find the closest Species Name to our given name:

Nearest[listof2ndParts, "Jofre", 1] 

We can create a specific function for it, let's call it nameToSpecie:

nameToSpecie[name_] := Nearest[listof2ndParts, name, 1]

Finally, we can easily create a FormFunction and Deploy it to the Wolfram Cloud:

CloudDeploy[FormFunction[{"name" -> <|"Interpreter" -> "String", "Input" -> "Darwin"|>}, nameToSpecie[#name] &], "Permissions" ->"Public"]

Happy Darwin Day!

Have fun discovering new Species and let me know what Species do you get.

I got this spider called Cyclosa Jose:

enter image description here

3 Replies

Cool! Thanks! The App went viral over the weekend, especially on Tumblr. So, I thought it will be interesting to share some results. I created a Databin in order to store all the entries of the App and track its usage easily. During the last 3 days the App gathered more than 53000 names. In the list there are many "Darwin" entries because it is the default input of the App. We can get rid of them using DeleteCases:

bin = Databin["binID"];
names = DeleteCases[Flatten[TextWords[ToLowerCase[Values[bin]]]], "darwin"];

Now we can visualize the most popular names with the WordCloud function:

WordCloud[names]

enter image description here

It is easy to guess that the female names are more abundant. And we can check this in a quantitative way using Classify with the "NameGender" built-in classifier:

WordCloud[names, ColorFunction -> (If[Classify["NameGender", #2] === "Female", Orange,Purple] &)]

enter image description here

We can also visualize the percentages with a PieChart:

genderProb = Classify["NameGender", names, "TopProbabilities"];

PieChart[100 N[Values[genderCounts]/Total[Values[genderCounts]]], 
     ChartLabels -> {Style["Female names", Bold, FontSize -> 20], 
       Style["Male names", Bold, FontSize -> 20]}]

enter image description here

From the Databin we can also get the "TimeStamps" and easily visualize the usage over time in Entries/Minute units with DateHistogram:

t = Databin["binID"]["Timestamps"];

DateHistogram[t, "Minute", PlotTheme -> "Detailed", TimeZone -> -5,
             PlotRange -> {{{2016, 2, 12}, {2016, 2, 15}}, Automatic}, 
             PlotLabel -> Style["Darwin App Usage (Entries/Minute)", Bold, FontSize -> 26]]

enter image description here

In the near future I will try to analyze the the Species associated with theses person names. In fact, many people were surprised to get mostly insects and spiders. But as a remark, note that mammals only account for 5,416 species out of more than 1 Million.

enter image description here - you earned "Featured Contributor" badge, congratulations !

Dear @Jofre Espigule, this is a great post and it has been selected for the curated Staff Picks group. Your profile is now distinguished by a "Featured Contributor" badge and displayed on the "Featured Contributor" board.

POSTED BY: Moderation Team
Posted 4 months ago

Enjoyed finding this, but a couple of minor points. Being an ichthyologist, I chose fishes.

1) Scientific names always have the genus group name capitalized and the species group name not capitalized.

2) Because zoological names are regarded as Latinized, the names should be written in an italic font.

3) I entered my own name, but was a wee bit disappointed to only see one of the three patronyms named for me listed. The program should be able to report more than one species name in some cases. Among fishes, names like cuvieri, bleekeri, guentheri, steindachneri, jordani, whitleyi, smithi, and randalli* are exceptional in this regard for very good reason.

4) adding an image of the species would be nice to add to the celbration.

Once while at the British Museum of Natural History I had the good fortune to examine the type specimen of the scorpionfish, Scorpaena histrio (Jenyns, 1840) collected by Charles Darwin himself. For me, this was a very special occasion indeed. A feeling of "connectedness came over me that made me fell a tiny bit more important than I actually am, for a brief moment anyway.

That said, I enjoyed this very much. Thank you for the submission.

POSTED BY: Stuart Poss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract