I got an e-mail from the Enthought people informing me that there is a Python plug-in to make functions in Excel, called PyXLL. Cool, and free for non-commercial uses. So far I only managed to make the example function work by saying “Hello, me”. Sure it will be handy for somethin’ later, once I learn how to do more stuff with it.
Programming
It’s e-MER-ging…MERS-CoV Spread Map
Another thing I’ve been doing while unemployed is trying to learn some new com-pewter skills. I have been trying out some things in R, Python, etc., but because I didn’t really try programming before, I didn’t even understand the concept of how to write loops (it is still questionable whether I really get it yet, but it’s coming along).
I decided it would be interesting to see where the Middle East Respiratory Syndrome Coronavirus (MERS-CoV) has spread geographically so far (at least up until a few days ago) and show these data relative to the number of infections and number of deaths.
I tried Quantum GIS, which is nice to use, but I wasn’t sure if I could get transparency options for the pie charts. I found out that R would probably work.
It took me an inordinate amount of time to produce this map, since I am so new to programming and R in general. I needed to peruse blogs such as the Molecular Ecologist to help me out (Kim Gilbert did a nice post about mapping in R). I also looked at the WHO Global Alert and Response reports to try to figure out what the number of deaths and infections were and from which countries these numbers were reported.
Below is the map showing pie charts. The slices represent the number of infections (yellow) relative to the number of deaths (red). The size of the circles (by radius) indicates the relative number of infections between countries. I know that my Saudi pie chart looks gargantuan compared to the other little tiny ones (e.g. German one) but it shows that most infections are happening in Saudi Arabia. I know pie charts are typically frowned upon by statisticians for a bunch of reasons, but it depends. I should really do something like this using bar graphs and I know I need to make some adjustments to the layout of text in the figure, but the point was for me to practice R.
