« Conan O'Brien Gathers 'Facebook Army' For Huge TV Comeback | Main | This disgusts me or maybe it just makes me sad »

Comments

MaeSims

I received my first loan when I was not very old and this supported my business very much. Nevertheless, I require the collateral loan again.

sewa mobil

Nice article, thanks for the information.

Nike air max

Books and friends should be few but good.It takes three generations to make a gentleman.

coach stores

nothing is impossible for a willing heart.

coach factory stores

Wow! Great info. I wish, I could have such a writing skills.*

Trademark

Hi - just wanted to let you know that we are using a variation of your process for trademark application heatmaps. Thanks.

Chat

One of the more successful your blog writings Thank you

Chat

your effort has been successful in health care in a blog post, this guy is one of the biggest fans.. :))

Betty

Thanks a lot for this! I was looking exactly for that. While playing around with your script I found out that you can actually get rid of the whole beautifulsoup parsing / replacing stuff. You can simply put a css class in the style section for each country you want to change...

in the svg file it says:
/*
* Additional style rules
*
* The following are examples of colouring countries. You can substitute these with your own styles to colour the countries on the map.
*
* Color a few countries:
*
* .gb, .au, .nc
* {
* fill: #ff0000;
* }

so basically you your search for the closing style tag and insert a css block for each country there


stylekey="/style> "#insert opening bracket I had to remove it or your comment form strips the tag
addstyles=""

for cntry,rate in yourdatadict.iteritems():
addstyles="""%s

.%s {
fill: %s;
}
"""%(addstyles,cntry,rate_to_color(rate))
addstyles="""%s

"""%addstyles
f = open(SVGOUTFILE, "w")
f.write(svg.replace(stylekey,addstyles,1))

php web development india

I am not using python but it was nice to learn something new and python seems quite interesting to me so thanks buddy.

The comments to this entry are closed.

My Photo
Blog powered by Typepad

Become a Fan