Jack ‘O’ DeathStar

Carve it yourself.

This entry was posted in Culture and tagged , . Bookmark the permalink.

One Response to Jack ‘O’ DeathStar

  1. Hi Amos,
    I’m trying to understand your post on Nathan Yau’s choropleth map instructions:
    http://flowingdata.com/2009/11/12/how-to-make-a-us-county-thematic-map-using-free-tools/
    Amos Newcombe — November 16, 2009 at 3:51 pm
    I ran into this too, and solved it by running the output of BeautifulSoup.prettify() through the following function:
    import re
    reSodipodi = re.compile(r”)
    reDefs = re.compile(r”)
    def CleanSoup(s):
    ‘Remove the problematic tags written by BeautifulSoup.’
    s = reSodipodi.sub(”, s)
    s = reDefs.sub(”, s)
    return s
    This trashes both the beginning and the end tags, which are unneeded to display the SVG.

    When you say ‘run the output… through’ does that mean to include the script at the end of the program? Also, I get a syntax error for (r”). I really want it to work. I’m new to python but I think that the tags are bugging the program. Thanks.
    Sincerely, Graham Selkirk

Leave a Reply