Mcstrother's Blog

Just another WordPress.com weblog

  • About

Artery Project 1: Scraping Wikipedia

Posted by mcstrother on February 22, 2011
Posted in: Uncategorized. 2 comments

Updated after thinking twice about 2am attempts at creative writing…

Arteries have a nice structure. Each artery branches successively into smaller arteries. I’ve been thinking for a while that it would be cool to have that structure in a computer in a format that allows us to analyze it and visualize it easily.

Wikipedia’s infoboxes are probably a good starting point. They provide the data I’m looking for in a pretty standard format that might make it easy to extract.

Wikipedia also has some really nice API’s that allows people to operate bots that view and edit the content automatically. Something like this url will spit out page content in a way that is easy to read into a programming language like python. For really intense users, there’s a whole library out there to provide a nice interface for doing these things, but it looked tough enough to learn that I decided to stick with pythons built-in urllib2. I hadn’t worked with it before, but like everything in Python, it’s beautifully simple.

The final process basically involved getting a list of article titles from the “arterial tree” article with one script, using more of wikipedia’s API’s to clean and normalize the titles, and spending 5-6 hours writing a big script that uses regular expressions to scrape the “Source” from each artery article and save it as a file that can be easily read by python. I had to manually clean some of it up (~20 items), since that big script didn’t work perfectly on some exceptional cases, but I ended up managing to use google’s visualization playground to come up with a final visualization that I think looks pretty good.

Diagrams of the thigh

Posted by mcstrother on December 31, 2010
Posted in: Uncategorized. Leave a Comment

My two latest attempts at anatomical/scientific illustration from winter break. You can find these and the rest of my similar attempts at my wikipedia user page. As usual, all images are free to adapt or use for any purpose under the creative commons attribution license.

Schema of arteries of the thigh. I just added the arteries. The bone structure was taken from a public domain image on the wikimedia commons

 

A cross section of the thigh, traced and colored from a (slightly modified) image from a public domain copy of Gray's anatomy.

Black Background When Copying PNG Images From Wikipedia – Windows 7

Posted by mcstrother on December 15, 2010
Posted in: Uncategorized. Leave a Comment

If you get a black background when trying to copy-paste images from wikipedia (this happens to me when I try to paste directly to MS paint or Anki) try pasting the image into word first and then copying it again from there.  It’s a simple fix, but it took me a few annoying minutes of searching and experimenting to figure out.

Google Reader and Copyright Infringement

Posted by mcstrother on December 8, 2010
Posted in: Uncategorized. Leave a Comment

Earlier today I shared an article from cnn.com using the google reader bookmarklet (see the 1 minute intro video to the bookmarklet if you’re unfamiliar).  It’s a nice feature of reader, which is a web service that I generally love.*

But after reading about the recent Canadian libel case on Reader–and in light of the Righthaven lawsuits–I had the thought: how could what I did with the reader bookmarklet not be copyright infringement?  Unlike the video, I didn’t just take the opening paragraph, I took the whole article.  I almost certainly wouldn’t be allowed to copy-paste the entire article into this blog, even if I did include a link to the original article (as my “shared item” in google reader does).  The same “shared item” is even pushed out to my public Google Buzz stream, which is very much like a blog.

Given Google’s history of similar legal issues with YouTube and its recent efforts to “streamline its approach to digital copyright”, I wouldn’t be surprised if we see this feature of reader go away in the near future.

* This could be a post in and of itself, but reader basically replaces facebook for me as a way to keep in touch with friends.  Which leads me to ask the question: Am I really interested in my friends themselves?  Or am I more interested in the things that my friends are interested in?

Categorizing Medical Specialties

Posted by mcstrother on December 2, 2010
Posted in: medicine, Uncategorized. Leave a Comment

It’s interesting to me how medical specialties are divided along different lines. Here’s my attempt to break down the specialties listed here  . Mix and match from different categories for sub-specialties!

*edit 2/27/2012* – broke some of the “system” specialties into “etiology of diease”

By technique:
Anesthesiology (sort of)
Plastic surgery
Radiology (diagnostic, interventional)
Surgery
Nuclear medicine
pathology
transplant

By setting:
critical care
emergency medicine
family medicine
hospitalist
occupational/environmental
sports medicine
urgent care

By system:
cardiothoracic (surgery)
cardiology
colorectal (surgery)
dermatology
endocrinology
gastroenterology
general (surgery)
gynecology
ob/gyn
otolaryngology
nephrology
neuro (surgery)
neurology
ophthamology
orthopedics
psychiatry
reproductive endocrinology
urology
vascular (surgery)

by etiology of disease:
allergy and immunology
infectious disease
oncology

by age:
geriatrics
peds
neonatology

mixtures of above:
gynecological oncology
radiation oncology

Would you like an SVG of a Stuffed Elephant?

Posted by mcstrother on October 16, 2010
Posted in: Uncategorized. 2 comments

Bam. WordPress won’t let me embed the SVG, so the link is below. I’m just proud of myself for drawing something that doesn’t look like a 10-year-old did it, thanks to inkscape and the wonderful tutorials done by heathenx and to a lesser extent drawspace.com. Both images licensed under CC-BY.

