<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dan Nguyen pronounced fast is danwin &#187; works</title>
	<atom:link href="http://danwin.com/category/works/feed/" rel="self" type="application/rss+xml" />
	<link>http://danwin.com</link>
	<description>The &#039;g&#039; is mostly silent</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:17:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Big Faces &#8211; a mashup of The Big Picture and Face.com</title>
		<link>http://danwin.com/2012/02/big-faces-a-mashup-of-the-big-picture-and-face-com/</link>
		<comments>http://danwin.com/2012/02/big-faces-a-mashup-of-the-big-picture-and-face-com/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:17:23 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1902</guid>
		<description><![CDATA[Just put up another quick side project: Big Faces, which aggregates the excellent Big Picture Blog (by the Boston Globe and its many contributors) and just shows the faces. I used the Face.com API to crop the faces before uploading&#8230; <a href="http://danwin.com/2012/02/big-faces-a-mashup-of-the-big-picture-and-face-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 610px"><a href="http://so.danwin.com/bigfaces/"><img alt="" src="http://so.danwin.com/bigfaces/assets/img/collage.jpg" title="Big Faces" width="600" height="394" /></a><p class="wp-caption-text">Big Faces</p></div>
<p>Just put up another quick side project: <a href="http://so.danwin.com/bigfaces/">Big Faces</a>, which aggregates the excellent <a href="http://www.boston.com/bigpicture/">Big Picture Blog</a> (by the Boston Globe and its many contributors) and just shows the faces. I used the <a href="http://developers.face.com/docs/api/faces-detect/">Face.com API</a> to crop the faces before uploading them.</p>
<p>I have in mind a multi-level photo-exploration app but because it&#8217;s been so long since I looked at using Backbone.js, I needed some practice. As it is, the fine work of the photographers and curators associated with The Big Picture stands on its own power. I probably should rethink it so it doesn&#8217;t require a 700K JSON download&#8230;</p>
<p>The process <a href="http://danwin.com/2012/01/congressmiles-a-ruby-coding-tutorial-with-the-face-and-times-congress-apis/">is simliar to the Congressmiles demo I did last week</a>.</p>
<p>On the front end, this uses the excellent <a href="http://isotope.metafizzy.co/">isotope JQuery plugin</a>. It also has <a href="http://backbonejs.org/">Backbone.js</a> though I vastly simplified the project so much that I pretty much ditched using any of Backbone&#8217;s useful features. The <a href="https://github.com/tbranyen/backbone-boilerplate">Backbone boilerplate was extremely helpful</a>, though, in organizing the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2012/02/big-faces-a-mashup-of-the-big-picture-and-face-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing the U.S. Senate Smiles: A Ruby tutorial with the Face.com and NYT Congress APIs</title>
		<link>http://danwin.com/2012/01/congressmiles-a-ruby-coding-tutorial-with-the-face-and-times-congress-apis/</link>
		<comments>http://danwin.com/2012/01/congressmiles-a-ruby-coding-tutorial-with-the-face-and-times-congress-apis/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 15:28:32 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1864</guid>
		<description><![CDATA[Who&#8217;s got the biggest smile among our U.S. senators? Let&#8217;s find out and exercise our Ruby coding and civic skills. This article consists of a quick coding strategy overview (from the full code is at my Github). Or jump here&#8230; <a href="http://danwin.com/2012/01/congressmiles-a-ruby-coding-tutorial-with-the-face-and-times-congress-apis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 810px"><img alt="U.S. Senate Smiles, ranked by Face.com face-detection algorithm" src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/data-hold/all_smiles.jpg" title="U.S. Senate Smiles, ranked by Face.com face-detection algorithm" width="800" height="160" /><p class="wp-caption-text">The smiles of your U.S. Senate from most smiley-est to least, according to Face.com's algorithm</p></div>
<p><em>Who&#8217;s got the biggest smile among our U.S. senators? Let&#8217;s find out and exercise our Ruby coding and civic skills.</em> This article consists of a quick coding strategy overview (<a href="https://github.com/dannguyen/Congressmiles">from the full code is at my Github</a>). Or jump here to see the results, <a href="#results-faces">as sorted by Face&#8217;s algorithm</a>.</p>
<h2>About this tutorial</h2>
<p>This is a Ruby coding lesson to demonstrate the basic features of Face.com&#8217;s <a href="http://developers.face.com/docs/api/faces-detect/" title="face.com developers site   &raquo; faces.detect">face-detection API</a> for a superficial use case. We&#8217;ll mash with the <a href="http://developer.nytimes.com/docs/congress_api/" title="Times Developer Network - The Congress API">New York Times Congress API</a> and data from the <a href="http://services.sunlightlabs.com/docs/Sunlight_Congress_API/" title="Sunlight_Congress_API">Sunlight Foundation</a>.</p>
<p>The code comprehension is at a relatively simple level and is intended for learning programmers who are comfortable with RubyGems, hashes, loops and variables.</p>
<p><strong>If you&#8217;re a non-programmer: </strong>The use case may be a bit silly here but I hope you can view it from an abstract-big-picture level and see the use of programming to: 1) Make quick work of menial work and 2) create and analyze datapoints where none existed before. </p>
<p>On to the lesson!</p>
<p>&#8212;</p>
<h2>The problem with portraits</h2>
<p>
		For the <a href="http://projects.propublica.org/sopa">SOPA Opera app</a> I built a few weeks ago, I wanted to use the Congressional mugshots to illustrate<br />
		the front page. The <a href="http://services.sunlightlabs.com/docs/Sunlight_Congress_API/" title="Sunlight_Congress_API">Sunlight Foundation</a> provides a convenient zip file download of every sitting Congressmember&#8217;s face. The problem is that the portraits were a bit inconsistent in composition (and quality). For example, here&#8217;s a usable, classic head-and-shoulders portrait of Senator Rand Paul:
		</p>
<div id="rand-paul" class="wp-caption aligncenter" style="width: 210px"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/200x250/P000603.jpg" alt="" title="Sen. Rand Paul" width="200" height="250" class="size-full wp-image"><p class="wp-caption-text">Sen. Rand Paul</p></div>
<p>But some of the portraits don&#8217;t have quite that face-to-photo ratio; Here&#8217;s Sen. Jeanne Shaheen&#8217;s portrait:</p>
<div id="shaheen-full" class="wp-caption aligncenter" style="width: 210px"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/200x250/S001181.jpg" alt="" title="Sen. Jeanne Shaheen" width="200" height="250" class="size-full wp-image"><p class="wp-caption-text">Sen. Jeanne Shaheen</p></div>
<p>It&#8217;s not a terrible Congressional portrait. It&#8217;s just out of proportion compared to Sen. Paul&#8217;s. What we need is a closeup crop of Sen. Shaheen&#8217;s face:</p>
<div id="shaheen-crop" class="wp-caption aligncenter" style="width: 410px"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/data-hold/crop-S001181.jpg" alt="" title="Sen. Jeanne Shaheen" width="400" height="250" class="size-full wp-image"><p class="wp-caption-text">Sen. Jeanne Shaheen's face cropped</p></div>
<p>How do we do that for a given set of dozens (even hundreds) of portraits that doesn&#8217;t involve manually opening each image and cropping the heads in a non-carpal-tunnel-syndrome-inducing manner?</p>
<h3>Easy face detection with Face.com&#8217;s Developer API</h3>
<p>Face-detection is done using an algorithm that scans an image and looks for shapes proportional to the average human face and containing such inner shapes as eyes, a nose and mouth in the expected places. It&#8217;s not as if the algorithm has to have an idea of what an <em>eye</em> looks like exactly; two light-ish shapes about halfway down what looks like a head might be good enough.</p>
<p>You <em>could</em> write your own image-analyzer to do this, but we just want to crop faces right now. Luckily, Face.com provides a generous API that when you send it an image, it will send you back a JSON file in this format:</p>
<pre style="width: 90%; height: 300px; overflow: auto">
{
    "photos": [{
        "url": "http:\/\/face.com\/images\/ph\/12f6926d3e909b88294ceade2b668bf5.jpg",
        "pid": "F@e9a7cd9f2a52954b84ab24beace23046_1243fff1a01078f7c339ce8c1eecba44",
        "width": 200,
        "height": 250,
        "tags": [{
            "tid": "TEMP_F@e9a7cd9f2a52954b84ab24beace23046_1243fff1a01078f7c339ce8c1eecba44_46.00_52.40_0_0",
            "recognizable": true,
            "threshold": null,
            "uids": [],
            "gid": null,
            "label": "",
            "confirmed": false,
            "manual": false,
            "tagger_id": null,
            "width": 43,
            "height": 34.4,
            "center": {
                "x": 46,
                "y": 52.4
            },
            "eye_left": {
                "x": 35.66,
                "y": 44.91
            },
            "eye_right": {
                "x": 58.65,
                "y": 43.77
            },
            "mouth_left": {
                "x": 37.76,
                "y": 61.83
            },
            "mouth_center": {
                "x": 49.35,
                "y": 62.79
            },
            "mouth_right": {
                "x": 57.69,
                "y": 59.75
            },
            "nose": {
                "x": 51.58,
                "y": 56.15
            },
            "ear_left": null,
            "ear_right": null,
            "chin": null,
            "yaw": 22.37,
            "roll": -3.55,
            "pitch": -8.23,
            "attributes": {
                "glasses": {
                    "value": "false",
                    "confidence": 16
                },
                "smiling": {
                    "value": "true",
                    "confidence": 92
                },
                "face": {
                    "value": "true",
                    "confidence": 79
                },
                "gender": {
                    "value": "male",
                    "confidence": 50
                },
                "mood": {
                    "value": "happy",
                    "confidence": 75
                },
                "lips": {
                    "value": "parted",
                    "confidence": 39
                }
            }
        }]
    }],
    "status": "success",
    "usage": {
        "used": 42,
        "remaining": 4958,
        "limit": 5000,
        "reset_time_text": "Tue, 24 Jan 2012 05:23:21 +0000",
        "reset_time": 1327382601
    }
}
	</pre>
<p>The JSON includes an array of photos (if you sent more than one to be analyzed) and then an array of <strong>tags</strong> &ndash; one tag for each detected face. The important part for cropping purposes are the attributes dealing with <strong>height</strong>, <strong>width</strong>, and <strong>center</strong>:</p>
<pre>
		"width": 43,
      "height": 34.4,
      "center": {
          "x": 46,
          "y": 52.4
      },
	</pre>
<p>These numbers represent percentage values from 0-100. So the <strong>width</strong> of the face is 43% of the image&#8217;s total width. If the image is 200 pixels wide, then the face spans 86 pixels.</p>
<p>Using your favorite HTTP-calling library (I like the RestClient gem), you can simply ping the <a href="http://developers.face.com/docs/api/faces-detect/" title="face.com developers site   &raquo; faces.detect">Face.com API&#8217;s detect feature</a> to get these coordinates for any image you please.</p>
<h3>Image manipulation with RMagick</h3>
<p>So how do we do the actual cropping? By using the <a href="http://studio.imagemagick.org/RMagick/doc/index.html" title="RMagick 2.12.0 User's Guide and Reference">RMagick</a> (a Ruby wrapper for the ImageMagick graphics library) gem, which lets us do crops with commands as simple as these:</p>
<pre>
img = Magick::Image.read("somefile.jpg")[0]

# crop a 100x100 image starting from the top left corner
img = img.crop(0,0,100,100)
</pre>
<p>The <a href="http://studio.imagemagick.org/RMagick/doc/index.html" title="RMagick 2.12.0 User's Guide and Reference">RMagick documentation page</a> is a great place to start. I&#8217;ve also written an <a href="http://ruby.bastardsbook.com/chapters/image-manipulation/" title="Image Manipulation | The Bastards Book of Ruby">image-manipulation chapter for The Bastards Book of Ruby</a>. </p>
<h2>The Process</h2>
<p>The code for all of <a href="https://github.com/dannguyen/Congressmiles">this is stored at my Github account</a>.</p>
<p>I&#8217;ve divided this into two parts/scripts. You could combine it into one script but to make things easier to comprehend (and to lessen the amount of best-practices error-handling code for me to write), I divide it into a &#8220;fetch&#8221; and &#8220;process&#8221; stage.</p>
<p>In the <a href="https://github.com/dannguyen/Congressmiles/blob/master/fetch.rb">fetch.rb</a> stage, we essentially download all the remote files we need to do our work:</p>
<ul>
<li>Download a zip file of images from Sunlight Labs and unzip it at the command line</li>
<li>Use NYT&#8217;s Congress API to get latest list of Senators</li>
<li>Use Face.com API to download face-coordinates as JSON files</li>
</ul>
<p>In the <a href="https://github.com/dannguyen/Congressmiles/blob/master/process.rb">process.rb</a> stage, we use RMagick to crop the photos based from the metadata we downloaded from the NYT and Face.com. As a bonus, I&#8217;ve thrown in a script to programmatically create a crude webpage that ranks the Congressmembers&#8217; faces by smile, glasses-wearingness, and androgenicity. How do I do this? The Face.com API handily <a href="http://developers.face.com/docs/api/faces-detect/" title="face.com developers site   &raquo; faces.detect">provides these numbers in its response</a>: </p>
<pre style="width: 90%; height: 300px; overflow: auto">
	"attributes": {
            "glasses": {
                "value": "false",
                "confidence": 16
            },
            "smiling": {
                "value": "true",
                "confidence": 92
            },
            "face": {
                "value": "true",
                "confidence": 79
            },
            "gender": {
                "value": "male",
                "confidence": 50
            },
            "mood": {
                "value": "happy",
                "confidence": 75
            },
            "lips": {
                "value": "parted",
                "confidence": 39
            }
        }
	</pre>
<p>I&#8217;m not going to reprint the code <a href="https://github.com/dannguyen/Congressmiles">from my Github account</a>, you can see the scripts yourself there:<br />
	<br /><a href="https://github.com/dannguyen/Congressmiles">https://github.com/dannguyen/Congressmiles</a>
	</p>
<p><strong>First things first:</strong> sign up for API keys at the <a href="http://developer.nytimes.com/" title="Times Developer Network - Welcome">NYT</a> and <a href="http://developers.face.com/" title="face.com developers site. face.com for developers">Face.com</a></p>
<p>I also use the following gems:</p>
<ul>
<li><a href="http://rmagick.rubyforge.org/" title="RMagick Download Page">RMagick</a></li>
<li><a href="https://github.com/archiloque/rest-client">RestClient</a></li>
<li><a href="https://github.com/jnunemaker/crack">Crack</a></li>
</ul>
<p><a name="results-faces"></a></p>
<h2>The Results</h2>
<p>Here&#8217;s what you should see after you run the <a href="https://github.com/dannguyen/Congressmiles/blob/master/process.rb">process.rb</a> script (all judgments made by Face.com&#8217;s algorithm&#8230;I don&#8217;t think everyone will agree with about the quality of the smiles):</p>
<style type="text/css" media="screen">
	div.face{width: 80px; float:left; margin: 5px; height: 200px; overflow:hidden;}
	div.face img{width: 100%;}
	div.name{font-size: 11px; line-height: 11px; margin: 0;}
	h4{ clear:both;}
	div.sec{margin-bottom: 2.0em; clear: both;}</p>
<p>	/* new clearfix */</p>
<p>	.clearfix:before,.clearfix:after{content:"\0020";display:block;height:0;overflow:hidden}.clearfix:after{clear:both}.clearfix{zoom:1}
</style>
<p><br class="clearfix" />
<div class="clearfix sec">
<h4>10 Biggest Smiles</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/W000437.jpg" alt="Sen. Wicker (R-MS)">
<div class="name">Sen. Wicker (R-MS) [100]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/R000146.jpg" alt="Sen. Reid (D-NV)">
<div class="name">Sen. Reid (D-NV) [100]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S001181.jpg" alt="Sen. Shaheen (D-NH)">
<div class="name">Sen. Shaheen (D-NH) [99]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H001049.jpg" alt="Sen. Hagan (D-NC)">
<div class="name">Sen. Hagan (D-NC) [99]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S000663.jpg" alt="Sen. Snowe (R-ME)">
<div class="name">Sen. Snowe (R-ME) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/K000352.jpg" alt="Sen. Kyl (R-AZ)">
<div class="name">Sen. Kyl (R-AZ) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/K000367.jpg" alt="Sen. Klobuchar (D-MN)">
<div class="name">Sen. Klobuchar (D-MN) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C000880.jpg" alt="Sen. Crapo (R-ID)">
<div class="name">Sen. Crapo (R-ID) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/J000291.jpg" alt="Sen. Johanns (R-NE)">
<div class="name">Sen. Johanns (R-NE) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H001016.jpg" alt="Sen. Hutchison (R-TX)">
<div class="name">Sen. Hutchison (R-TX) [98]</div>
</div>
</div>
<p><br class="clearfix" />
<div class="clearfix sec">
<h4>10 Most Ambiguous Smiles</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/I000025.jpg" alt="Sen. Inouye (D-HI)">
<div class="name">Sen. Inouye (D-HI) [40]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/K000305.jpg" alt="Sen. Kohl (D-WI)">
<div class="name">Sen. Kohl (D-WI) [43]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/M000303.jpg" alt="Sen. McCain (R-AZ)">
<div class="name">Sen. McCain (R-AZ) [47]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/D000563.jpg" alt="Sen. Durbin (D-IL)">
<div class="name">Sen. Durbin (D-IL) [49]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/R000307.jpg" alt="Sen. Roberts (R-KS)">
<div class="name">Sen. Roberts (R-KS) [50]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/W000802.jpg" alt="Sen. Whitehouse (D-RI)">
<div class="name">Sen. Whitehouse (D-RI) [52]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H001061.jpg" alt="Sen. Hoeven (R-ND)">
<div class="name">Sen. Hoeven (R-ND) [54]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/A000360.jpg" alt="Sen. Alexander (R-TN)">
<div class="name">Sen. Alexander (R-TN) [54]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S000320.jpg" alt="Sen. Shelby (R-AL)">
<div class="name">Sen. Shelby (R-AL) [62]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/J000177.jpg" alt="Sen. Johnson (D-SD)">
<div class="name">Sen. Johnson (D-SD) [63]</div>
</div>
<h4>The Non-Smilers</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B000468.jpg" alt="Sen. Bingaman (D-NM)">
<div class="name">Sen. Bingaman (D-NM) [79]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C001088.jpg" alt="Sen. Coons (D-DE)">
<div class="name">Sen. Coons (D-DE) [77]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B001135.jpg" alt="Sen. Burr (R-NC)">
<div class="name">Sen. Burr (R-NC) [72]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H000338.jpg" alt="Sen. Hatch (R-UT)">
<div class="name">Sen. Hatch (R-UT) [72]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/R000122.jpg" alt="Sen. Reed (D-RI)">
<div class="name">Sen. Reed (D-RI) [71]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/P000603.jpg" alt="Sen. Paul (R-KY)">
<div class="name">Sen. Paul (R-KY) [71]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/L000304.jpg" alt="Sen. Lieberman (I-CT)">
<div class="name">Sen. Lieberman (I-CT) [59]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B001267.jpg" alt="Sen. Bennet (D-CO)">
<div class="name">Sen. Bennet (D-CO) [55]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/U000039.jpg" alt="Sen. Udall (D-NM)">
<div class="name">Sen. Udall (D-NM) [51]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/L000261.jpg" alt="Sen. Levin (D-MI)">
<div class="name">Sen. Levin (D-MI) [50]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B001236.jpg" alt="Sen. Boozman (R-AR)">
<div class="name">Sen. Boozman (R-AR) [48]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/I000055.jpg" alt="Sen. Isakson (R-GA)">
<div class="name">Sen. Isakson (R-GA) [41]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/F000457.jpg" alt="Sen. Franken (D-MN)">
<div class="name">Sen. Franken (D-MN) [37]</div>
</div>
</div>
<p><br class="clearfix" />
<div class="clearfix sec">
<h4>10 Most Bespectacled Senators</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/F000457.jpg" alt="Sen. Franken (D-MN)">
<div class="name">Sen. Franken (D-MN) [99]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S000033.jpg" alt="Sen. Sanders (I-VT)">
<div class="name">Sen. Sanders (I-VT) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/M000355.jpg" alt="Sen. McConnell (R-KY)">
<div class="name">Sen. McConnell (R-KY) [98]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/G000386.jpg" alt="Sen. Grassley (R-IA)">
<div class="name">Sen. Grassley (R-IA) [96]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C000560.jpg" alt="Sen. Coburn (R-OK)">
<div class="name">Sen. Coburn (R-OK) [93]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/M000702.jpg" alt="Sen. Mikulski (D-MD)">
<div class="name">Sen. Mikulski (D-MD) [93]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/R000307.jpg" alt="Sen. Roberts (R-KS)">
<div class="name">Sen. Roberts (R-KS) [93]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/I000025.jpg" alt="Sen. Inouye (D-HI)">
<div class="name">Sen. Inouye (D-HI) [91]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/A000069.jpg" alt="Sen. Akaka (D-HI)">
<div class="name">Sen. Akaka (D-HI) [88]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C000705.jpg" alt="Sen. Conrad (D-ND)">
<div class="name">Sen. Conrad (D-ND) [86]</div>
</div>
</div>
<p><br class="clearfix" />
<div class="clearfix sec">
<h4>10 Most Masculine-Featured Senators</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B000468.jpg" alt="Sen. Bingaman (D-NM)">
<div class="name">Sen. Bingaman (D-NM) [94]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B001236.jpg" alt="Sen. Boozman (R-AR)">
<div class="name">Sen. Boozman (R-AR) [92]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B001267.jpg" alt="Sen. Bennet (D-CO)">
<div class="name">Sen. Bennet (D-CO) [92]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/M000355.jpg" alt="Sen. McConnell (R-KY)">
<div class="name">Sen. McConnell (R-KY) [91]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/N000032.jpg" alt="Sen. Nelson (D-FL)">
<div class="name">Sen. Nelson (D-FL) [91]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/R000361.jpg" alt="Sen. Rockefeller IV (D-WV)">
<div class="name">Sen. Rockefeller IV (D-WV) [90]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C000174.jpg" alt="Sen. Carper (D-DE)">
<div class="name">Sen. Carper (D-DE) [90]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C001070.jpg" alt="Sen. Casey (D-PA)">
<div class="name">Sen. Casey (D-PA) [90]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B000575.jpg" alt="Sen. Blunt (R-MO)">
<div class="name">Sen. Blunt (R-MO) [89]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/T000461.jpg" alt="Sen. Toomey (R-PA)">
<div class="name">Sen. Toomey (R-PA) [88]</div>
</div>
</div>
<p><br class="clearfix" />
<div class="clearfix sec">
<h4>10 Most Feminine-Featured Senators</h4>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/M001170.jpg" alt="Sen. McCaskill (D-MO)">
<div class="name">Sen. McCaskill (D-MO) [95]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/B000711.jpg" alt="Sen. Boxer (D-CA)">
<div class="name">Sen. Boxer (D-CA) [93]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S001181.jpg" alt="Sen. Shaheen (D-NH)">
<div class="name">Sen. Shaheen (D-NH) [93]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/G000555.jpg" alt="Sen. Gillibrand (D-NY)">
<div class="name">Sen. Gillibrand (D-NY) [92]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H001016.jpg" alt="Sen. Hutchison (R-TX)">
<div class="name">Sen. Hutchison (R-TX) [91]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/C001035.jpg" alt="Sen. Collins (R-ME)">
<div class="name">Sen. Collins (R-ME) [90]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/S000770.jpg" alt="Sen. Stabenow (D-MI)">
<div class="name">Sen. Stabenow (D-MI) [86]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/H001049.jpg" alt="Sen. Hagan (D-NC)">
<div class="name">Sen. Hagan (D-NC) [81]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/A000368.jpg" alt="Sen. Ayotte (R-NH)">
<div class="name">Sen. Ayotte (R-NH) [79]</div>
</div>
<div class="face">
<img src="http://danwin-files.s3.amazonaws.com/pics/blog/congressmiles/crop/K000367.jpg" alt="Sen. Klobuchar (D-MN)">
<div class="name">Sen. Klobuchar (D-MN) [79]</div>
</div>
</div>
<div style="clear:both"> &#8212; </div>
<p>For the partisan data-geeks, here&#8217;s some faux analysis with averages:</p>
<table>
<thead>
<tr>
<th>Party</th>
<th>Smiles</th>
<th>Non-smiles</th>
<th>Avg. Smile Confidence</th>
</tr>
</thead>
<tbody>
<tr>
<td>D</td>
<td>44</td>
<td>7</td>
<td>85</td>
</tr>
<tr>
<td>R</td>
<td>42</td>
<td>5</td>
<td>86</td>
</tr>
<tr>
<td>I</td>
<td>1</td>
<td>1</td>
<td>85</td>
</tr>
</tbody>
</table>
<p>There you have it, the Republicans are the smiley-est party of them all.</p>
<h2>Further discussion</h2>
<p>This is an exercise to show off the very cool Face.com API and to demonstrate the value of a little programming knowledge. Writing the script doesn&#8217;t take too long, though I spent more time than I liked on idiotic bugs of my own making. But this was way preferable than cropping photos by hand. And once I had the gist of things, I not only had a set of cropped files, I had the ability to whip up any kind of visualization I needed with just a minute&#8217;s more work.</p>
<p>And it wasn&#8217;t just face-detection that I was using, but face-detection in combination with deep data-sources like the Times&#8217;s Congress API and the Sunlight Foundation. For the <a href="http://projects.propublica.org/sopa">SOPA Opera app</a>, it didn&#8217;t take long at all to populate the site with legislator data and faces. (I didn&#8217;t get around to using this face-detection technique to clean up the images, but hey, I get lazy too&#8230;)</p>
<p>Please don&#8217;t judge the value of programming by my silly example here &ndash; having an easy-to-use service like Face.com API (<a href="http://developers.face.com/docs/terms/tou/" title="face.com developers site   &raquo; Terms of Use">mind the usage terms, of course</a>) gives you a lot of great possibilities if you&#8217;re creative. Off the top of my head, I can think of a few:</p>
<ul>
<li>As a photographer, I&#8217;ve accumulated <a href="http://www.flickr.com/photos/zokuga/" title="Flickr: Dan Nguyen @ New York City's Photostream">thousands of photos</a> but have been quite lazy in tagging them. I could conceivably use Face.com&#8217;s API to quickly find photos without faces for stock photo purposes. Or maybe a client needs to see male/female portraits. The Face.com API gives me an ad-hoc way to retrieve those without menial browsing.</li>
<li>Data on government hearing webcasts are hard to come by. I&#8217;m sure there&#8217;s a programmatic way to split up a video into thousands of frames. Want to know at which points Sen. Harry Reid shows up? Train Face.com&#8217;s API to recognize his face and set it loose on those still frames to find when he speaks.</li>
<li>Speaking of breaking up video&#8230;use the Face API to detect the eyes of someone being interviewed and use RMagick to detect when the eyes are closed (the pixels in those positions are different in color than the second before) to do that <a href="http://www.telegraph.co.uk/news/2589073/Liars-are-exposed-by-blinking.html" title="Liars are exposed by blinking  - Telegraph">college-level psych experiment of correlating blinks-per-minute to truthiness</a>.</li>
</ul>
<p>Thanks for reading. This was a quick post and I&#8217;ll probably go back to clean it up. At some point, I&#8217;ll probably add this <a href="http://ruby.bastardsbook.com/" title="The Bastards Book of Ruby">to the Bastards Book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2012/01/congressmiles-a-ruby-coding-tutorial-with-the-face-and-times-congress-apis/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Million Pageviews, Thousands of Dollars Poorer, and Still Countlessly Richer.</title>
		<link>http://danwin.com/2012/01/a-million-pageviews-thousands-of-dollars-poorer-and-still-countlessly-richer/</link>
		<comments>http://danwin.com/2012/01/a-million-pageviews-thousands-of-dollars-poorer-and-still-countlessly-richer/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 04:37:56 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[visuals]]></category>
		<category><![CDATA[works]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1834</guid>
		<description><![CDATA[Update: This post rambled longer than I intended it to and I forgot that I had meant to include some observations on what I&#8217;ve noticed about Flickr&#8217;s traffic pattern. I&#8217;ve added some grafs to the bottom of this post. My&#8230; <a href="http://danwin.com/2012/01/a-million-pageviews-thousands-of-dollars-poorer-and-still-countlessly-richer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/4204160273/" title="Snowball fight in Times Square, Manhattan, New York by Dan Nguyen @ New York City, on Flickr"><img src="http://farm3.staticflickr.com/2751/4204160273_8aa8a03fab_b.jpg" style="width: 100%" alt="Snowball fight in Times Square, Manhattan, New York"></a></div>
<p><strong>Update:</strong> <em>This post rambled longer than I intended it to and I forgot that I had meant to include some observations on what I&#8217;ve noticed about Flickr&#8217;s traffic pattern. <a href="#flickrpageviews">I&#8217;ve added some grafs to the bottom of this post.</a></em></p>
<p>My <a href="http://www.flickr.com/photos/zokuga/">Flickr account</a> hit 1,000,000 pageviews this weekend. Two years ago, I bought a Pro account shortly after the above photo of <a href="http://www.flickr.com/photos/zokuga/4204160273/">some punk kid throwing a snowball at me in Times Square</a> was posted on Flickr&#8217;s blog. Since then I set my account to share all of my photos under the Creative Commons Non-commercial license (but I&#8217;ve let anyone who asks use them for free).</p>
<p>My account was on track to have 500K pageviews by October (of this past year) <a href="http://www.flickr.com/photos/zokuga/6189448489/">but then this photo of pilots marching on Wall Street hit Reddit</a>&nbsp;and attracted 150K views all by itself, so then a million total views seemed just around the corner <img src='http://danwin.com/words/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<h3>Net Profit</h3>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/4717371102/" title="Mermaid Parade 2010, Coney Island by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/4717371102_245034d5d5_b.jpg" style="width: 100%" alt="Mermaid Parade 2010, Coney Island"></a></p>
<div class="photo-caption"><em>I was paid $120 for this photo, which was used in New York&#8217;s campaign to remind people that they can&#8217;t smoke in Coney Island (or any other public park).</em></div>
</div>
<p><br />
<p>So how much have I gained <strong>monetarily</strong> in these two years of paying for a Flickr Pro account?</p>
<p>Two publications offered a total of $135 for my work. Minus the two years of Pro fees ($25 times 2 years) and that comes to about $80. If I spent at minimum 1 minute to shoot, edit, process, and upload each of my ~3,100 photos, I made a rate of $1.50/hour for my work.</p>
<p>Of course, I&#8217;ve spent much more time than one minute per photo. And I&#8217;ve taken far more than 3,100 photos (I probably have 15 to 20 times as many stored on my backup drives). And of course, thousands of dollars for my photo equipment, including repairs and replacements. So:</p>
<ul>
<li style="color:green;">+ $135 from publications</li>
<li style="color:red;">- $50 for Flickr Pro fees</li>
<li style="color:red;">- $8,000 (and change) for Canon 5D Mark 2, Canon S90, lenses, repairs from constant use in the rain/snow/etc. </li>
</ul>
<p>So doing the math&#8230;I&#8217;m several thousands of dollars in the hole.</p>
<h3>Gains</h3>
<p>Monetarily, my photography is a large loss for me. I&#8217;m lucky enough to have a job (and, for better or worse, no car or mortgage and few other hobbies to pay for) to subsidize it. So why do I keep doing it and, in general, giving away my work for free?</p>
<p>Well, there is always the promise of <em>potential gain</em>:
	</p>
<ul>
<li>I made a $1,000 (mostly to cover expenses) to shoot a friend&#8217;s wedding because his fiance liked the work I posted on my Facebook account&#8230;but weddings are so much work that I&#8217;ve decided to avoid shooting them if I can help it.</li>
<li>I&#8217;ve also taken photos for my job at ProPublica, <a href="http://tumblr.eyeheartnewyork.com/post/13795809332/over-the-weekend-my-propublica-colleagues" title="Eye Heart New York">including this portrait for a story that was published in the Washington Post</a>. I&#8217;m not employed specifically to take photos, but it&#8217;s nice to be able to do it on office time.
		</li>
<li>I also now have a large cache of stock photos to use for the random sites I build. For example, I used the Times Square snowball photo to <a href="http://ruby.bastardsbook.com/chapters/image-manipulation/" title="Image Manipulation | The Bastards Book of Ruby">illustrate a programming lesson on image manipulation and face-recognition technology</a>.</li>
<li>Even if my photos were up to professional par, I&#8217;m not the type to declare (in person) to others, &#8220;Hey, one of my hobbies is photography. Look at these pictures I took.&#8221; Flickr/Facebook/Tumblr is a nice passive-humblebrag way to show this side passion to others. And I&#8217;ve made a few good friends and new opportunities because of the visibility of my work.</li>
</ul>
<p>In the scheme of things, a million pageviews is not a lot for two years&#8230;A photo might get that in a few days if it&#8217;s a popular enough meme. And pageviews have only a slight correlation to actual artistic merit (neither the above snowball or pilot photos are my favorite of the series). But it&#8217;s amazing and humbling to think that &ndash; if the average visitor who stumbles on my account might look at 4 photos &ndash;  something I&#8217;ve done as a hobby might have reached nearly a quarter million people (not counting the times when sites take advantage of the CC-licensing and reprint my photos).</p>
<p>Having any kind of audience, no matter how casual, is necessary to practice improve my art if I were to ever try to become a paid professional photographer. So that&#8217;s one important way that I&#8217;m getting something from my online publishing.</p>
<h3>Photos are as free as the photographer wants them to be</h3>
<p>My personal milestone coincidently comes after the posting of two highly-linked-to articles on the costs of a photo: 	<a href="http://www.petapixel.com/2012/01/10/this-photograph-is-not-free/" title="This Photograph Is Not Free">This Photograph is Not Free</a> by John Mueller and <a href="http://standblog.org/blog/post/2012/01/11/This-photograph-is-free" title="This photograph is free - Standblog">This Photograph is Free</a> by Tristan Nitot. They both make good points (Mueller&#8217;s response to Nitot is nuanced and deserves <a href="http://standblog.org/blog/post/2012/01/11/This-photograph-is-free#c14363" title="This photograph is free - Standblog">to also be considered</a>).
</p>
<p>Mueller and Nitot aren&#8217;t necessarily at odds at each other so there&#8217;s not much for me to add. Photos <em>are</em> worth good money. To cater to a client, to buy the (extra) professional equipment, to spend more time in editing and post-processing (besides cropping, color-correction and contrast, I don&#8217;t do much else to my photos), to take more time to <em>be there</em> at an assignment &ndash; this is all most definitely worth charging for.</p>
<p>And that is precisely why I don&#8217;t put the effort into marketing or selling mine.  The money isn&#8217;t worth taking that amount of time and energy from what I currently consider my main work and passion. However, what I&#8217;ve gotten so far from my photography &ndash; the extra incentive to explore the great city I live in, the countless friends and memories, and of course, the photos to look back on and reuse for whatever I want &ndash; the $8,000 deficit is <em>easily</em> covered by that. Having the option to easily share my photos to (hopefully) inspire and entertain others is icing.</p>
<p>&#8212;</p>
<p><em>One more side-benefit of using a public publishing system like Flickr: I couldn&#8217;t devise a better way to organize and browse my own work with minimal effort. And I&#8217;m often rediscovering what I considered to be throwaway photos because others find them interesting.</em></p>
<p><em>Here are a few other photos I&#8217;ve taken over the years that were either frequently-viewed or considered &#8220;interesting&#8221; by Flickr&#8217;s bizarre algorithm:</em></p>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5296126260/" title="Jumping for joy during New York blizzard, Times Square by Dan Nguyen @ New York City, on Flickr"><img src="http://farm6.staticflickr.com/5245/5296126260_41cbf53c15_b.jpg" style="width: 100%" alt="Jumping for joy during New York blizzard, Times Square"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/4781290634/" title="The Cat is the Hat by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/4781290634_e0568b07dd_b.jpg" style="width: 100%" alt="The Cat is the Hat"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/6332798259/" title="Sunset over Battery Park and Statue of Liberty by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/6332798259_182f326c5b_b.jpg" style="width: 100%" alt="Sunset over Battery Park and Statue of Liberty"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/6190179809/" title="Woman in white, pilots by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/6190179809_4a8759df93_b.jpg" style="width: 100%" alt="Woman in white, pilots"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5296157798/" title="Pushing a Taxi - New York Blizzard Snowstorm Thundersnow Blaaaaagh by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5296157798_0c750687b8_b.jpg" style="width: 100%" alt="Pushing a Taxi - New York Blizzard Snowstorm Thundersnow Blaaaaagh"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5817408342/" title="Lightning strikes the Empire State Building by Dan Nguyen @ New York City, on Flickr"><img src="http://farm6.staticflickr.com/5062/5817408342_464c5be58e_b.jpg" style="width: 100%" alt="Lightning strikes the Empire State Building"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5134407561/" title="Brooklyn Bridge photographer-tourist, Photo of by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5134407561_301ea7c9bb_b.jpg" style="width: 100%" alt="Brooklyn Bridge photographer-tourist, Photo of"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/6229218718/" title="Atrium, Museum of Natural History by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/6229218718_f2eaef969a_b.jpg" style="width: 100%" alt="Atrium, Museum of Natural History"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/4208025424/" title="Union Square Show by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/4208025424_6907c1c8d7_b.jpg" style="width: 100%" alt="Union Square Show"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/6118694619/" title="Casting Couch (#NYFW Spring 2012) by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/6118694619_631abb75bd_b.jpg" style="width: 100%" alt="Casting Couch (#NYFW Spring 2012)"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5197527078/" title="Williamsburg: Beautiful dogs by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5197527078_cb8d122b74_b.jpg" style="width: 100%" alt="Williamsburg: Beautiful dogs"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5348405624/" title="New York Snow Blizzard 2011, Lone Man on the Brooklyn Bridge by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5348405624_dc1d319ef4_b.jpg" style="width: 100%" alt="New York Snow Blizzard 2011, Lone Man on the Brooklyn Bridge"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5678699217/" title="Ground Zero NY celebrates news of Osama bin Laden's death by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5678699217_0acb6a6a3d_b.jpg" style="width: 100%" alt="Ground Zero NY celebrates news of Osama bin Laden's death"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/5443790318/" title="Grand Central Moncler NYFW Flash Mob Dancin by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/5443790318_aeb68e7e27_b.jpg" style="width: 100%" alt="Grand Central Moncler NYFW Flash Mob Dancin"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/6262856392/" title="Broadway Rainstorm by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/6262856392_f3f01d9a53_b.jpg" style="width: 100%" alt="Broadway Rainstorm"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/3911279956/" title="Towers of Light 9/11 by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/3911279956_e23bd049e1_b.jpg" style="width: 100%" alt="Towers of Light 9/11"></a></div>
<div class="photo"><a href="http://www.flickr.com/photos/zokuga/3714908037/" title="Manhattanhenge from a Taxi by Dan Nguyen @ New York City, on Flickr"><img src="http://danwin-files.s3.amazonaws.com/pics/blog/3714908037_d81e97d0d1_b.jpg" style="width: 100%" alt="Manhattanhenge from a Taxi"></a></div>
<p><a name="flickrpageviews"></a></p>
<p><strong>A few more observations on Flickr pageviews: </strong> It&#8217;s hard to say if 1,000,000 page views is a lot especially considering the number of photos I have uploaded in total. Before the <a href="http://www.flickr.com/photos/zokuga/6189448489/" title="United/Continental pilots march on Wall Street | Flickr - Photo Sharing!">pilots on Wall Street photo</a>, I averaged about 200-500 pageviews a day. After that, I put more effort into maintaining my account and regularly uploading photos. Now on a given day, if I don&#8217;t upload anything particularly interesting the account averages about 1,500 views.</p>
<p>Search engines bring very little traffic. So other than what (lack of) interest my photos have for the general Internet, I think my upload-and-forget mindset towards my account also limits my pageviews. I have a good friend on Flickr who gets far fewer pageviews but gets far more comments than I do. I rarely comment on my contacts&#8217; photos and barely participate in the various groups.</p>
<p>I&#8217;m disconnected enough from the Flickr social scene that I only have a very vague understanding of how its <a href="http://www.flickr.com/explore/" title="Flickr: Explore!">Explore section works</a>. Besides the blog, the <a href="http://www.flickr.com/explore/" title="Flickr: Explore!">Explore collection</a> is the best way to get seen on Flickr. It features &#8220;interesting&#8221; photos as determined by an algorithm that, as best I can tell, is affected by some kind of in-group metric.</p>
<p>I&#8217;ve only had three photos make it to Explore: the <a href="http://www.flickr.com/photos/zokuga/4204160273/" title="Snowball fight in Times Square, Manhattan, New York | Flickr - Photo Sharing!">snowball fight in Times Square</a>, the <a href="http://www.flickr.com/photos/zokuga/5817408342/" title="Lightning strikes the Empire State Building | Flickr - Photo Sharing!">lightning hitting the Empire State Building</a>, and this one where my subway train got stuck <a href="http://www.flickr.com/photos/zokuga/6026431606/" title="Abandoning the R subway train | Flickr - Photo Sharing!">and we had to walk out the tunnel</a>. The <a href="http://www.flickr.com/photos/zokuga/6189448489/" title="United/Continental pilots march on Wall Street | Flickr - Photo Sharing!">pilots photo</a> did not make it to Explore, so I&#8217;m guessing that amount of traffic (particularly if a huge portion of it comes from one link on Reddit) is not necessarily a prime factor to getting noticed by Flickr&#8217;s algorithm.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2012/01/a-million-pageviews-thousands-of-dollars-poorer-and-still-countlessly-richer/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SOPAopera.org &#8211; A hand-made list of SOPA / PROTECT-IP Congressional supporters and opponents</title>
		<link>http://danwin.com/2012/01/sopaopera-org-a-hand-made-list-of-sopa-protect-ip-congressional-supporters-and-opponents/</link>
		<comments>http://danwin.com/2012/01/sopaopera-org-a-hand-made-list-of-sopa-protect-ip-congressional-supporters-and-opponents/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 19:09:42 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>
		<category><![CDATA[SOPA]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1807</guid>
		<description><![CDATA[I&#8217;ve always been interested in exploring the various online Congressional information sources and the recent SOPA debate seemed like a good time to put some effort in it&#8230;also, I&#8217;ve always wanted to try out the excellent isotope Javascript library. I&#8230; <a href="http://danwin.com/2012/01/sopaopera-org-a-hand-made-list-of-sopa-protect-ip-congressional-supporters-and-opponents/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been interested in exploring the various online Congressional information sources and the recent <a href="http://sopaopera.org/sopa">SOPA debate</a> seemed like a good time to put some effort in it&#8230;also, I&#8217;ve always wanted to try out the excellent <a href="http://isotope.metafizzy.co/">isotope Javascript library</a>.</p>
<p>I had been passively paying attention to the debate and was surprised at how hard it was to find a list of supporters and opponents, given how much it&#8217;s dominated my (admittedly small bubblish) internet communities. </p>
<p>When I set out to compile the list, though, I could see why&#8230;the official government sites don&#8217;t make it easy to find or interpret the information. So <a href="http://sopaopera.org">SOPAopera</a> is my game attempt at putting some basic information about it&#8230;the feedback I&#8217;ve gotten so far indicates that even constituents who have been reading a lot about SOPA/PROTECT-IP are surprised at the level and diversity of support the laws have among Congressmembers.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2012/01/sopaopera-org-a-hand-made-list-of-sopa-protect-ip-congressional-supporters-and-opponents/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Bastards Book: A Programming Tutorial for journalists, researchers, analysts, and anyone else who cares about data</title>
		<link>http://danwin.com/2011/12/the-bastards-book-a-programming-tutorial-for-journalists-researchers-analysts-and-anyone-else-who-cares-about-data/</link>
		<comments>http://danwin.com/2011/12/the-bastards-book-a-programming-tutorial-for-journalists-researchers-analysts-and-anyone-else-who-cares-about-data/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 18:51:29 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>
		<category><![CDATA[Bastards Book]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1778</guid>
		<description><![CDATA[Back when I wrote my &#8220;Coding for Journalists 101&#8243; guide about a year and a half ago, I barely realized how useful code could be as a journalistic tool. Since then, after the Dollars for Docs project at ProPublica and&#8230; <a href="http://danwin.com/2011/12/the-bastards-book-a-programming-tutorial-for-journalists-researchers-analysts-and-anyone-else-who-cares-about-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 910px"><a href="http://ruby.bastardsbook.com"><img alt="" src="http://ruby.bastardsbook.com/assets/images/lede/main.jpg" title="Crossing Bleecker and Lafayette through a snowstorm" width="900" height="437" /></a><p class="wp-caption-text">Crossing Bleecker and Lafayette through a snowstorm</p></div>
<p>Back when I wrote my <a href="http://danwin.com/2010/04/coding-for-journalists-101-a-four-part-series/">&#8220;Coding for Journalists 101&#8243;</a> guide about a year and a half ago, I barely realized how useful code could be as a journalistic tool. Since then, after <a href="http://projects.propublica.org/docdollars/">the Dollars for Docs project at ProPublica</a> and various other programming adventures, I&#8217;ve become a slightly better coder and even more adamant that programming is <strong>basically a necessity for anyone</strong> who cares about understanding and communicating about the world in a quantitative, meaningful way.</p>
<p>The world of data has exploded in the past few years without a corresponding increase in the people or tools to efficiently make sense of it. And so I&#8217;ve had a hankering to create a more cohesive, useful programming guide aimed at not just journalists, but for anyone in any field.</p>
<p>It&#8217;s called the <a href="http://ruby.bastardsbook.com">Bastards Book of Ruby</a>. It&#8217;s not really just about Ruby and &#8220;bastards&#8221; was a working title that I came up with but never got around to changing. But it seems to work for now.</p>
<p>As I was writing the introduction (&#8220;<a href="http://ruby.bastardsbook.com/about">Programming is for Anyone</a>&#8220;), I came across this <a href="http://www.npr.org/2011/10/06/141115121/steve-jobs-computer-science-is-a-liberal-art">Steve Jobs interview with Fresh Air</a>. He says pretty much exactly what I&#8217;m thinking, but he said it 15 years ago &#8212; surprising given that the Web was in its infancy and Jobs&#8217;s fame was largely out of making computers brain-dead simple for people. He wasn&#8217;t much of a programmer, but he really was a genius at understanding the bigger picture of what he himself only dabbled in:</p>
<blockquote><p>&#8220;In my perspective &#8230; science and computer science is a liberal art, it&#8217;s something everyone should know how to use, at least, and harness in their life. It&#8217;s not something that should be relegated to 5 percent of the population over in the corner. It&#8217;s something that everybody should be exposed to and everyone should have mastery of to some extent, and that&#8217;s how we viewed computation and these computation devices.&#8221;</p></blockquote>
<p><a href="http://ruby.bastardsbook.com">Bastards Book of Ruby</a>. It&#8217;s just a rough draft but already numbers at 75,000 words. See the <a href="http://ruby.bastardsbook.com/toc">table of contents</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/12/the-bastards-book-a-programming-tutorial-for-journalists-researchers-analysts-and-anyone-else-who-cares-about-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Hurricane Irene data predicts increased chance of high speed winds</title>
		<link>http://danwin.com/2011/08/new-noaanhc-for-irene-show-increased-chance-of-high-speed-winds/</link>
		<comments>http://danwin.com/2011/08/new-noaanhc-for-irene-show-increased-chance-of-high-speed-winds/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 14:22:26 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[works]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1724</guid>
		<description><![CDATA[UPDATE 1:30PM: New NOAA numbers project REDUCED probabilities, table updated: According to raw data from the National Hurricane Center, the probability that NYC will suffer sustained high winds has increased significantly I had yesterday's numbers saved on my web cache&#8230; <a href="http://danwin.com/2011/08/new-noaanhc-for-irene-show-increased-chance-of-high-speed-winds/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 1:30PM:</strong> New NOAA numbers project REDUCED probabilities, table updated:</p>
<p>According to <a href="http://www.nhc.noaa.gov/text/refresh/MIAPWSAT4+shtml/262048.shtml?" title="Hurricane IRENE Wind Speed Probabilities">raw data from the National Hurricane Center</a>, the probability that NYC will suffer sustained high winds has <strong>increased significantly</strong></p>
<p>I had yesterday's numbers saved on my web cache from yesterday. Here they are compared with this morning's numbers (reports 26 and 28 respectively):</p>
<table>
<thead>
<tr>
<th>City</th>
<th>KT</th>
<th>SAT 0200-1400</th>
<th>SAT 1400-SUN 0200</th>
<th>SUN 0200-1400</th>
<th>SUN 1400-MON 0200</th>
<th>MON 0200 - TUE 0200</th>
<th>TUE 0200-WED 0200</th>
<th>WED 0600 - THU 0600</th>
</tr>
</thead>
<tr>
<td>NYC</td>
<td>34</td>
<td>1( 1)</td>
<td>23(24)</td>
<td>44(68)</td>
<td>1(69)</td>
<td>X(69)</td>
<td>X(69)</td>
</tr>
<tr>
<td>NYC</td>
<td>50</td>
<td>X( X)</td>
<td>2( 2)</td>
<td>27(29)</td>
<td>X(29)</td>
<td>X(29)</td>
<td>X(29)</td>
</tr>
<tr>
<td>NYC</td>
<td>64</td>
<td>X( X)</td>
<td>X( X)</td>
<td>5( 5)</td>
<td>X( 5)</td>
<td>X( 5)</td>
<td>X( 5)</td>
</tr>
<tr>
<td>New proj:</td>
</tr>
<tr>
<td>NYC</td>
<td>34</td>
<td>1</td>
<td>35(36)</td>
<td>47(83)</td>
<td>X(83)</td>
<td>X(83)</td>
<td>X(83)</td>
<td>X(83)</td>
</tr>
<tr>
<td>NYC</td>
<td>50</td>
<td>X</td>
<td>3( 3)</td>
<td>41(44)</td>
<td>X(44)</td>
<td>X(44)</td>
<td>X(44)</td>
<td>X(44)</td>
</tr>
<tr>
<td>NYC</td>
<td>64</td>
<td>X</td>
<td>X( X)</td>
<td>10(10)</td>
<td>X(10)</td>
<td>X(10)</td>
<td>X(10)</td>
<td>X(10)</td>
</tr>
<tr>
<td>NEWER proj (#29):</td>
</tr>
<tr>
<td>NYC</td>
<td>34</td>
<td></td>
<td>10</td>
<td>59(69)</td>
<td>5(74)</td>
<td>X(74)</td>
<td>X(74)</td>
<td>X(74)</td>
<td>X(74)</td>
</tr>
<tr>
<td>NYC</td>
<td>50</td>
<td></td>
<td>X</td>
<td>30(30)</td>
<td>3(33)</td>
<td>X(33)</td>
<td>X(33)</td>
<td>X(33)</td>
<td>X(33)</td>
</tr>
<tr>
<td>NYC</td>
<td>64</td>
<td></td>
<td>X</td>
<td>5( 5)</td>
<td>1( 6)</td>
<td>X( 6)</td>
<td>X( 6)</td>
<td>X( 6)</td>
<td>X( 6)</td>
</tr>
</table>
<p><br /></p>
<p><strong>The KT values are sustained winds (1 minute or longer) measurements</strong>. They translate to:</p>
<table>
<tr>
<td>34</td>
<td>39mph</td>
</tr>
<tr>
<td>50</td>
<td>58mph</td>
</tr>
<tr>
<td>64</td>
<td>74mph</td>
</tr>
</table>
<p>The number in the parentheses is the <strong>projected cumulative chance</strong> that NYC experiences those wind speeds. The number outside the parentheses are the chance that those wind speeds will occur in the given time period.</p>
<p>How bad are those wind speeds for New York? <a href="http://fivethirtyeight.blogs.nytimes.com/2011/08/26/new-york-hurricane-could-be-multibillion-dollar-catastrophe/">Nate Silver of the New York Times has a great article and chart showing the projected damage</a>. Summary: It's not good, at all:</p>
<div class="wp-caption aligncenter" style="width: 490px"><a href="http://fivethirtyeight.blogs.nytimes.com/2011/08/26/new-york-hurricane-could-be-multibillion-dollar-catastrophe/"><img alt="Nate Silver Hurricane Irene damage chart" src="http://graphics8.nytimes.com/images/2011/08/26/us/fivethirtyeight-hurricane-2/fivethirtyeight-hurricane-2-blog480.jpg" title="Nate Silver Hurricane Irene damage chart" width="480" height="536" /></a><p class="wp-caption-text">Nate Silver Hurricane Irene damage chart</p></div>
<p><a href="http://thelede.blogs.nytimes.com/2011/08/27/latest-updates-on-hurricane-irene-2/">The NYTimes is keeping a good up-to-date blog of the latest Irene news.</a></p>
<p>Here's the current NOAA raw data for all the cities (next time around, I'll just make a web app to translate this mess):</p>
<pre>

000
FONT14 KNHC 271449
PWSAT4

HURRICANE IRENE WIND SPEED PROBABILITIES NUMBER  29
NWS NATIONAL HURRICANE CENTER MIAMI FL       AL092011
1500 UTC SAT AUG 27 2011                                            

AT 1500Z THE CENTER OF HURRICANE IRENE WAS LOCATED NEAR LATITUDE
35.2 NORTH...LONGITUDE 76.4 WEST WITH MAXIMUM SUSTAINED WINDS NEAR
75 KTS...85 MPH...140 KM/H.                                         

Z INDICATES COORDINATED UNIVERSAL TIME (GREENWICH)
   ATLANTIC STANDARD TIME (AST)...SUBTRACT 4 HOURS FROM Z TIME
   EASTERN  DAYLIGHT TIME (EDT)...SUBTRACT 4 HOURS FROM Z TIME
   CENTRAL  DAYLIGHT TIME (CDT)...SUBTRACT 5 HOURS FROM Z TIME      

I.  MAXIMUM WIND SPEED (INTENSITY) PROBABILITY TABLE                

CHANCES THAT THE MAXIMUM SUSTAINED (1-MINUTE AVERAGE) WIND SPEED OF
THE TROPICAL CYCLONE WILL BE WITHIN ANY OF THE FOLLOWING CATEGORIES
AT EACH OFFICIAL FORECAST TIME DURING THE NEXT 5 DAYS.
PROBABILITIES ARE GIVEN IN PERCENT.  X INDICATES PROBABILITIES LESS
THAN 1 PERCENT.                                                     

      - - - MAXIMUM WIND SPEED (INTENSITY) PROBABILITIES - - -      

VALID TIME   00Z SUN 12Z SUN 00Z MON 12Z MON 12Z TUE 12Z WED 12Z THU
FORECAST HOUR   12      24      36      48      72      96     120
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DISSIPATED       X       4       4      10      25      30      31
TROP DEPRESSION  3      19       7      26      31      29      28
TROPICAL STORM  41      56      65      53      41      38      38
HURRICANE       56      21      24      12       3       4       3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
HUR CAT 1       52      18      21      10       3       3       3
HUR CAT 2        4       2       3       2       X       X       X
HUR CAT 3        1       1       X       X       X       X       X
HUR CAT 4        X       X       X       X       X       X       X
HUR CAT 5        X       X       X       X       X       X       X
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FCST MAX WIND   70KT    65KT    60KT    45KT    40KT    35KT    35KT

II. WIND SPEED PROBABILITY TABLE FOR SPECIFIC LOCATIONS             

CHANCES OF SUSTAINED (1-MINUTE AVERAGE) WIND SPEEDS OF AT LEAST
   ...34 KT (39 MPH... 63 KPH)...
   ...50 KT (58 MPH... 93 KPH)...
   ...64 KT (74 MPH...119 KPH)...
FOR LOCATIONS AND TIME PERIODS DURING THE NEXT 5 DAYS               

PROBABILITIES FOR LOCATIONS ARE GIVEN AS IP(CP) WHERE
    IP  IS THE PROBABILITY OF THE EVENT BEGINNING DURING
        AN INDIVIDUAL TIME PERIOD (INDIVIDUAL PROBABILITY)
   (CP) IS THE PROBABILITY OF THE EVENT OCCURRING BETWEEN
        12Z SAT AND THE FORECAST HOUR (CUMULATIVE PROBABILITY)      

PROBABILITIES ARE GIVEN IN PERCENT
X INDICATES PROBABILITIES LESS THAN 1 PERCENT
PROBABILITIES FOR 34 KT AND 50 KT ARE SHOWN AT A GIVEN LOCATION WHEN
THE 5-DAY CUMULATIVE PROBABILITY IS AT LEAST 3 PERCENT.
PROBABILITIES FOR 64 KT ARE SHOWN WHEN THE 5-DAY CUMULATIVE
PROBABILITY IS AT LEAST 1 PERCENT.                                  

  - - - - WIND SPEED PROBABILITIES FOR SELECTED  LOCATIONS - - - -  

               FROM    FROM    FROM    FROM    FROM    FROM    FROM
  TIME       12Z SAT 00Z SUN 12Z SUN 00Z MON 12Z MON 12Z TUE 12Z WED
PERIODS         TO      TO      TO      TO      TO      TO      TO
             00Z SUN 12Z SUN 00Z MON 12Z MON 12Z TUE 12Z WED 12Z THU

FORECAST HOUR    (12)   (24)    (36)    (48)    (72)    (96)   (120)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LOCATION       KT                                                   

BURGEO NFLD    34  X   X( X)   X( X)   X( X)   6( 6)   X( 6)   X( 6)

PTX BASQUES    34  X   X( X)   X( X)   2( 2)   8(10)   X(10)   X(10)

EDDY POINT NS  34  X   X( X)   X( X)   4( 4)   1( 5)   X( 5)   X( 5)

SYDNEY NS      34  X   X( X)   X( X)   2( 2)   3( 5)   X( 5)   X( 5)

HALIFAX NS     34  X   X( X)   1( 1)   8( 9)   X( 9)   X( 9)   X( 9)

YARMOUTH NS    34  X   X( X)  16(16)   6(22)   X(22)   X(22)   X(22)

MONCTON NB     34  X   X( X)   3( 3)  20(23)   1(24)   X(24)   X(24)

ST JOHN NB     34  X   X( X)  12(12)  18(30)   X(30)   X(30)   X(30)
ST JOHN NB     50  X   X( X)   X( X)   3( 3)   X( 3)   X( 3)   X( 3)

EASTPORT ME    34  X   X( X)  22(22)  16(38)   X(38)   X(38)   X(38)
EASTPORT ME    50  X   X( X)   1( 1)   4( 5)   X( 5)   X( 5)   X( 5)

BAR HARBOR ME  34  X   X( X)  41(41)  12(53)   X(53)   X(53)   X(53)
BAR HARBOR ME  50  X   X( X)   6( 6)   6(12)   X(12)   X(12)   X(12)
BAR HARBOR ME  64  X   X( X)   1( 1)   1( 2)   X( 2)   X( 2)   X( 2)

AUGUSTA ME     34  X   1( 1)  62(63)   7(70)   X(70)   X(70)   X(70)
AUGUSTA ME     50  X   X( X)  18(18)   6(24)   X(24)   X(24)   X(24)
AUGUSTA ME     64  X   X( X)   3( 3)   1( 4)   X( 4)   X( 4)   X( 4)

PORTLAND ME    34  X   5( 5)  67(72)   2(74)   X(74)   X(74)   X(74)
PORTLAND ME    50  X   X( X)  26(26)   2(28)   X(28)   X(28)   X(28)
PORTLAND ME    64  X   X( X)   5( 5)   X( 5)   X( 5)   X( 5)   X( 5)

CONCORD NH     34  X   9( 9)  68(77)   1(78)   X(78)   X(78)   X(78)
CONCORD NH     50  X   X( X)  37(37)   X(37)   X(37)   X(37)   X(37)
CONCORD NH     64  X   X( X)   7( 7)   X( 7)   X( 7)   X( 7)   X( 7)

BOSTON MA      34  X  18(18)  54(72)   X(72)   X(72)   X(72)   X(72)
BOSTON MA      50  X   X( X)  29(29)   X(29)   X(29)   X(29)   X(29)
BOSTON MA      64  X   X( X)   5( 5)   X( 5)   X( 5)   X( 5)   X( 5)

HYANNIS MA     34  X  19(19)  34(53)   X(53)   X(53)   X(53)   X(53)
HYANNIS MA     50  X   X( X)  12(12)   X(12)   X(12)   X(12)   X(12)
HYANNIS MA     64  X   X( X)   1( 1)   X( 1)   X( 1)   X( 1)   X( 1)

NANTUCKET MA   34  X  20(20)  26(46)   X(46)   X(46)   X(46)   X(46)
NANTUCKET MA   50  X   1( 1)   6( 7)   X( 7)   X( 7)   X( 7)   X( 7)
NANTUCKET MA   64  X   X( X)   1( 1)   X( 1)   X( 1)   X( 1)   X( 1)

PROVIDENCE RI  34  X  30(30)  39(69)   1(70)   X(70)   X(70)   X(70)
PROVIDENCE RI  50  X   2( 2)  28(30)   X(30)   X(30)   X(30)   X(30)
PROVIDENCE RI  64  X   X( X)   6( 6)   X( 6)   X( 6)   X( 6)   X( 6)

HARTFORD CT    34  2  39(41)  34(75)   X(75)   X(75)   X(75)   X(75)
HARTFORD CT    50  X   6( 6)  29(35)   X(35)   X(35)   X(35)   X(35)
HARTFORD CT    64  X   X( X)   6( 6)   X( 6)   X( 6)   X( 6)   X( 6)

MONTAUK POINT  34  4  42(46)  23(69)   X(69)   X(69)   X(69)   X(69)
MONTAUK POINT  50  X  11(11)  23(34)   X(34)   X(34)   X(34)   X(34)
MONTAUK POINT  64  X   1( 1)   6( 7)   X( 7)   X( 7)   X( 7)   X( 7)

NEW YORK CITY  34 10  59(69)   5(74)   X(74)   X(74)   X(74)   X(74)
NEW YORK CITY  50  X  30(30)   3(33)   X(33)   X(33)   X(33)   X(33)
NEW YORK CITY  64  X   5( 5)   1( 6)   X( 6)   X( 6)   X( 6)   X( 6)

NEWARK NJ      34  9  53(62)   5(67)   X(67)   X(67)   X(67)   X(67)
NEWARK NJ      50  X  21(21)   2(23)   X(23)   X(23)   X(23)   X(23)
NEWARK NJ      64  X   3( 3)   1( 4)   X( 4)   X( 4)   X( 4)   X( 4)

TRENTON NJ     34 15  45(60)   2(62)   X(62)   X(62)   X(62)   X(62)
TRENTON NJ     50  X  16(16)   X(16)   X(16)   X(16)   X(16)   X(16)
TRENTON NJ     64  X   2( 2)   X( 2)   X( 2)   X( 2)   X( 2)   X( 2)

ATLANTIC CITY  34 44  38(82)   X(82)   X(82)   X(82)   X(82)   X(82)
ATLANTIC CITY  50  1  42(43)   X(43)   X(43)   X(43)   X(43)   X(43)
ATLANTIC CITY  64  X   7( 7)   X( 7)   X( 7)   X( 7)   X( 7)   X( 7)

BALTIMORE MD   34 26   9(35)   X(35)   X(35)   X(35)   X(35)   X(35)

DOVER DE       34 54  20(74)   1(75)   X(75)   X(75)   X(75)   X(75)
DOVER DE       50  2  20(22)   X(22)   X(22)   X(22)   X(22)   X(22)
DOVER DE       64  X   2( 2)   X( 2)   X( 2)   X( 2)   X( 2)   X( 2)

ANNAPOLIS MD   34 35  10(45)   1(46)   X(46)   X(46)   X(46)   X(46)

WASHINGTON DC  34 26   7(33)   X(33)   X(33)   X(33)   X(33)   X(33)

OCEAN CITY MD  34 83   9(92)   X(92)   X(92)   X(92)   X(92)   X(92)
OCEAN CITY MD  50 43  26(69)   X(69)   X(69)   X(69)   X(69)   X(69)
OCEAN CITY MD  64  5   9(14)   X(14)   X(14)   X(14)   X(14)   X(14)

RICHMOND VA    34 57   1(58)   X(58)   X(58)   X(58)   X(58)   X(58)

NORFOLK NAS    34 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
NORFOLK NAS    50 71   X(71)   X(71)   X(71)   X(71)   X(71)   X(71)
NORFOLK NAS    64  6   X( 6)   X( 6)   X( 6)   X( 6)   X( 6)   X( 6)

NORFOLK VA     34 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
NORFOLK VA     50 84   X(84)   X(84)   X(84)   X(84)   X(84)   X(84)
NORFOLK VA     64 10   X(10)   X(10)   X(10)   X(10)   X(10)   X(10)

GREENSBORO NC  34  4   X( 4)   X( 4)   X( 4)   X( 4)   X( 4)   X( 4)

RALEIGH NC     34 12   1(13)   X(13)   X(13)   X(13)   X(13)   X(13)

CAPE HATTERAS  34 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
CAPE HATTERAS  50 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
CAPE HATTERAS  64 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)

CHARLOTTE NC   34  3   X( 3)   X( 3)   X( 3)   X( 3)   X( 3)   X( 3)

MOREHEAD CITY  34 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
MOREHEAD CITY  50 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
MOREHEAD CITY  64 14   X(14)   X(14)   X(14)   X(14)   X(14)   X(14)

WILMINGTON NC  34 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)
WILMINGTON NC  50 99   X(99)   X(99)   X(99)   X(99)   X(99)   X(99)

MYRTLE BEACH   34  3   X( 3)   X( 3)   X( 3)   X( 3)   X( 3)   X( 3)

$$
FORECASTER BROWN                                                    
</pre>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/08/new-noaanhc-for-irene-show-increased-chance-of-high-speed-winds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>photos.danwin.com: My new portfolio site in HTML5, with responsive CSS</title>
		<link>http://danwin.com/2011/06/photos-danwin-com-my-new-portfolio-site-in-html5-with-responsive-css/</link>
		<comments>http://danwin.com/2011/06/photos-danwin-com-my-new-portfolio-site-in-html5-with-responsive-css/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 04:14:32 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[visuals]]></category>
		<category><![CDATA[works]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1689</guid>
		<description><![CDATA[After trying too hard to rewrite my really old Flash gallery as a jQuery plugin, I thought &#8220;to hell with it&#8221; and decided to join the one-pager trend: http://photos.danwin.com. I have to say, this was one of the more pleasant&#8230; <a href="http://danwin.com/2011/06/photos-danwin-com-my-new-portfolio-site-in-html5-with-responsive-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After trying too hard to rewrite my <a href="http://danwin.com/depgal-a-pretty-flash-photo-gallery/">really old Flash gallery</a> as a jQuery plugin, I thought &#8220;to hell with it&#8221; and decided to join the one-pager trend: <a href="http://photos.danwin.com">http://photos.danwin.com</a>. I have to say, this was one of the more pleasant site-designing jobs I&#8217;ve done in awhile. I&#8217;m going to try to limit my sites to one-page or fewer from here on out.</p>
<div id="attachment_1695" class="wp-caption aligncenter" style="width: 650px"><a href="http://photos.danwin.com"><img src="http://danwin.com/words/wp-content/uploads/2011/06/Screen-shot-2011-06-23-at-12.23.39-AM-640x508.png" alt="photos.danwin.com" title="photos.danwin.com screenshot" width="640" height="508" class="size-large wp-image-1695" /></a><p class="wp-caption-text">photos.danwin.com</p></div>
<p>I started with a HTML5 template from <a href="http://initializr.com/" title="Initializr - Start your HTML5 project in 15 seconds!">initializr.com</a> and then tacked on the <a href="http://cssgrid.net/">1140 CSS grid sheet</a>, a fluid framework.</p>
<p>As far as Javascript goes, besides jQuery, I&#8217;m using Ben Alman&#8217;s <a href="http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/" title="Ben Alman &raquo; jQuery throttle / debounce &raquo; Examples &raquo; Throttle">throttle-debounce plugin</a>, Leandro Vieira&#8217;s <a href="http://leandrovieira.com/projects/jquery/lightbox/" title="jQuery lightBox plugin">lightbox plugin</a>, and Ariel Flesler&#8217;s <a href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html" title="Ariel Flesler: jQuery.ScrollTo">scrollTo plugin</a>  for the simple interaction bits.</p>
<p>It&#8217;s pretty rudimentary in terms of code sophistication&#8230;I haven&#8217;t yet decided how to lazy-load the images while still providing a full page for non-JS users. I think I&#8217;ll end up tacking on backbone.js and figuring out a JSON structure to load in the &#8220;galleries&#8221;. So, for now, deal with loading some 100+ images all at once from S3&#8230;</p>
<p>To me, it&#8217;s an improvement over the typical slideshow galleries in which only one image at a time is shown. Maybe it&#8217;s because I don&#8217;t have enough <a href="http://www.boston.com/bigpicture/">Big Picture show-stoppers</a> to justify displaying every photo as full-screen. But I think there&#8217;s some artistic room in manually arranging the images as a collage and purposefully deciding the size of each image in relation to the others.</p>
<p>The best part is that with the <a href="http://cssgrid.net">1140 grid system</a>, not only was designing for variable-width desktop browsers (and placing the images) a breeze&#8230;the site works very well on the iPad and passably well on the iPhone&#8230;and I barely even left Google Chrome on my Mac during the whole development process.</p>
<p>Now I just have to get some better photos. And maybe think the typography a little more&#8230;Meanwhile, <a href="http://photos.danwin.com">check it out</a>:</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/06/photos-danwin-com-my-new-portfolio-site-in-html5-with-responsive-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reactions to Osama bin Laden&#8217;s death: Female and non-U.S. residents more ambivalent. Via the NYT Reactions Matrix</title>
		<link>http://danwin.com/2011/05/osama-bin-laden-reactions-revisited-nyt/</link>
		<comments>http://danwin.com/2011/05/osama-bin-laden-reactions-revisited-nyt/#comments</comments>
		<pubDate>Mon, 09 May 2011 07:25:22 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[works]]></category>
		<category><![CDATA[9/11]]></category>
		<category><![CDATA[new york times]]></category>
		<category><![CDATA[Osama bin Laden]]></category>
		<category><![CDATA[visualizations]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1661</guid>
		<description><![CDATA[This (totally not-double-checked) analysis is a riff off of the excellent New York Times visualization (The Death of a Terrorist: A Turning Point?) of how people reacted to Osama bin Laden&#8217;s death. In the days following the news, the Times&#8230; <a href="http://danwin.com/2011/05/osama-bin-laden-reactions-revisited-nyt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/zokuga/5678700523/" title="Obama 1, Osama 0 by Dan Nguyen @ New York City, on Flickr"><img src="http://farm6.static.flickr.com/5028/5678700523_cdc8ae185b_z.jpg" width="640" height="427" alt="Obama 1, Osama 0"></a></p>
<p>This (totally not-double-checked) analysis is a riff off of the excellent New York Times visualization (<a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com">The Death of a Terrorist: A Turning Point?</a>) of how people reacted to Osama bin Laden&#8217;s death. In the days following the news, the Times asked online readers to not only write their thoughts on bin Laden&#8217;s killing, but put a mark on a scatterplot graph that best described their reaction. </p>
<p>The Times used the data to show the continuum of reactions from everyone who participated. I wanted to see how reactions differed across geographical location and gender.</p>
<div class="image">
	<a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com"><br />
	<img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/osama-reaction-nyt.jpg" alt="NYT reaction graph" /><br />
	</a>
</div>
<p><a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com">The Times collected about 13,000 reactions</a> before closing it down. Besides the nature and content of reaction, users had the choice of leaving their names and geographical areas.
</p>
<p><a href="http://www.propublica.org/nerds/item/using-google-refine-for-data-cleaning" title="Chapter 1. Using Google Refine to Clean Messy Data - ProPublica">I used Google Refine</a> to quickly sort out the geographic locations (which varied from zip codes, to city/state, to neighborhoods, such as &#8220;Upper East Side&#8221;). Gender was not a checkbox in the NYT&#8217;s form, so I used Refine to sort based on first names. More details in the <a href="#methodology">methodology section</a>.</p>
<h3>Conclusion</h3>
<p>The conclusion my totally-unscientific analysis came to: Among <strong>all NYT website users</strong>, there was general moral approval and optimism for killing bin Laden. This did not vary significantly among U.S. citizens, whether they were from the cities attacked on Sept. 11 or elsewhere. </p>
<p>However, <strong>non-U.S. NYT-website-users were less supportive of the action</strong>. This gap of moral approval also exists <strong>between male and female</strong> NYT-website-users and at roughly the same magnitude (about 10 points).
</p>
<p>There wasn&#8217;t much variation in terms of how significant NYT-website-users believed OBL&#8217;s death would be. All demographic groups averaged about 60 (out of 100) in terms of how significant they rated OBL&#8217;s death in the war on terror.</p>
<p>In case you&#8217;re wondering: the <strong>260 non-U.S.-female</strong> respondents averaged a <strong>43 in positivity</strong>, which is a whole step below the average female response. <strong>U.S. females (2,270 of them)</strong>, averaged a <strong>52</strong>, compared to the <strong>6,059 U.S. males who averaged a 65</strong>.</p>
<h3>Data</h3>
<p>I&#8217;ll just get right to the results tables.</p>
<p>The original graph was arranged so that its x-axis represented how positive users felt about OBL&#8217;s death and the y-axis represented how significant of an impact they thought it would have on the war on terror. </p>
<p>So, someone who thought that  OBL&#8217;s demise was very good news and would have a strong impact on the war would be in the top right quadrant. Those who thought it was a bad deed, and would amount to nothing, would be in the bottom left. In the scatterplot, darker points correspond to more users with the same type of reaction.</p>
<p>I have two sections of tables. The first section consists of the basic numbers: The count of users, the average positivity rating (from 0 to 100) and the average significance rating.
</p>
<p>The second section consists of visualizations. The first is a scatterplot similar to the <a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com">NYT&#8217;s original graphic</a>, with less granularity. The second and third plot positivity and significance ratings, respectively, on the x-axis, with the y-axis showing the relative popularity of each rating.</p>
<p>The most interesting graph is the female respondents&#8217;: it was the only one in which the most-positive rating did not garner the most respondents. It appears that the most popular choice was on-the-fence.</p>
<p>&nbsp;</p>
<style>	
table.otr td{
		vertical-align: middle;
}
</style>
<table class="otr">
<tr>
<th>Group</th>
<th>Number</th>
<th>Average Positivity</th>
<th>Average Significance</th>
</tr>
<tr>
<td>All</td>
<td>13864</td>
<td>60.23</td>
<td>61.04</td>
</tr>
<tr>
<td>Males</td>
<td>7067</td>
<td>64.01</td>
<td>62.07</td>
</tr>
<tr>
<td>Females</td>
<td>2580</td>
<td>51.81</td>
<td>60.08</td>
</tr>
<tr>
<td>U.S.</td>
<td>11537</td>
<td>61.28</td>
<td>61.45</td>
</tr>
<tr>
<td>Outside U.S.</td>
<td>1820</td>
<td>53.80</td>
<td>59.06</td>
</tr>
<tr>
<td>U.S. non-<span class="caps">NYC</span>/DC</td>
<td>9191</td>
<td>61.28</td>
<td>61.28</td>
</tr>
<tr>
<td><span class="caps">NYC</span></td>
<td>1978</td>
<td>61.15</td>
<td>62.18</td>
</tr>
<tr>
<td>Washington DC</td>
<td>368</td>
<td>62.07</td>
<td>61.74</td>
</tr>
</table>
<h3>Graphs</h3>
<p>A quick note: I was not as adept as the NYT at making my scatterplot more discrete and readable. The darkness of each pixel is relative to the highest respondent count in that particular group. So, the female scatterplot looks to be denser than the others, when what probably happened was that the responses were more evenly spread out. </p>
<table  class="otr">
<tr>
<th>Group</th>
<th>Scatterplot</th>
<th>Distribution of Positivity</th>
<th>Distribution of Significance</th>
</tr>
<tr>
<td>All</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/All.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:MHEEHHEEEHbRMMMOOMRq&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,5,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:RHEEHEEHHORRROORORRT&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,7,25" alt="" /></td>
</tr>
<tr>
<td>Males</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/Males.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:JHEEEEEEEEWROMMOOORx&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,4,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:REEEHEEHHMRTRRORRRRT&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,7,25" alt="" /></td>
</tr>
<tr>
<td>Females</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/Females.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:OJHHJJHHHJgTOJJMJJMW&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,6,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:OEEHHHEHJRRORORROROO&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,6,25" alt="" /></td>
</tr>
<tr>
<td>U.S.</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/U_S_.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:JHEEHHEEEHbRMMMOOMRq&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,4,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:OEEEHEEHHORTRRORORRR&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,6,25" alt="" /></td>
</tr>
<tr>
<td>Outside U.S.</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/Outside_U_S_.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:TMHHHHEHHHYRMJJMJOOg&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,8,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:WJEHHEEEHOOMOMJOORTW&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,9,25" alt="" /></td>
</tr>
<tr>
<td>U.S. non-<span class="caps">NYC</span>/DC</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/U_S__non_NYC_DC.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:JHEEHHEEHHbRMMMOOMRq&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,4,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:OEEEHEEHHORTRRORORRR&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,6,25" alt="" /></td>
</tr>
<tr>
<td><span class="caps">NYC</span></td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/NYC.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:MHEEHEEEEHgRMMJOMMOs&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,5,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:REEEHECHHMRRRRORRRRT&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,7,25" alt="" /></td>
</tr>
<tr>
<td>Washington DC</td>
<td><img src="http://danwin-files.s3.amazonaws.com/projects/nyt-obl-reactions/graphs/Washington_DC.png" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:JECHEEEHEEYYTOMJMMRn&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,4,25" alt="" /></td>
<td><img src="http://chart.apis.google.com/chart?chbh=6,1&amp;chd=s:OEHCMCCHHRTTRRRMRWJR&amp;cht=bvs&amp;chs=150x150&amp;chxr=0,6,25" alt="" /></td>
</tr>
</table>
<h3>Caveats</h3>
<p>
	In my summary of conclusions section, I was careful to say &#8220;NYT-website-users.&#8221; The NYT reactions graph is not a random sampling of the population, or of even the NYT&#8217;s audience. It is a <a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com">feature</a> accessible only to web-users, which &ndash; if the Internet is still stereotypically male-dominated &ndash; might account for the high male-to-female ratio.
</p>
<p>
	The reactions feature was a passive one, in that onus was on the readers to actually interact with the graphic <strong>and</strong> fill out a form. So this would seem to filter out most of the apathetic &ndash; or busy &ndash; crowd. Moreover, the NYT team removed any comments that were off-topic, trolling, or strongly inappropriate&#8230;so anyone who is driven to cuss when the topic is bin Laden has probably been filtered out.
</p>
<p>I also think the nature of the graphic, having users pick out a point out of 10,000 (or so), might naturally have them gravitate towards the axes and midpoints. For example. someone might verbalize their reaction as &#8220;Meh, neither happy nor sad&#8221; and pick the exact midpoint, when they&#8217;re really more of a 4 or 6. Or, someone who is really happy that bin Laden is dead automatically goes for the farthest right spot because anything less than the highest positivity scale would indicate some kind of partial sympathy for bin Laden. Each scatterplot graph reflects this, with the darker spots collecting around the extremes.</p>
<p>And if you want to be part of the &#8220;NYT&#8217;s a bunch of liberal-brie-eaters&#8221; crowd, then it&#8217;s possible that the entire respondent base is slanted leftwards politically. I thought it would be interesting to see if results varied by red and blue states, but I think that a red-state fan of the NYT is probably not much different than a blue-state fan. And, it would&#8217;ve have taken way more time to sort out by state.</p>
<p>	So with that said, this survey is not at all an accurate reflection of the general population, compared to a general poll. Still, it&#8217;s interesting to see that even within this select sample group, there is a large disparity between males and females, and U.S. and non-U.S. But again, we can&#8217;t really make any sweeping generalizations, such as: &#8220;Women are less positive about killing&#8221; or that &#8220;Foreigners are against American unilateral raids.&#8221; without prefacing it with &#8220;Women who use the New York Times&#8217; website and who are opinionated enough to participate in their interactive graphic are&#8230;&#8221;</p>
<p><a name="#methodology"></a></p>
<h3>Methodology</h3>
<p>
	I used <a href="http://code.google.com/p/google-refine/">Google Refine</a> to quickly cluster around geographic locations and first names. To decide whether a user was in the U.S. or not, I used regular expressions to quickly find all the location entries with postal or AP-style state abbreviations. To filter for NYC users, I used regular expressions that looked for &#8220;NY&#8221; and rejected any that specifically stated a non-NYC city, such as Poughkeepsie. And I also just did a search for all well-known NYC neighborhoods. Finding DC was mostly just looking for &#8220;DC&#8221;
</p>
<p>Gender was a little bit trickier. I found the easiest way was to Google for a list of the most common male and female names and do a large regular expression to filter for them. I rejected names that could belong to either gender, such as &#8220;Pat&#8221; or &#8220;Kim&#8221;. And for names that I wasn&#8217;t sure of, I just didn&#8217;t include them in the sample, so this means foreign and rare names weren&#8217;t part of the mix.</p>
<p>For both geography and names, I ended up rejecting most values that didn&#8217;t have a count of at least 2 or 3. So the upshot is, people with common names, like &#8220;John&#8221;, are more represented than those with relatively uncommon names, like &#8220;Leopold.&#8221;</p>
<p>I used <a href="http://www.imagemagick.org/RMagick/doc/info.html">RMagick</a> to generate the scatterplots and <a href="http://code.google.com/apis/chart/image/docs/gallery/bar_charts.html">Google Image Charts API</a> for the bar graphs.</p>
<p><a href="http://www.propublica.org/nerds/item/using-google-refine-for-data-cleaning" title="Chapter 1. Using Google Refine to Clean Messy Data - ProPublica">I&#8217;ve said it before</a> and I&#8217;ll say it again, for geeky data analysis, <a href="http://code.google.com/p/google-refine/" title="">Google Refine</a> is a godsend.</p>
<p>A sidenote: The <a href="http://www.csmonitor.com/Innovation/Horizons/2011/0503/How-Osama-bin-Laden-s-death-sparked-a-fake-Martin-Luther-King-quote" title="How Osama bin Laden's death sparked a fake Martin Luther King quote - CSMonitor.com">Jessica Dovey quote, misattributed to Martin Luther King Jr.,</a> &#8220;I will mourn the loss of thousands of precious lives, but I will not rejoice in the death of one, not even an enemy,&#8221; made an appearance 42 times in the <a href="http://www.nytimes.com/interactive/2011/05/03/us/20110503-osama-response.html" title="Death of Osama Bin Laden: How Significant a Moment? - Interactive Feature - NYTimes.com">NYT response matrix</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/05/osama-bin-laden-reactions-revisited-nyt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Go to aGogh for museums, arts, culture listings</title>
		<link>http://danwin.com/2011/04/go-to-agogh-for-museums-arts-culture-listings/</link>
		<comments>http://danwin.com/2011/04/go-to-agogh-for-museums-arts-culture-listings/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 05:17:42 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1642</guid>
		<description><![CDATA[So I&#8217;ve finally finished my update to my iheartnymuseums.com listing&#8230;http://agogh.com&#8230;though it&#8217;s not quite finished. But it&#8217;s good enough for now for people to get some use out of it. Same idea as before: an easy to read list of cultural&#8230; <a href="http://danwin.com/2011/04/go-to-agogh-for-museums-arts-culture-listings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve finally finished my update to my iheartnymuseums.com listing&#8230;<a href="http://agogh.com">http://agogh.com</a>&#8230;though it&#8217;s not quite finished. But it&#8217;s good enough for now for people to get some use out of it. </p>
<p>Same idea as before: an easy to read list of cultural venues in the city. But I&#8217;ve added profile pages for all the venues and a sampling of exhibition listings. After viewing more than 200 homepages, I&#8217;m even more convinced that it&#8217;s a huge pain to just serendipitously find what&#8217;s going on and when (other than at the most popular, obvious attractions) because of how different each place&#8217;s web presence is.</p>
<p>This site is an attempt to make it all a little more uniform, whether you want to see the latest exhibits in the city or what&#8217;s free today. Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/04/go-to-agogh-for-museums-arts-culture-listings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NICAR 2011 wrapup</title>
		<link>http://danwin.com/2011/02/nicar-2011-wrapup/</link>
		<comments>http://danwin.com/2011/02/nicar-2011-wrapup/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 14:11:42 +0000</pubDate>
		<dc:creator>Dan Nguyen</dc:creator>
				<category><![CDATA[works]]></category>
		<category><![CDATA[journalism]]></category>
		<category><![CDATA[NICAR]]></category>

		<guid isPermaLink="false">http://danwin.com/?p=1622</guid>
		<description><![CDATA[Just came back from an inspiring week at the National Institute for Computer-Assisted Reporting in Raleigh, NC. Of all the journalism conferences I&#8217;ve been to, this one had the most to learn from and the most attendees excited to learn.&#8230; <a href="http://danwin.com/2011/02/nicar-2011-wrapup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://danwin.com/2011/02/nicar-2011-wrapup/raleighwebart/" rel="attachment wp-att-1624"><img src="http://danwin.com/words/wp-content/uploads/2011/02/RaleighWebArt.gif" alt="" title="RaleighWebArt" width="555" height="128" class="aligncenter size-full wp-image-1624" /></a></p>
<p>Just came back from an inspiring week at the <a href="http://www.ire.org/training/conference/CAR11/">National Institute for Computer-Assisted Reporting in Raleigh, NC</a>. Of all the journalism conferences I&#8217;ve been to, this one had the most to learn from and the most attendees excited to learn. There was real discussion about news apps being its own form of story-telling and art and not just uploading a bunch of numbers as HTML.</p>
<p>Chrys Wu has a <a href="http://www.chryswu.com/blog/">compilation of the tipsheets and the highly technical tutorials</a>. It&#8217;s a great trove for anyone &ndash; journalists or not &ndash; wanting to learn how to collect and process data and build powerful news applications. Some of my favorites, for their step-by-step nature: Jacob Fenton&#8217;s <a href="http://cwu.me/g6MGsF">R tutorial</a>,  David Huynh&#8217;s detailed guide on his <a href="http://davidhuynh.net/spaces/nicar2011/tutorial.pdf">Google Refine</a>, Andy Boyle&#8217;s on <a href="http://cwu.me/i6TLy9">setting up Varnish</a>, and Timothy Barmann&#8217;s walkthrough of Javascript mapping. My colleague Jeff Larson shows off his own Javascript skills with this <a href="http://thejefflarson.github.com/nicar-mvc/docs/mvc.html">MVC framework</a>.</p>
<p>I led a couple of sessions. One boiled down to basically, use Firebug, which you can pretty much glean from a tutorial I wrote for ProPublica on how <a href="http://www.propublica.org/nerds/item/reading-flash-data">I grabbed the data from drugmaker Cephalon&#8217;s Flash site</a>. I wrote another Ruby tutorial, <a href="http://danwin.com/static/nicar-code-tutorial/beginners.html">starting from &#8220;Hello World&#8221; to building a Foursquare/Google Maps mashup</a>&#8230;that was almost doable in an hour-session had I been better prepared with presentation materials.</p>
<p>One reason to try learning how to code now is that the number of teaching resources has never been more abundant. The NICAR resources <a href="http://www.chryswu.com/blog/">collected on Chrys&#8217;s blog is more proof of this</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://danwin.com/2011/02/nicar-2011-wrapup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

