{"id":1523,"date":"2013-08-01T02:43:14","date_gmt":"2013-08-01T02:43:14","guid":{"rendered":"http:\/\/garysieling.com\/blog\/?p=1523"},"modified":"2020-03-31T00:46:31","modified_gmt":"2020-03-31T00:46:31","slug":"u-s-laws-vs-the-human-genome","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/u-s-laws-vs-the-human-genome\/","title":{"rendered":"U.S. Laws vs. The Human Genome"},"content":{"rendered":"<p>Since you can download the U.S. Code, I thought it would be interesting to compare the size to that of the <a href=\"http:\/\/hgdownload.cse.ucsc.edu\/downloads.html\">Human Genome<\/a>, operating on the premise that the latter represents the DNA for a living thing, and the former, the DNA for a nation.<\/p>\n<p>I&#8217;ve charted this below &#8211; to reproduce this you need to plot the sizes of the compressed file for each genome. Using the compressed form rather than uncompressed means that these numbers represent the amount of unique information encoded in a file, rather than counting superfluous data like whitespace and repetitive symbols (if we were to use uncompressed files, this would make make the U.S. Code look quite large by comparison- ~486 MB)<\/p>\n<p>Here, we have see the sizes of genomic data for many species:<\/p>\n<p><a href=\"http:\/\/172.104.26.128\/wp-content\/uploads\/2013\/08\/figure_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/garysieling.com\/blog\/wp-content\/uploads\/2013\/08\/figure_1-578x404.png\" alt=\"figure_1\" width=\"578\" height=\"404\" class=\"aligncenter size-large wp-image-1532\"><\/a><\/p>\n<p>If we zoom in on the left, we can add the U.S. Code:<\/p>\n<p><a href=\"http:\/\/172.104.26.128\/wp-content\/uploads\/2013\/08\/figure_2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/garysieling.com\/blog\/wp-content\/uploads\/2013\/08\/figure_2-578x640.png\" alt=\"figure_2\" width=\"578\" height=\"640\" class=\"aligncenter size-large wp-image-1534\"><\/a><\/p>\n<p>It looks like it&#8217;s near in size to a few types of fish &#8211; if you could obtain relevant state laws, this would likely jump quite a bit (my home state of Pennsylvania does not easily allow downloading a copy of all the laws at once).<\/p>\n<p>Should you wish to access this data or reproduce my results, it is available as a simple python script:<\/p>\n<pre lang=\"python\">sizes = {\"Lizard\": 492,\n\"Human\": 778,\n\"Alpaca\": 738,\n\"Armadillo\": 902,\n\"Cod\": 238,\n\"Baboon\": 826,\n\"budgerigar \": 312,\n\"Bushbaby\": 630,\n\"Cat\": 615,\n\"Chicken\": 296,\n\"Chimp\": 823,\n\"coelacanth \": 796,\n\"Cow\": 745,\n\"Dog\": 603,\n\"Dolphin\": 646,\n\"Elephant\": 800,\n\"Ferret\": 603,\n\"Fugu\": 107,\n\"Gibbon\": 737,\n\"Gorilla\": 758,\n\"Hedgehog\": 901,\n\"Kangaroo\": 545,\n\"Lamprey\": 238,\n\"Manatee\": 775,\n\"Marmoset\": 727,\n\"Ground Finch\": 305,\n\"Megabat\": 500,\n\"Microbat\": 507,\n\"Mouse\": 682,\n\"Lemur\": 722,\n\"Naked Mole-rat\": 653,\n\"Tilapia\": 261,\n\"Monodelphis domestica \": 907,\n\"Painted Turtle\": 714,\n\"Panda\": 577,\n\"Pig\": 702,\n\"Pika\": 844,\n\"Rabbit\": 682,\n\"Rat\": 725,\n\"Rhesus\": 743,\n\"Rock Hyrax\": 751,\n\"Sheep\": 718,\n\"Shrew\": 796,\n\"Sloth\": 627,\n\"Squirrel Monkey\": 652,\n\"Tasmanian Devil\": 920,\n\"Tenrec\": 947,\n\"Tetroadon\": 98,\n\"Tree Shrew\": 908,\n\"Turkey\": 257,\n\"Wallaby\": 787,\n\"Rhino\": 613,\n\"US Federal Code\": 84,\n\"Zebrafish\": 355,\n\"Yeast\": 2.9}\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\n\nwidth = .1\nind = np.arange(len(sizes))\nvalues = sizes.values()\nvalues.sort()\nplt.bar(ind, values)\n\nplt.ylabel(\"Megabytes (Compressed)\")\n\nkeys = sizes.keys()\nkeys.sort(lambda a, b: int(round(sizes[a] - sizes[b])))\nplt.xticks(ind + width \/ 2, keys)\n\nfig.autofmt_xdate(rotation = 90)\n\nplt.show()\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\n\nwidth = .1\nind = np.arange(len(sizes))\nvalues = sizes.values()\nvalues.sort()\nplt.bar(ind, values)\n\n\nplt.ylabel(\"Megabytes (Compressed)\")\n\nkeys = sizes.keys()\nkeys.sort(lambda a, b: int(round(sizes[a] - sizes[b])))\nplt.xticks(ind + width \/ 2, keys)\n\nplt.xticks(rotation=90)\n\nax1 = fig.add_subplot(111)\nbars = ax1.bar(range(0,len(sizes)), range(0,len(sizes)), color='blue', edgecolor='black')\n\nbars[1].set_facecolor('red')\nbars[1].set_height(sizes[\"US Federal Code\"])\n\nplt.subplots_adjust(left=0.125, right=0.9, top=0.9, bottom=0.2, wspace=0.2, hspace=0.2)\n\nplt.show()\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Since you can download the U.S. Code, I thought it would be interesting to compare the size to that of the Human Genome, operating on the premise that the latter represents the DNA for a living thing, and the former, the DNA for a nation. I&#8217;ve charted this below &#8211; to reproduce this you need &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/u-s-laws-vs-the-human-genome\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;U.S. Laws vs. The Human Genome&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,6],"tags":[87,361,395,447,535],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/1523"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=1523"}],"version-history":[{"count":1,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/1523\/revisions"}],"predecessor-version":[{"id":6443,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/1523\/revisions\/6443"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=1523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=1523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=1523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}