SVG Stuffed Elephant

Volume of Information in Medical School

Posted by mcstrother on September 15, 2010
Posted in: Uncategorized. Leave a Comment

My anki (http://ichi2.net/anki/) flashcard deck has just broken the 500 mark, and it’s still missing a ton of information. People keep saying that students learn 10,000 new terms in med school. At 125 facts a week, 2,250 a semester, I’m shocked to say that probably isn’t too bad of an estimate–at least for the first two years.

Office Professional 2010 Physical Backup Disk

Posted by mcstrother on August 14, 2010
Posted in: Uncategorized. 17 comments

This is a purely informational post for those searching for info–i.e. don’t read if you’re one of my regular readers.

I recently purchased Microsoft Office Professional Academic. As I was checking out, I was presented with the (opt-out) option of purchasing “Office Professional 2010 Physical Backup Disk” for an additional $13.95 with the explanation that the disk is “Suggested if you do not have a good broadband connection or would like to have the software available for future installation.” I couldn’t find any further explanation anywhere, so I contacted customer service. The summary, in the words of the customer service rep, is “As long as you have the product key and your computer breaks down, you can still download the software from the website,” regardless of whether you buy the cd.

Seeing as that’s the case, I can think of very few circumstances when anyone would ever want to purchase this cd. I’m also perfectly capable of burning the “Office 2010 Install.exe” file that came with the original download onto a cd or copying it onto an external hard drive myself, but it sounds like even that may be unnecessary.

There are a lot of really badly designed trash cans

Posted by mcstrother on July 9, 2010
Posted in: Uncategorized. Leave a Comment

Badly Designed Trash Cans

The second one is particularly egregious.  I assume that flap is there to prevent flies from getting in and odor from getting out, but it has got to be the most disgusting thing I am ever, in my daily life, expected to touch without gloves.  And make no mistake about it: I am expected to touch it.  If you have found a way to get trash past the flap, tray or no, without even leaving half a crumpled cup sticking out at the end, please please please tell me your secret.

The Solution

Or even better…

Seriously, I don’t think I should need to run around doing bacterial cultures to convince people that this is a worthy public health measure.  Especially in a world where we filled schools to the brim with hand sanitizer to fight an almost entirely airborne illness.

For some reason, I found it impossible to find images for this post.  For that reason, and for the sake of proper attribution, I’m positing links to the sources for my images below.  If you own the rights to these images and would like them removed, feel free to contact me:

http://www.insidesocal.com/publiceye/2009/05/
http://www.theurbancountry.com/2009/05/fallen-leaves-for-sustainable-food.html
http://image63.webshots.com/163/5/39/88/535453988hFuyAW_ph.jpg
http://travel.webshots.com/photo/1418117399075759253TuBdxK
http://travel.webshots.com/photo/1147491597038672136RWIMuj
http://sites.google.com/site/ibaogcc/helping-the-environment
http://www.trashreceptacles.biz/

Organizing the Insane

Posted by mcstrother on July 2, 2010
Posted in: Uncategorized. Leave a Comment

Reavers (from Firefly) and the Joker from The Dark Knight. What do they have in common? They’re both terrifying. What the reavers have in extreme sadism, the Joker makes up for in creativity and near-omnipotence.

They’re also total works of fantasy. Why? It’s not totally obvious. Unlike other fantasy horrors, neither depends on breaking any of reality’s physical laws.

Instead, their existence depends on suspending social laws. If my limited leadership experience has taught me anything, it’s that it’s really really hard to organize people. Even if you can build consensus to action, incompetence and lack of discipline will get you every time. And I wasn’t trying to fly a space ship. Or coordinate 6 highly trained sociopaths in a precisely-timed bank robbery. Sure the Joker’s plots and foresight are genius, but in a world where it is impossible to properly incentivize rational people, it is the Joker’s organizational leadership of the insane and violent that is truly super-human.

Similar arguments can be made about other horrors. The mob and gangs are more realistic examples that are frequently portrayed in film. But I don’t believe that audiences hold this element of the fantasy in the forefront of their minds. The hero of The Dark Knight is the much more obvious fantasy, and the Joker is simply a slightly more extreme version of the mob that exists in our world, and indeed exists in Gotham before the Joker.

One result of this phenomenon is that a large number of movies end up with the following emotional take-home message to their audiences: “Evil exists. It must be defeated. It would be nice if we could have a hero to defeat evil for us, but we don’t. You must be (or create) the hero.” This message has some very clear implications for how we should approach issues like crime and terrorism: police and soldiers are our heroes. Combat and conflict continue to be our go-to metaphors for everything from drugs to oil spills.

The reality, I believe, is much less threatening. Batman is a fantasy, but so is the Joker. Evil is inherently unstable and disorganized. Left to its own devices it tends to decay. Because unlike reavers, real-life human beings bent on violence don’t tend to be very good at flying the metaphorical ship.

Posts navigation

← Older Entries
Newer Entries →
  • Subscribe in a reader

    Flattr this

Blog at WordPress.com. Theme: Parament by Automattic.
Follow

Get every new post delivered to your Inbox.

Powered by WordPress.com