<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Computers are for People</title>
	
	<link>http://www.swegler.com/becky/blog</link>
	<description />
	<lastBuildDate>Wed, 16 May 2012 12:18:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/computersareforpeople" /><feedburner:info uri="computersareforpeople" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The Demise of Government-Created Statistical Data?</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/FYXN_6UGQ9M/</link>
		<comments>http://www.swegler.com/becky/blog/2012/05/11/the-demise-of-government-created-statistical-data/#comments</comments>
		<pubDate>Fri, 11 May 2012 20:23:20 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[On the Job]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=962</guid>
		<description><![CDATA[Like most data people, I prefer order and logic. So it was a huge shock when I joined a federal budget research organization and started learning about the orderly and logical process by which the U.S. government creates an annual budget. An orderly and logical process that Congress mostly disregards. Really, the whole politicized debacle [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/05/359057531_d01750a0e0.jpg" rel="lightbox[962]" title="Washington Monument"><img class="wp-image-963 alignright" title="Washington Monument" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/05/359057531_d01750a0e0.jpg" alt="Washington Monument" width="300" height="400" /></a>Like most data people, I prefer order and logic. So it was a huge shock when I joined a federal budget research organization and started learning about the orderly and logical process by which the U.S. government creates an annual budget. An orderly and logical process that Congress mostly disregards.</p>
<p>Really, the whole politicized debacle offends my sensibilities as a citizen and as a data professional.</p>
<p>Furthermore, the recent zeal for budget cuts has resulted in budget cuts that affect our ability to make smart budget cuts. Specifically, I’m talking about attacks on government-created statistical data—data that’s* used by lawmakers, social service organizations, and businesses to make decisions and allocate increasingly-scarce resources.</p>
<p>Two examples I’ve written about recently:</p>
<ul>
<li><a title="Sunlight Foundation: Is Federal Spending Transparency on the Decline?" href="http://sunlightfoundation.com/blog/2012/05/02/federal-spending-transparency-on-the-decline/" target="_blank">Is Federal Spending Transparency on the Decline?</a>: a guest post for the <a title="Sunlight Foundation" href="http://sunlightfoundation.com/" target="_blank">Sunlight Foundation’s</a> blog about the demise of the Consolidated Federal Funds Report and why that makes it harder to understand federal spending.</li>
<li><a title="National Priorities Project: American Community Survey Under Attack" href="http://nationalpriorities.org/blog/2012/05/10/american-community-survey-under-attack/" target="_blank">American Community Survey Under Attack</a>: the House recently passed a spending bill that prohibits the Department of Commerce from funding the American Community Survey (ACS). The yearly ACS replaced the decennial census long-form questionnaire, and its data helps* state and local governments determine how to distribute funds, among other things. See <a title="NYT blog: Annual Census at Risk in House Budget Bill" href="http://thecaucus.blogs.nytimes.com/2012/05/11/annual-census-at-risk-in-house-budget-bill/" target="_blank">here</a>, <a title="Business Week: Killing the American Community Survey Blinds Business" href="http://www.businessweek.com/articles/2012-05-10/killing-the-american-community-survey-blinds-business" target="_blank">here</a>, and <a title="Civil Statistician: In Defense of the American Community Survey" href="http://civilstat.com/?p=319" target="_blank">here</a> for more information about the widespread usefulness of the ACS.</li>
</ul>
<p>Of course, order and logic sometimes need to be tempered with a dose of pragmatism. But when our governing body is governed almost entirely by short-term thinking, we should think about not electing them again.</p>
<p>*<a title="The Guardian: Data Are or Data Is?" href="http://www.guardian.co.uk/news/datablog/2010/jul/16/data-plural-singular" target="_blank">Language evolves!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/05/11/the-demise-of-government-created-statistical-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/05/11/the-demise-of-government-created-statistical-data/</feedburner:origLink></item>
		<item>
		<title>Strata 2012: Making Data Work</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/cNj_MdWxZYI/</link>
		<comments>http://www.swegler.com/becky/blog/2012/04/05/strata-2012-making-data-work/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 02:33:25 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=941</guid>
		<description><![CDATA[It&#8217;s been over a month since Strata 2012. Lest they meet the same fate as scribbles from conferences long past, I&#8217;m putting my notes here instead of leaving them in whatever notebook I happened to be toting around that week. The biggest a-ha moment, and one that I&#8217;ll be writing about in the future, came [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been over a month since <a title="Strata 2012 Conference" href="http://strataconf.com/strata2012">Strata 2012</a>. Lest they meet the same fate as scribbles from conferences long past, I&#8217;m putting my notes here instead of leaving them in whatever notebook I happened to be toting around that week.</p>
<p>The biggest a-ha moment, and one that I&#8217;ll be writing about in the future, came from Ben Goldacre&#8217;s keynote, when he compares big data practitioners to drunks looking for car keys only where the light shines. We focus on the data that&#8217;s available without asking, &#8220;what&#8217;s missing?&#8221; Plus, it&#8217;s fun to hear someone with a British accent say &#8220;blobogram.&#8221;</p>
<p><object width="600" height="335" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/AK_EUKJyusg?version=3&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed width="600" height="335" type="application/x-shockwave-flash" src="http://www.youtube.com/v/AK_EUKJyusg?version=3&amp;hl=en_US" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p><span id="more-941"></span></p>
<h3>Getting Started With Hadoop</h3>
<p>This was a three hour overview of what Hadoop is, how its two components—Hadoop Distributed Filesystem (HDFS) and MapReduce—work, and the tools that round out its ecosystem. Sara from Cloudera explained the details clearly and in plain English, using language that could be understood by technologists of all stripes, not just big data geeks.</p>
<ul>
<li>Hadoop gives you scalability and the ability to handle failure</li>
<li>In return, you need to rethink your data processing algorithms</li>
<li>Writing MapReduce jobs directly is like coding assembly. Hadoop ecosystem has tools that help you create, schedule, and run jobs, query HDFS, move data between HDFS and other types of storage, and aggregate files for Hadoop input</li>
</ul>
<h3>The Craft of Data Journalism</h3>
<p>This three hour sessions was run by two folks from The Guardian (one is Simon Rogers), who demonstrated some of their data-driven projects and shared some of their tools. The Guardian’s data stories are blogged here: <a title="The Guardian Datablog" href="This three hour sessions was run by two folks from The Guardian (one is Simon Rogers), who demonstrated some of their data-driven projects and shared some of their tools. The Guardian’s data stories are blogged here: http://www.guardian.co.uk/news/datablog">http://www.guardian.co.uk/news/datablog</a>.</p>
<ul>
<li>Google spreadsheets: crucial because they’re free, easy, can be used as a backend, and are easy to mashup</li>
<li>Google Fusion tables: used to create maps from location data. Pop-ups that appear for each data point on the map are customizable</li>
<li>Google refine: for data cleanup</li>
<li>Scraperwiki: to pull data from websites</li>
<li><a title="Guardian-created list of links to different boundaries" href="bit.ly://fusionborderlinks">Bit.ly://fusionborderlinks</a>: Guardian-created list of links to different boundaries (can be combined with Fusion table location data to add boundaries to maps)</li>
<li>Presenters reported that ~80% of their time is getting, cleaning, and verifying the data—not creating the visualizations. This is consistent with my experience and also verifies that pre-cleaned &amp; formatted data could be useful to journalists</li>
</ul>
<h3>Wednesday Keynotes</h3>
<p>Keynotes were a series of short presentations. Favorite quotes:</p>
<ul>
<li>Systems thinking is the science in data science</li>
<li>Store raw data and project schemas onto it dynamically – Doug Cutting, Cloudera</li>
<li>More, messy data has greater value than smaller, cleaner data. – Dave Campbell, Microsoft</li>
<li>Problems confronting humanity: this is where big data needs to go – Mike Olson, Cloudera</li>
<li>Big data is most valuable when it tells us what we don’t know we don’t know (HT Donald Rumsfeld). Much more valuable than data puking onto dashboards – Avinash Kaushik , Market Motive</li>
<li>Big data can and should be used to find out what’s missing – Ben Goldacre, Bad Science</li>
<li>What data do we have that we aren’t using? What are we throwing away—especially things that could better help us quantify impact (web logs, eblast data, social media stats)</li>
</ul>
<h3>The Science of Visualization</h3>
<ul>
<li>When creating visualizations exploit the power of human visual processing</li>
<li>Humans are slow are mental math (e.g., adding things up in tables) but fast visually</li>
<li>Therefore, use visual pop-outs when possible (e.g., coloring numbers that should stand out)</li>
<li>Data view: exploit bi-directional processing</li>
<li>Data stories: show people where to look</li>
<li>Purpose of visualizations is to speed up the cycle of analysis</li>
<li>Some best practices (get the slides for the complete overview):</li>
<ul>
<li>If there are 3 variables, code the 3rd with size, not with color</li>
<li>People see area, not height</li>
<li>Size is ordinal; don’t use it to encode non-ordinal data</li>
<li>Color is okay of ordinal data but works even better for non-ordinal data (as long as there aren’t too many values, up to 20 or so)…takes advantage of the visual pop-out</li>
<li>Nominal: if there are over 20 items, colors become less effective, but shapes can work (good example is the animal graph in Tufte’s Beautiful Evidence)</li>
<li>Small sizes make colors and shapes much less effective</li>
<li>Although heatmaps are currently popular, they are often not the best choice for quantitative data</li>
<li>If heatmap is being used to identify outliers, that’s not really quantitative data, so it’s okay</li>
<li>But otherwise, it’s often best to use size instead of heatmaps (especially filled maps)</li>
<li>Stephen Frew’s <em>Show me the Numbers</em>: accessible and practical advice for getting started</li>
</ul>
</ul>
<h3>Effective Data Visualization</h3>
<p>Although this session yielded some useful information, it was too focused on the presenter’s company, with not enough information about general best practices. That said, the company itself (DataMarket) is interesting—they are trying to be the Google of datasets. You find a dataset on their site, choose it, and are immediately presented with a visualization. Furthermore, people can now upload their own data to the site.</p>
<p>In other words, they have solved the problem of creating generic visualization code that will work with any dataset.</p>
<ul>
<li>DataMarket uses a Python/Django/Postgres stack</li>
<li>In 2010, they reviewed 100+ libraries to see which met their 5 requirements for the site (compatibility for all major browsers, server-side rendering, vector output, iOS compatibility, full control). Protovis was the choice, although it lacked server-side rendering and doesn’t work with IE 7/8 (due to SVG output)</li>
<li>DataMarket developed a server-side solution using node.js, svglib, and some other stuff to transform SVG to PDF for rendering</li>
<li>They created a shim for IE 7/8 that captures Protovis SVG output and transforms it to VML (IE 7/8 = ~20% of their users)</li>
<li>Although Protovis is no longer being actively developed, there is still an active community. DataMarket’s strategy is to stick with Protovis until more IE users are on 9 and then switch to D3</li>
</ul>
<h3>Data Visualization for a Better World</h3>
<p>This was a Bay-area meetup group and not part of Strata. Really great event—Jake Porway, the founder of <a title="Data Without Borders" href="http://datawithoutborders.cc/">Data Without Borders</a>, is smart, humble, and passionate about matching data scientists with social and non-profit orgs.</p>
<ul>
<li>NYT R&amp;D Twitter sharing visualization front-end is JS and processing. Python to get data and MongoDB to store</li>
<li>2nd viz demoed uses OpenPaths.cc and webgl</li>
<li>On their own, hackers will develop apps that solve their own programs. Therefore, hackathons need to include those who will use the apps to change the world (<em>i.e.</em>, social sector orgs)</li>
<li>“Unglamorous” things that are easy for data scientists to do can be transformative for social service orgs.</li>
</ul>
<h3><span style="font-size: 15px;">Video Graphics: Engaging and Informing</span></h3>
<ul>
<li>Video lets you bring a human persona to the data</li>
<li>On articulating data into stories:</li>
<ul>
<li>It goes beyond finding the x &amp; y coordinates that match. Must engage people in the insights</li>
<li>The story is the concept, not the characters</li>
<li>Information doesn’t want to be free…it mostly wants to lie around. Don’t let your data lie around!</li>
<li>Don’t confuse insight with story</li>
<li>Find the “red thread” of story</li>
</ul>
<li>On showing multi-modal data:</li>
<ul>
<li>Words and pics need to be brought together</li>
<li>Cross the streams! Show AND tell. Pictures AND words. Data AND interpretation.</li>
<li>Don’t be afraid of entertainment and gloss</li>
</ul>
<li>Use the visual strengths of the medium</li>
<ul>
<li>Not everything needs to look like a diagram</li>
<li>Why bother with flat video graphics (e.g, a bunch of words &amp; numbers with narration)? People make these b/c they’re cheap to make, but a PowerPoint or PDF would be just as good.</li>
<li>Example of non-flat words: intro text to Star Wars movies.</li>
<li>Make things real</li>
</ul>
<li>Spread data socially</li>
<ul>
<li>Humor</li>
<li>Use a known expert</li>
<li>Video must be relevant to NOW (e.g., Crisis of Credit video)</li>
<li>Videos work well as an introduction to a subject</li>
</ul>
</ul>
<h3>From Predictive Modeling to Optimization</h3>
<ul>
<li>Predictive models don’t cause change!</li>
<li>We don’t pay enough attention to the process of using predictive model output to optimize</li>
<li>Traditional process (using insurance biz as an example)</li>
<ol>
<li>Objective: more money!</li>
<li>Levers: what variables you can tweak (policy prices, etc.)</li>
<li>Data</li>
<li>PhD-quality algorithm (actuaries)</li>
</ol>
<li>Need to rethink this process!</li>
<li>New process uses:</li>
<ol>
<li>Modeler/simulator to test what happens when you pull the levers</li>
<li>Optimizer: pulls levers over and over again until you reach the desired objective (replaces the PhD-quality algorithm)</li>
</ol>
<li>Think of an area where the optimization process hasn’t yet been done. Good example is marketing:</li>
<ol>
<li>Objective: maximize lifetime value of customer</li>
<li>Levers: recommendation system, offers, discounts, customer care calls</li>
<li>Data. <strong>What data can you collect?</strong> That is the right question, not “what data do you have already.” In insurance example, presenter implemented random pricing for 6 months to get enough data to create the model.</li>
</ol>
<li>You need a causal dataset to create a good model. For example, Amazon doesn’t have one, so their recommendations tend to tell you things you already know about.</li>
<li>Look to the engineers! They have modeling/simulating/optimizing for decades, solving real-world problems</li>
</ul>
<h3>Visualizing Geo Data</h3>
<ul>
<li><em>Just Plot It</em> from Aaron Koblin is a helpful resource for map ideas</li>
<li>Processing creates beautiful data visualizations</li>
<li>TileMill is great for mapsslippy map tiles</li>
<li>Unfolding: glues together Processing and TileMill</li>
<li>Cartograms (not covered in the session) are useful for displaying quantities on maps</li>
<li>Unless you have training, do not choose your own colors for maps! Use Color Brewer.</li>
<li>Stats of the Union is an excellent example of an iPad mapping app</li>
<li>You don’t always need to use the traditional boundaries on a map. A good example is the United States of Craigslist, which displays data according to Craigslist regions.</li>
<li>Get Shapefiles at census.gov/geo/www/tiger</li>
<li>Pyshape: Python library for shapes</li>
<li>Add a spatial tree to your bad of tricks—helps maps render much faster. Rtree is one tool. Quick way to query and associate data with counties (on Github)</li>
<li>Choice of bin sizes for map colors change the story. See slides for a great example of this!</li>
<ul>
<li>Equal intervals are bad! Doesn’t take into account the way your data is structured.</li>
<li>Using quantiles is a reasonable first pass.</li>
</ul>
<li>Presenter (Jason Sundram of Where, Inc) has tweaked D3 choropleth code to make it interactive! See Github…</li>
<li>WebGL used to make the spinning globe thing</li>
<ul>
<li>Very cool, but probably not useful to an org that specializes in U.S. data only</li>
<li>Need &lt; 250,000 points</li>
<li>Cheat by binning (e.g., 72.123456 = 72.1)</li>
<li>Scale values</li>
</ul>
<li>Viz.runningwithdata.com/vgd</li>
<li>Bit.ly/Strata_vgd</li>
</ul>
<h3>Big Data for the Common Good</h3>
<ul>
<li>Jake Porway and Virginia Carlson</li>
<li>There are two kinds of government data:</li>
<ul>
<li>Data generated as a result of the government going about its business (e.g., logs of White House visitors). When Gov 2.0 folks talk about data, they are mostly talking about this.</li>
<li>“Designed” data. Created for the public (e.g., Census Bureau reports such as CFFR).</li>
</ul>
<li>The Designed Data is what social orgs often rely on for their business, but it is going away. For example, food banks can’t get good data about their local economic conditions and know where to provide services.</li>
<li>Foundations are asking for metrics. Organizations are sitting on tons of data. Result = funnel effect…more data coming in all the time, but the outgoing pipe remains the same size.</li>
<li>There is a gap between civic coders and community groups/leaders.</li>
<li>Something that may seem easy/trivial to a data scientist might be transformative to a non-profit</li>
<li>You can’t plan social programs without data any more than you could do it without a budget.</li>
<li>Virginia is pitching commercial data for the common good.</li>
<ul>
<li>Break down silos between data (e.g., gov), talent (e.g. Google), and social good (e.g., Unicef).</li>
<li>Example: Could Google tell the foodbank where searches for their services are coming from?</li>
</ul>
</ul>
<h3>Exploring the Stories Behind the Data</h3>
<ul>
<li>Cheryl Phillips, Seattle Times</li>
<li>Data’s increasing involvement in news stories doesn’t change the basics: you still need to tell who, what, when, why, how. Good example of this is NYT’s Faces of the Dead (casualties of war project)</li>
<li>Nutgraph…journalism term. 3rd or 4th paragraph in a story…the “why” that follows the lead</li>
<ul>
<li>The nutgraph shows the reader why he or she should care, so don’t put it too late in the story</li>
<li>Data in the story should support the nutgraph. Don’t plug in too many numbers.</li>
</ul>
<li>Visualizations also need a good lead-in and nutgraph</li>
<li>Narrative techniques apply. Are there patterns (e.g., chronologic, geographic)?</li>
<li>Images and visualizations allow you to use details without overwhelming the reader with the details in text.</li>
<li>However, too many details in a viz can be as boring as too many details in text.</li>
<li>Cheryl thinks visualizations should allow readers to annotate and share and encourages developers to get busy creating that feature.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/04/05/strata-2012-making-data-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/04/05/strata-2012-making-data-work/</feedburner:origLink></item>
		<item>
		<title>Protovis Visualization for Older IE</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/Q6ww2g-yTCs/</link>
		<comments>http://www.swegler.com/becky/blog/2012/03/01/protovis-visualization-for-older-ie/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 23:33:08 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=927</guid>
		<description><![CDATA[Two days ago, I posted my Flare visualizations—based on a Flash/Actionscript library&#8211;explaining that we can’t yet use the D3 visualization library because it outputs SVG, which isn’t supported by older versions of IE. The very next day, Hjalmar Gislasun of DataMarket gave a talk at O’Reilly’s Strata Conference. DataMarket faced the same problem back in [...]]]></description>
			<content:encoded><![CDATA[<p>Two days ago, I posted my <a title="Data Visualizations With Flare" href="http://www.swegler.com/becky/blog/2012/02/28/data-visualizations-with-flare/">Flare visualizations</a>—based on a Flash/Actionscript library&#8211;explaining that we can’t yet use the <a title="D3 visualization library" href="http://mbostock.github.com/d3/">D3 </a>visualization library because it outputs SVG, which isn’t supported by older versions of IE.</p>
<p>The very next day, <a title="Hjalmar Gislasun" href="http://hjalli.com/">Hjalmar Gislasun</a> of <a title="DataMarket" href="http://datamarket.com/">DataMarket</a> gave a talk at O’Reilly’s <a title="Strata Conference" href="http://strataconf.com/strata2012">Strata Conference</a>. DataMarket faced the same problem back in 2010 after reviewing over 100 visualization libraries and choosing <a title="Protovis" href="http://mbostock.github.com/protovis/">Protovis</a> (a predecessor of D3). Not wanting to exclude the 20% of the world still using IE 7/8, they <a title="DataMarket: protovis-msie" href="http://blog.datamarket.com/2011/06/22/protovis-support-internet-explorer-8/">developed protovis-msie</a>, a tool to convert Protovis SVG output to VML, a vector format understood by older browsers.</p>
<p>And…they <a title="Github: protovis-msie" href="https://github.com/DataMarket/protovis-msie">open sourced it</a>. So Protovis is now on the table for use at National Priorities Project. Thank you, DataMarket!</p>
<p>Like Flare, Protovis is no longer under active development. That said, it still has an active user community (unlike Flare). And the output won’t be Flash, so iOS is back on the table.</p>
<p>DataMarket’s strategy is to continue using Protovis until most IE users are on version 9 (which supports SVG) and then switch over to D3. It was refreshing to hear browser support strategies from people developing visualizations for commercial use; they don&#8217;t have the luxury of ignoring IE 8, which is tempting to do but not viable in the real world.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/03/01/protovis-visualization-for-older-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/03/01/protovis-visualization-for-older-ie/</feedburner:origLink></item>
		<item>
		<title>Data Visualizations with Flare</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/NY9tYSGcRKM/</link>
		<comments>http://www.swegler.com/becky/blog/2012/02/28/data-visualizations-with-flare/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 06:57:53 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[On the Job]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[budget]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=871</guid>
		<description><![CDATA[Two weeks ago, the White House released President Obama&#8217;s FY 2013 budget request. Using the numbers scrubbed by NPP&#8217;s crack research team, I created a few visualizations using the Actionscript/Flash-based Flare data visualization library. Flare was ideal because it includes sample code for a stacked area chart with tooltips&#8211;exactly what we wanted. I had some concerns [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago, the White House released President Obama&#8217;s FY 2013 budget request. Using the numbers scrubbed by NPP&#8217;s crack research team, I created a few visualizations using the Actionscript/Flash-based <a title="Flare: Data Visualization for the Web" href="http://flare.prefuse.org/">Flare data visualization library</a>.</p>
<p>Flare was ideal because it includes sample code for a stacked area chart with tooltips&#8211;exactly what we wanted. I had some concerns about the Flash output, but many of our website visitors use browsers that don&#8217;t support SVG (IE8), so tools like <a title="D3.js" href="http://mbostock.github.com/d3/">D3</a> aren&#8217;t an option just yet.</p>
<p>Here&#8217;s a preview of what we&#8217;ll include (not the final version).  The first example is built with normalized data:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_TaxRevenue_369118919"
			class="flashmovie"
			width="620"
			height="550">
	<param name="movie" value="http://www.swegler.com/becky/code/flare/TaxRevenue.swf" />
	<param name="flashvars" value="datafile=http://www.swegler.com/becky/code/flare/info/revenue-sources.txt" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.swegler.com/becky/code/flare/TaxRevenue.swf"
			name="fm_TaxRevenue_369118919"
			width="620"
			height="550">
		<param name="flashvars" value="datafile=http://www.swegler.com/becky/code/flare/info/revenue-sources.txt" />
	<!--<![endif]-->
		
<p>Apologies, but you need Flash to view this content.</p>
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>For the second example (total federal spending by category), we wanted to convey the overall size of the budget over time, so we didn&#8217;t normalize the data. As a result, the huge numbers caused some formatting issues, but it&#8217;s still an interesting story&#8211;especially the 2009 spike. Also note the rise in healthcare spending over time: 7% of the budget in 1976 and 25% in 2013.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_SpendingCategory_2115953831"
			class="flashmovie"
			width="750"
			height="600">
	<param name="movie" value="http://www.swegler.com/becky/code/flare/SpendingCategory.swf" />
	<param name="flashvars" value="datafile=http://www.swegler.com/becky/code/flare/info/budget-category.txt" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.swegler.com/becky/code/flare/SpendingCategory.swf"
			name="fm_SpendingCategory_2115953831"
			width="750"
			height="600">
		<param name="flashvars" value="datafile=http://www.swegler.com/becky/code/flare/info/budget-category.txt" />
	<!--<![endif]-->
		
<p>Apologies, but you need Flash to view this content.</p>
<p><a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Flare makes it easy to lay out the data and create the animated transitions, and after making a <a title="Flare tweaks" href="https://github.com/bsweger/Flare">few tweaks</a> to the Flare library and the stacked area sample code, I&#8217;m happy with the way these turned out.</p>
<p>That said, I&#8217;d be reluctant to use Flare again. It isn&#8217;t being actively developed, and there&#8217;s nowhere to turn for help when you get stuck. Visualizations are evolving, and the tools to create them&#8211;no matter how good they are&#8211;need to evolve too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/02/28/data-visualizations-with-flare/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/02/28/data-visualizations-with-flare/</feedburner:origLink></item>
		<item>
		<title>No Excuses for Ugly Excel Charts</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/pjGwq8Q8lu8/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 22:48:29 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[On the Job]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=816</guid>
		<description><![CDATA[2/2/2012: Corrected the revised bar chart by setting the horizontal axis minimum to zero. Thanks to Jon Peltier for catch. Excel remains the de-facto graphing tool at National Priorities Project. A simple chart is often the best way to convey information about federal spending and budgeting, and Excel is the common language among our researchers [...]]]></description>
			<content:encoded><![CDATA[<p><strong>2/2/2012: Corrected the revised bar chart by setting the horizontal axis minimum to zero. Thanks to <a title="Peltier Tech" href="http://peltiertech.com/WordPress/">Jon Peltier </a>for catch.</strong></p>
<p>Excel remains the de-facto graphing tool at National Priorities Project. A simple chart is often the best way to convey information about federal spending and budgeting, and Excel is the common language among our researchers and IT team.</p>
<p>Using Excel, however, is no excuse for ignoring style and the best practices of information display. So many organizations put out amazing, well-researched publications and then tack on default Excel graphs as an afterthought. But graphs are often what people look at first, and they deserve to be first-class citizens in the editing process.</p>
<p>I created some Excel chart templates for NPP, drawing on two sources for inspiration and practical advice: the classic <a title="The Visual Display of Quantitative Information" href="http://www.edwardtufte.com/tufte/books_vdqi">Visual Display of Quantitative Information</a> by Edward Tufte and <a title="The Wall Street Journal Guide to Information Graphics" href="http://www.amazon.com/Street-Journal-Guide-Information-Graphics/dp/0393072959">The Wall Street Journal Guide to Information Graphics</a> by Dona Wong.</p>
<p>Tufte is big on eliminating “unnecessary ink” that distracts from the information, and Wong advocates requiring the least amount of work on the reader’s part. With their advice in mind, I modified Excel’s default bar chart from this:</p>
<div id="attachment_820" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/horizontal-bar-default.png" rel="lightbox[816]" title="Excel bar chart - default"><img class="size-medium wp-image-820" title="Excel bar chart - default" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/horizontal-bar-default-500x318.png" alt="Excel bar chart - default" width="500" height="318" /></a><p class="wp-caption-text">Bar chart: Excel default</p></div>
<p>To this:</p>
<div id="attachment_866" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/02/horizontal-bar-modified.png" rel="lightbox[816]" title="Excel bar chart - modified"><img class="size-medium wp-image-866" title="Excel bar chart - modified" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/02/horizontal-bar-modified-500x317.png" alt="Excel bar chart - modified" width="500" height="317" /></a><p class="wp-caption-text">Bar chart: new template</p></div>
<ul>
<li>Smaller gap between bars</li>
<li>Don’t make readers guess the numbers; if possible, label the bars directly</li>
<li>Direct labeling means you don’t need the noisy gridlines or even the x-axis</li>
<li>Remove the y-axis tick marks for even more noise reduction</li>
<li>Get rid of those zeros by showing data in millions or billions</li>
<li>Make sure the entire length of the bars is shown (in this case, by setting the horizontal axis minimum to zero). HT Jon Peltier.</li>
</ul>
<p>The pie chart got a similar treatment. The Excel default:</p>
<div id="attachment_818" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-default.png" rel="lightbox[816]" title="Excel pie chart - default"><img class="size-medium wp-image-818" title="Excel pie chart - default" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-default-500x318.png" alt="Excel pie chart - default" width="500" height="318" /></a><p class="wp-caption-text">Pie chart: Excel default</p></div>
<p>The new template:</p>
<div id="attachment_819" class="wp-caption alignnone" style="width: 510px"><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-modified.png" rel="lightbox[816]" title="Excel pie chart - modified"><img class="size-medium wp-image-819" title="Excel pie chart - modified" src="http://www.swegler.com/becky/blog/wp-content/uploads/2012/01/pie-modified-500x317.png" alt="Excel pie chart - modified" width="500" height="317" /></a><p class="wp-caption-text">Pie chart: new template</p></div>
<ul>
<li>Label the pie slices directly—don’t make people use a legend to decode</li>
<li>Avoid the default Office color palette and develop your own (ours is based on colors from our website)</li>
<li>A white line between pie slices emphasizes the boundaries</li>
</ul>
<p>Excel isn&#8217;t perfect, but it&#8217;s out there in the world, and you can&#8217;t ignore it. Luckily, a little extra effort goes a long way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/29/no-excuses-for-ugly-excel-charts/</feedburner:origLink></item>
		<item>
		<title>Be Accessible to the Dummy Demographic</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/or7R1edkGpk/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 00:43:40 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[On the Job]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=784</guid>
		<description><![CDATA[I&#8217;ve always considered writing to be one of my professional strengths, and I&#8217;m passionate about making technology accessible to people. So when writing about government data for National Priorities Project, I try to make sure the language is easy to understand and non-wonky (wonk is the political equivalent of  nerd). After all, our mission statement [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always considered writing to be one of my professional strengths, and I&#8217;m passionate about making technology accessible to people. So when writing about government data for National Priorities Project, I try to make sure the language is easy to understand and non-wonky (<em>wonk</em> is the political equivalent of  <em>nerd</em>). After all, our mission statement says that NPP &#8220;makes complex budget information transparent and accessible.&#8221;</p>
<p>So when writing a brief paragraph to introduce a new dataset in the <a title="NPP's Federal Priorities Database" href="http://data.nationalpriorities.org">Federal Priorities Database</a>, I thought I nailed it:</p>
<blockquote><p>Federal tax collections represent the amount of federal taxes paid in a year.  The IRS publishes this information by state, breaking it into ten categories.  Because part of our job is to make government-published data more useful, we condensed these ten categories into three: taxes paid by businesses, taxes paid by individuals, and total taxes collected. We believe that these broad categories better reflect what most people want to know about tax revenue and are less confusing than the original data. In fact, the individual taxes calculation played an integral part in a recent publication, <em>Federal Spending Keeps Iowa, New Hampshire Afloat</em>.</p></blockquote>
<p>I have a few trusted readers in the office, so I sent the text around for some quick feedback. About five minutes later, one of them appeared at my desk, saying that my language was non-accessible and &#8220;made her eyes roll back in her head.&#8221; Wow. Hard to hear, but she followed up with some specific suggestions that resulted in a much improved, non-eye-rolling version:</p>
<blockquote><p>We recently took some data from the IRS and made it even better. We call it Federal Tax Collections, and it shows federal taxes collected in a year. Although the IRS helpfully provides these numbers for each state, they break the amounts into ten categories, not all of which are useful. For example, do any but the wonkiest people need to know how much railroad retirement tax was collected in 2010? To make things easier, we condensed these categories into taxes paid by businesses, taxes paid by individuals, and total taxes paid. We think these broader groupings are less confusing and more practical. Our recent publication, <em>Federal Spending Keeps Iowa, New Hampshire Afloat</em>, shows the individual taxes category in use.</p></blockquote>
<p>Thank goodness for honest feedback! It seems obvious, but the lessons here are easy to overlook when you&#8217;re cranking through a to-do list.</p>
<ul>
<li>No matter what kind of deadline you think you have, it&#8217;s always worth the time to get other eyes on something your organization will publish, even if it&#8217;s just a small blurb, and even if your colleagues are busy. After all, it&#8217;s in everyone&#8217;s best interest to show the world your best stuff.</li>
<li>Make sure your trusted readers include, as my friend calls herself, the <em>dummy demographic</em>, a term of affection for readers who aren&#8217;t experts in your subject matter.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/11/be-accessible-to-the-dummy-demographic/</feedburner:origLink></item>
		<item>
		<title>2012 Technical Goals</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/Ph96D5UUrNs/</link>
		<comments>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 02:43:03 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[goal]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=776</guid>
		<description><![CDATA[It’s easy to get distracted by the constant barrage of new technology. Sometimes I miss my days of COBOL programming. Things changed a bit more slowly then, allowing programmers to truly master a language without worrying about missing the next big thing. Overall, however, being a technologist is a lot more exciting in 2012 than [...]]]></description>
			<content:encoded><![CDATA[<p>It’s easy to get distracted by the constant barrage of new technology. Sometimes I miss my days of COBOL programming. Things changed a bit more slowly then, allowing programmers to truly master a language without worrying about missing the next big thing.</p>
<p>Overall, however, being a technologist is a lot more exciting in 2012 than it was in the Y2K remediation days. That said, it’s time to stop worrying about every shiny new toy that comes along and focus on a few things that appeal to my interests and career aspirations.</p>
<p><strong>NoSQL</strong><br />
I know my way around an RDBMS, but 2012 will be the year I stop reading about NoSQL and start doing something with it. Flavor TBD.</p>
<p><strong><a title="d3.js" href="http://mbostock.github.com/d3/">D3.js</a></strong><br />
Data visualization is more than a fad. Not those disjointed, meaningless infographics floating around, but numbers rendered as pictures that tell a story. I’m not a graphic designer, but I am a programmer, so it makes sense to learn a tool that can programmatically create pictures of the federal data I work with every day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2012/01/04/2012-technical-goals/</feedburner:origLink></item>
		<item>
		<title>The Lazy Card</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/Orz08uFLbWU/</link>
		<comments>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 03:19:14 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=697</guid>
		<description><![CDATA[The administrator of a blog I follow recently asked the question, “should I force our blog’s authors to use Markdown?” I then read a completely unrelated post on another blog that advised WordPress users to get rid of the visual text editor because “it makes you lazy” and you should “force yourself to learn some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/11/2555362706_c7d431a12b_b.jpg" rel="lightbox[697]" title="lazy"><img class="alignnone size-medium wp-image-701" title="lazy" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/11/2555362706_c7d431a12b_b-500x375.jpg" alt="lazy" width="500" height="375" /></a></p>
<p>The administrator of a blog I follow recently asked the question, “should I force our blog’s authors to use Markdown?”</p>
<p>I then read a completely unrelated post on another blog that advised WordPress users to get rid of the visual text editor because “it makes you lazy” and you should “force yourself to learn some basic HTML.”</p>
<p>When I got into a heated discussion with another developer about the above two items, he used the same word to describe non-Markdown/HTML-writing, WYSIWYG-dependent online content authors: <em>lazy</em>.</p>
<p>This isn’t the first argument I’ve had with a technologist who likes to play the lazy card, and it won’t be the last. I’m not disputing that everyone in today’s workforce should always be learning; the days of doing the same job the same way for thirty years are over. But to imply that a blogging co-worker isn’t holding up her end of the learning bargain because she doesn’t want to learn HTML or Markdown is arrogant.</p>
<p>As technologists, we explore and experiment with new technology. Our content-creating colleagues presumably explore and experiment in their respective areas of expertise. Who are we to dictate that they should increase their cognitive overhead by worrying about valid XHTML markup?</p>
<p>Yes, WYSIWYG editors are pretty terrible. They puke out Microsoft Word detritus and let you change the font color to cyan. Forcing people to write in Markdown, however, shifts a technical problem from the technologist to the user, which is the opposite of ideal.</p>
<p>This rant isn’t about blog authors or Markdown. It’s about acknowledging that technology isn’t everyone’s primary concern, nor should it be.</p>
<p>Of course there are appropriate times to force technology changes. But even in those situations the resistors aren’t lazy&#8211;they just have a different job than you. In today’s hectic and stressed workplace, shouldn’t we give colleagues the benefit of the doubt and help them succeed with technology rather than slapping a label on them?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/11/28/the-lazy-card/</feedburner:origLink></item>
		<item>
		<title>Python, Django, MySQL &amp; Win 7</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/17_lU7oGNrE/</link>
		<comments>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 02:49:47 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=675</guid>
		<description><![CDATA[When starting to learn Python and Django, my goal was to set up a robust development environment similar to what we use at National Priorities Project: isolated virtual environments, MySQL, and tools like pip and iPython. Stubbornly, I resolved to make it all work on Windows. I achieved the goal, but not without a lot [...]]]></description>
			<content:encoded><![CDATA[<p>When starting to learn Python and Django, my goal was to set up a robust development environment similar to what we use at National Priorities Project: isolated virtual environments, MySQL, and tools like pip and iPython. Stubbornly, I resolved to make it all work on Windows.</p>
<p>I achieved the goal, but not without a lot pain. If you&#8217;re a Windows user getting started with Python/Django, you might have an easier time installing a virtual Linux machine.</p>
<p>Here&#8217;s a re-cap of the Windows-specific instructions for installing Python, Django, MySQL, and a few necessary packages and tools.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 1: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: installing Python, Pip, and iPython</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython recognize virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/">Part 5: installing MySQL</a></li>
</ul>
<div>Parting thoughts:</div>
<div>
<ul>
<li>I abandoned the Cygwin approach after running into trouble with Cygwin&#8217;s Python install vs the Windows Python install.</li>
<li>People have good things to say about <a title="ActivePython" href="http://www.activestate.com/activepython/downloads">ActivePython</a> as a tool to help Python developers to avoid headaches.</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/09/14/python-django-and-mysql-on-windows-7/</feedburner:origLink></item>
		<item>
		<title>Python, Django, &amp; MySQL on Windows 7, Part 5: Installing MySQL</title>
		<link>http://feedproxy.google.com/~r/computersareforpeople/~3/mKAqBFfeQZg/</link>
		<comments>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 02:04:51 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.swegler.com/becky/blog/?p=629</guid>
		<description><![CDATA[This is the fifth and final post in a  dummies guide to getting stared with Python, Django, &#38; MySQL on Windows 7. Part 1: getting started Part 2: virtual environments Part 3: making iPython recognize virtual environments Part 4: installing Django Part 5: installing MySQL (you are here) By now, you should have Django installed [...]]]></description>
			<content:encoded><![CDATA[<p>This is the fifth and final post in a  dummies guide to getting stared with Python, Django, &amp; MySQL on Windows 7.</p>
<ul>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 1: Getting Started" href="http://www.swegler.com/becky/blog/2011/08/27/python-django-mysql-on-windows-7-part-i-getting-started/">Part 1: getting started</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 2: Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-2-virtual-environments/">Part 2: virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 3: iPython &amp; Virtual Environments" href="http://www.swegler.com/becky/blog/2011/08/28/python-django-mysql-on-windows-7-part-3-ipython-virtual-environments/">Part 3: making iPython recognize virtual environments</a></li>
<li><a title="Python, Django, &amp; MySQL on Windows 7, Part 4: Installing Django" href="http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-4-installing-django/">Part 4: installing Django</a></li>
<li><strong>Part 5: installing MySQL (you are here)</strong></li>
</ul>
<p>By now, you should have Django installed into a virtual environment.  These tutorials aren&#8217;t meant to cover building a django app, just to point out the quirks involved with getting a project up and running on Windows.  These tutorials also assume you want to construct real applications using a real development environment.</p>
<p>To that end, you&#8217;ll want a heftier database than sqlite.  We use MySQL at the office, so these instructions cover installing it and using it with Django.</p>
<h3>Install MySQL</h3>
<ol>
<li><a title="MySQL downloads" href="http://www.mysql.com/downloads/mysql/">Download</a> and install MySQL.</li>
<li>Once MySQL is installed, proceed through the configuration wizard. Check <em>Include Bin Directory in Windows PATH </em>box.</li>
<li>When prompted, set a password for the MySQL <em>root</em> account.</li>
<li>Once the installation wizard is done, open a command window and log in to MySQL with the root account: <code>mysql -uroot -p</code> (you&#8217;ll be prompted for the password).</li>
<li>After logging in, run the following commands to create a database, create a user for your Django project, and grant the user database access.
</li>
<script src="https://gist.github.com/1202410.js"></script><noscript><p>View the code on <a href="https://gist.github.com/1202410">Gist</a>.</p></noscript>
</ol>
<h3>Install MySQL-python</h3>
<p>You&#8217;ll need the MySQL-python package, a Python interface to MySQL.</p>
<ol>
<li>Download the windows MySQL-python distribution <a title="MySQL-python for Windows Distributions" href="http://www.codegood.com/downloads?dl_cat=2">here</a>.  The author has some <a title="MySQL-python 1.2.3 for Windows and Python 2.7, 32bit and 64bit versions" href="http://www.codegood.com/archives/category/python">instructions</a> about the appropriate version; assuming a 32-bit version of Python 2.7, you&#8217;d download <a title="MySQL-python-1.2.3.win32-py2.7.exe" href="http://www.codegood.com/download/10/">this package</a> (.exe).</li>
<li>After downloading, do not run the Windows installer. Doing so will install MySQL-python to your root python, which virtual environments created via <em>&#8211;no-site-packages </em>won&#8217;t be able to see.</li>
<li>Instead, install the downloaded package to your virtual environment by using easy_install, which can <a title="StackOverflow: Can I install Python windows packages into virtualenvs?" href="http://stackoverflow.com/questions/3271590/can-i-install-python-windows-packages-into-virtualenvs/5442340#5442340">install from Windows binary installers</a>:<br />
<code>easy_install file://c:/users/you/downloads/mysql-python-1.2.3.win32-py2.7.exe </code>(modify to reflect the location of the downloaded installer and its name).<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110901_195047.jpg" rel="lightbox[629]" title="installing mysql-python package via easy_install"><img class="alignnone size-medium wp-image-635" title="installing mysql-python package via easy_install" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110901_195047-500x304.jpg" alt="installing mysql-python package via easy_install" width="500" height="304" /></a></li>
</ol>
<h3>Configure Django</h3>
<p>Next, you&#8217;ll need to update the database-related settings of your Django project.</p>
<ol>
<li>From the directory of your Django project, open <em>settings.py</em> using your favorite editor.</li>
<li>Update the <em>default</em> key in the<em> DATABASES</em> dictionary.  Set <em>ENGINE</em> to <em>django.db.backends.mysql</em> and set <em>NAME</em>, <em>USER, </em>and <em>PASSWORD</em> to the database name, username, and password you chose when installing MySQL.  See <a title="Writing your first Django app, part 1" href="https://docs.djangoproject.com/en/1.3/intro/tutorial01/">Part I</a> of the Django tutorial for more information about database settings.</li>
<li>Open a command window, activate your virtual environment, and change to the directory of your Django project.</li>
<li>Type <code>python manage.py syncdb</code>. This command creates the underlying tables required for your Django project.<br />
<a href="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110914_214634.jpg" rel="lightbox[629]" title="syncdb output"><img class="alignnone size-medium wp-image-653" title="syncdb output" src="http://www.swegler.com/becky/blog/wp-content/uploads/2011/09/climsy_20110914_214634-500x304.jpg" alt="syncdb output" width="500" height="304" /></a></li>
<li>If the syncdb worked, you have Python, Django, and MySQL communicating in harmony.  Congratulations!  You can now proceed through the <a title="Django tutorial" href="https://docs.djangoproject.com/en/1.3/intro/tutorial01/">Django tutorial</a> and create your first application.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.swegler.com/becky/blog/2011/09/14/python-django-mysql-on-windows-7-part-5-installing-mysql/</feedburner:origLink></item>
	</channel>
</rss>

