New Package In Development: Snakes

tl:dr snakes is a package containing data on individual snake species, from the World Health Organization Snake Database. You can get an early version from “devtools::install_github(”callumgwtaylor/snakes“)”

Recently for an assignment for my masters I was looking at the global burden of snakebite. Keen to get some pretty diagrams in to distract the reviewers from my terrible writing, I went online to find a resource we could analyse in R. This had worked well enough for previous essays, especially with the existence of The Humanitarian Data Exchange, plus a mini package I’d written for my own purposes to import their data easily.

However after a brief search, the only online resource I could see was the WHO Snake and Antivenoms Database. Most organisations are keen to get you to have a delve into what they have, recently I’ve used data from The Global Terrorism Database and the International Disasters Database. Both required a bit of registration but ultimately sent you a csv download.

The WHO Database however, looked like this: And once you selected a snake, you got this:

Now, I really like this set up, there’s a clear layout of information for each snake on their individual page. You get a map and an image, and most importantly, which antivenoms exist. However, if you want to make comparisons between lots of snakes, that becomes a bit more difficult. If you want to explore which snakes don’t have antivenoms, or the global distibution of antivenom producers, or anything else then there’s no straightforward way to do so without a lot of loading individual pages to take information down.

At this point, I realised that me working out how to extract any info would definitely allow me to procrastinate beyond the essay deadline, so I gave up. But I did want to learn how to do some basic scraping if I bumped into a similar issue in the future. Using this article on rvest, plus this talk on purrr and rvest, I’ve downloaded the data for each species of medically important snakes from the WHO database.

Now if you load the snakes package from github you can save yourself the hassle of what I did:

snake_species <- snakes::snake_species_data

snake_species_data will give you:

This is the first version of the package containing what I’ve put together today. I hope to update it with some more useful geographical information. The database does have individual country pages, so a data_frame including snakes in each country is the next target.

Lastly, this is clearly not my data and I make no claims of ownership whatsover. The WHO are the copyright holders for any data, and whilst I think this package comes under acceptable use for research, please let me know if you’re someone from the WHO who disagrees.

Actually lastly, this data is extracted from the WHO database, but I am not making any claims about their accuracy, so this information should not be used to make any clinical decision on use of antivenom, or any similar decisions