<?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>Matt Hampel &#124; matth.org</title>
	<atom:link href="http://matth.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://matth.org</link>
	<description>I’m Matt Hampel, a digital developer and civic information hacker.</description>
	<lastBuildDate>Thu, 15 Dec 2011 09:40:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>A script to batch merge multiple shapefiles into one using ogr2ogr / GDAL on Mac</title>
		<link>http://matth.org/2011/10/28/a-script-to-batch-merge-multiple-shapefiles-into-one-using-ogr2ogr-gdal-on-mac/</link>
		<comments>http://matth.org/2011/10/28/a-script-to-batch-merge-multiple-shapefiles-into-one-using-ogr2ogr-gdal-on-mac/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 16:02:42 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>

		<guid isPermaLink="false">http://matth.org/?p=359</guid>
		<description><![CDATA[Original wiki page (you should use the version there) &#8212; copied here with a more descriptive title with the hope that it becomes easier to find. #Make a new directory called "tmp" and a sub directory called "merged" mkdir tmp mkdir tmp/merged #copy all zipped files to the "tmp" directory and then "cd" into it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://trac.osgeo.org/gdal/wiki/FAQVector">Original wiki page</a> (you should use the version there) &#8212; copied here with a more descriptive title with the hope that it becomes easier to find. </p>
<pre><code>#Make a new directory called "tmp" and a sub directory called "merged"
mkdir tmp
mkdir tmp/merged

#copy all zipped files to the "tmp" directory and then "cd" into it
cp *.zip tmp
cd tmp

#unzip all the .zip archives
find . -name "*.zip" -exec unzip '{}' \;

#delete all .zip archives
rm *.zip

# move a single shapefile (and the cooresponded .shx, .dbf, etc files) to the
# "merged" directory (exchange 'myshape*' for the name of one of your shapefiles
# keeping the '*' at the end of the name)
find . -name 'myshape*' -exec mv '{}' merged \;

#Batch merge all the remaining shapefiles from the tmp dir into the copied
# file in the merge dir (exchange 'myshape' for the name of the copied shapefile)
for i in $(ls *.shp); do ogr2ogr -f 'ESRI Shapefile' -update -append merged $i -nln myshape
done</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/10/28/a-script-to-batch-merge-multiple-shapefiles-into-one-using-ogr2ogr-gdal-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SELECT &#8230; WHERE IN in Hive</title>
		<link>http://matth.org/2011/10/26/using-select-where-in-in-hive/</link>
		<comments>http://matth.org/2011/10/26/using-select-where-in-in-hive/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 14:49:42 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>
		<category><![CDATA[hive]]></category>

		<guid isPermaLink="false">http://matth.org/?p=355</guid>
		<description><![CDATA[You can&#8217;t do it, but you can use SEMI JOINs. From the examples: SELECT a.key, a.value FROM a WHERE a.key in (SELECT b.key FROM B); can be rewritten to: SELECT a.key, a.val FROM a LEFT SEMI JOIN b on (a.key = b.key) (Mostly a note-to-self) Affordable php mysql hosting with cpanel]]></description>
			<content:encoded><![CDATA[<p>You can&#8217;t do it, but you <a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Joins">can use SEMI JOINs</a>.</p>
<p>From the examples:</p>
<blockquote>
<pre>  SELECT a.key, a.value
  FROM a
  WHERE a.key in
   (SELECT b.key
    FROM B);</pre>
<p>can be rewritten to:</p>
<div>
<div>
<pre>   SELECT a.key, a.val
   FROM a LEFT SEMI JOIN b on (a.key = b.key)</pre>
</div>
</div>
<p>(Mostly a note-to-self)</p></blockquote>
<div style="display: none;">Affordable <a href="http://www.olnevhost.net/"><strong>php mysql hosting</strong></a> with cpanel</div>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/10/26/using-select-where-in-in-hive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes to self on map design</title>
		<link>http://matth.org/2011/05/09/notes-to-self-on-map-design/</link>
		<comments>http://matth.org/2011/05/09/notes-to-self-on-map-design/#comments</comments>
		<pubDate>Mon, 09 May 2011 15:34:32 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>

		<guid isPermaLink="false">http://matth.org/?p=345</guid>
		<description><![CDATA[At far zoom levels: Use neighborhood names instead of major street names Just outline highways thin light lines for minor streets As you get closer, use the same color for minor streets, but now outline them (white/lighter center) Put highways below other road layers This round from looking at the devseed Baltimore local maps]]></description>
			<content:encoded><![CDATA[<p>At far zoom levels:</p>
<p>Use neighborhood names instead of major street names</p>
<p>Just outline highways</p>
<p>thin light lines for minor streets</p>
<p>As you get closer, use the same color for minor streets, but now outline them (white/lighter center)</p>
<p>Put highways below other road layers</p>
<p>This round from looking at the <a href="http://developmentseed.org/blog/2011/may/09/mapping-baltimores-open-data">devseed Baltimore local maps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/05/09/notes-to-self-on-map-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Now for a change: cheesecake</title>
		<link>http://matth.org/2011/03/02/now-for-a-change-cheesecake/</link>
		<comments>http://matth.org/2011/03/02/now-for-a-change-cheesecake/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 12:47:20 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[food]]></category>

		<guid isPermaLink="false">http://matth.org/?p=335</guid>
		<description><![CDATA[Basic Graham Cracker Crust: 1/4 c. butter (melt in Microwave) 1/4 c. sugar 1 tsp. cinnamon 1 c. graham cracker crumbs Mix and press into a 9 inch pie pan. (Use springform pan.). Cheesecake: 2 (8 oz.) cream cheese, softened (in Microwave) 3 eggs juice from 1 lemon ½ cup sugar (don’t remember, maybe a [...]]]></description>
			<content:encoded><![CDATA[<p><strong><em>Basic Graham Cracker Crust:</em></strong></p>
<ul>
<li>1/4 c. butter (melt in Microwave)</li>
<li>1/4 c. sugar</li>
<li>1 tsp. cinnamon</li>
<li>1 c. graham cracker crumbs</li>
</ul>
<p>Mix and press into a 9 inch pie pan. (Use springform pan.).</p>
<p><strong><em>Cheesecake:</em></strong></p>
<ul>
<li>2 (8 oz.) cream cheese, softened (in Microwave)</li>
<li>3 eggs</li>
<li>juice from 1 lemon</li>
<li>½ cup sugar (don’t remember, maybe a bit more, just try).</li>
</ul>
<ul>
<li>8 oz. sour cream</li>
<li>1tablespoon vanilla</li>
</ul>
<p>Preheat oven to 350 degreesBeat cheese until fluffy; add eggs, sugar and  lemon juice. Pour into prepared pan; bake 50 to 55 minutes or until cake springs back when lightly touched. Cool for a few minutes;  Mix sour cream with vanilla  and  spread  oncheesecake. Bake at 400 for about 5-10 minutes.</p>
<p>Adapted from somewhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/03/02/now-for-a-change-cheesecake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export an Excel file with several sheets as multiple csv files using Open Office</title>
		<link>http://matth.org/2011/03/01/export-an-excel-file-with-several-sheets-as-multiple-csv-files-using-open-office/</link>
		<comments>http://matth.org/2011/03/01/export-an-excel-file-with-several-sheets-as-multiple-csv-files-using-open-office/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 04:13:50 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>

		<guid isPermaLink="false">http://matth.org/?p=315</guid>
		<description><![CDATA[Datasets often come as Excel files with multiple sheets (for example, one per year). If you don&#8217;t have Excel, you can use OpenOffice and this macro to export all the sheets as separate CSV files. It takes a directory path, searches for all Excel files in that directory, and then saves each sheet in each [...]]]></description>
			<content:encoded><![CDATA[<p>Datasets often come as Excel files with multiple sheets (for example, one per year). If you don&#8217;t have Excel, you can use OpenOffice and <a href="http://extensions.services.openoffice.org/en/project/OOcalc_multi_sheets_export">this macro</a> to export all the sheets as separate CSV files. It takes a directory path, searches for all Excel files in that directory, and then saves each sheet in each file as CSV with the name (file name)_(sheet name).csv</p>
<p>To run it, you need to:</p>
<ol>
<li>Open Office Calc, click Tools -&gt; Macros -&gt; Organize Macros -&gt; OpenOffice.Org Basic.</li>
<li>Click the new button</li>
<li>Paste in the macro code</li>
<li>Change the file directory (cFolder variable, around like 29) to some folder. This is where OpenOffice will search for Excel files and save the results.</li>
<li>Run the macro (you might have to go through Tools -&gt; Macros -&gt; Run Macro)</li>
</ol>
<p>There probably is a way to do this directly from the command line.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/03/01/export-an-excel-file-with-several-sheets-as-multiple-csv-files-using-open-office/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detroit Police Department 2003 Consent Judgements (Consent Agreements)</title>
		<link>http://matth.org/2011/03/01/detroit-police-department-2003-consent-judgements-consent-agreements/</link>
		<comments>http://matth.org/2011/03/01/detroit-police-department-2003-consent-judgements-consent-agreements/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 18:05:28 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[civic information]]></category>
		<category><![CDATA[Detroit]]></category>

		<guid isPermaLink="false">http://matth.org/?p=324</guid>
		<description><![CDATA[I am posting these documents with little background; updates are possible as I collect more files. These should be on DetroitWiki instead. Doug Guthrie of the The Detroit News wrote an overview of the consent decrees from as of 2009. Consent Judgement Use of Force and Arrest and Witness Detention (03-72258) Consent Judgement Conditions of Confinement [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times} --> <!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times} --></p>
<p>I am posting these documents with little background; updates are possible as I collect more files. These should be on <a href="http://detroitwiki.org/Main_Page">DetroitWiki</a> instead.</p>
<p>Doug Guthrie of the The Detroit News wrote an <a href="http://detnews.com/article/20090707/METRO01/907070363/Detroit-Police-fail-to-meet-terms-of-consent-decree">overview of the consent decrees</a> from as of 2009.</p>
<p><a href="http://matth.org/wp-content/uploads/2011/03/detroitpd_uofwdcd_613.pdf">Consent Judgement Use of Force and Arrest and Witness Detention</a> (03-72258)</p>
<p><a href="http://matth.org/wp-content/uploads/2011/03/detroitpd_holdingcell_613.pdf">Consent Judgement Conditions of Confinement</a> (03-72258)</p>
<p>Both to be signed by  plaintiffs:</p>
<p>RUTH C. CARTER Corporation Counsel City of Detroit<br />
BRENDA E. BRACEFUL Deputy Corporation Counsel<br />
KWAME M. KILPATRICK Mayor City of Detroit<br />
JERRY A. OLIVER, SR. Chief of Police City of Detroit</p>
<p>June 12, 2003</p>
<p>I found these by searching for the exact file names on <a href="http://usdoj.gov">usdoj.gov</a></p>
<p>There also are several <a href="http://www.justice.gov/crt/about/spl/documents/dpd/detroit_cover.php">technical assistance letters</a> from the Department of Justice from 2002, which are more readable than the court filings.</p>
<p>1.     <a href="http://www.justice.gov/crt/about/spl/documents/dpd/detroit_3_6.php"> Use of Force &#8211; March 6, 2002</a></p>
<p>2.     <a href="http://www.justice.gov/crt/about/spl/documents/dpd/detroit_4_4.php"> Holding Cell &#8211; April 4, 2002</a></p>
<p>3.     <a href="http://www.justice.gov/crt/about/spl/documents/dpd/detroit_6_5.php"> Arrest and Witness Detention &#8211; June 5, 2002</a></p>
<p><strong>Sheryl Robinson Wood </strong>served as the independent monitor. <a href="http://www.kroll.com/about/library/Detroit/">The reports of the Independent Monitor of the Detroit Police Department from January 2004 through September 2009 are online</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/03/01/detroit-police-department-2003-consent-judgements-consent-agreements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detroit Journal of City Council 2009</title>
		<link>http://matth.org/2011/02/23/detroit-journal-of-city-council-2009/</link>
		<comments>http://matth.org/2011/02/23/detroit-journal-of-city-council-2009/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 04:02:57 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[Detroit]]></category>

		<guid isPermaLink="false">http://matth.org/?p=317</guid>
		<description><![CDATA[Here is a PDF (55mb) of the 2009 Detroit Journal of City Council, the official record of the Council&#8217;s proceedings. It&#8217;s similar to minutes in that it lists all decisions, votes, and other recorded commentary. I&#8217;ll post the full story of how this PDF came to be here &#8220;soon&#8221;.]]></description>
			<content:encoded><![CDATA[<p>Here is a <a href='http://matth.org/wp-content/uploads/2011/02/2009Council.pdf'>PDF (55mb) of the 2009 Detroit Journal of City Council</a>, the official record of the Council&#8217;s proceedings. It&#8217;s similar to minutes in that it lists all decisions, votes, and other recorded commentary. I&#8217;ll post the full story of how this PDF came to be here &#8220;soon&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/02/23/detroit-journal-of-city-council-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Michigan Public School data</title>
		<link>http://matth.org/2011/02/23/michigan-public-school-data/</link>
		<comments>http://matth.org/2011/02/23/michigan-public-school-data/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 02:59:39 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[civic information]]></category>

		<guid isPermaLink="false">http://matth.org/?p=313</guid>
		<description><![CDATA[The Center for Educational Performance and Information (CEPI) at the State of Michigan publishes raw data about schools, students, staff, and finances. This includes enrollment, demographics, safety &#038; security, balance sheet, revenue, expenditure, and a lot more.]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.michigan.gov/cepi/">Center for Educational Performance and Information</a> (CEPI) at the State of Michigan publishes raw data about schools, students, staff, and finances. This includes enrollment, demographics, safety &#038; security, balance sheet, revenue, expenditure, and a lot more. </p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2011/02/23/michigan-public-school-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing DocSplit / GraphicsMagick Postscript delegate failed</title>
		<link>http://matth.org/2010/11/17/fixing-docsplit-graphicsmagick-postscript-delegate-failed/</link>
		<comments>http://matth.org/2010/11/17/fixing-docsplit-graphicsmagick-postscript-delegate-failed/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 16:48:36 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>

		<guid isPermaLink="false">http://matth.org/?p=309</guid>
		<description><![CDATA[After installing DocSplit, I got this error when attempting to extract text from a PDF via OCR: $>docsplit text ./BSED.pdf --pages all execvp failed, errno = 2 (No such file or directory) gm convert: "gs" "-q" "-dBATCH" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r200x200" "-dFirstPage=1" "-dLastPage=1" "-sOutputFile=/var/folders/D5/D5Cief2MHW8vTHOI8nkyPU+++TM/-Tmp-/d20101117-83113-1f9etpp/gmUoD1ux" "--" "/var/folders/D5/D5Cief2MHW8vTHOI8nkyPU+++TM/-Tmp-/d20101117-83113-1f9etpp/gmXsXajF" "-c" "quit". gm convert: Postscript delegate failed [...]]]></description>
			<content:encoded><![CDATA[<p>After installing <a href="http://documentcloud.github.com/docsplit/">DocSplit</a>, I got this error when attempting to extract text from a PDF via OCR:</p>
<p><code>$>docsplit text ./BSED.pdf --pages all<br />
execvp failed, errno = 2 (No such file or directory)<br />
gm convert: "gs" "-q" "-dBATCH" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r200x200" "-dFirstPage=1" "-dLastPage=1" "-sOutputFile=/var/folders/D5/D5Cief2MHW8vTHOI8nkyPU+++TM/-Tmp-/d20101117-83113-1f9etpp/gmUoD1ux" "--" "/var/folders/D5/D5Cief2MHW8vTHOI8nkyPU+++TM/-Tmp-/d20101117-83113-1f9etpp/gmXsXajF" "-c" "quit".<br />
gm convert: Postscript delegate failed (./BSED.pdf).<br />
</code></p>
<p>I am on Mac OS 10.6. The solution was to upgrade <a href="http://pages.cs.wisc.edu/~ghost/">ghostscript</a> to the latest version: </p>
<p><code>$>brew install ghostscript</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2010/11/17/fixing-docsplit-graphicsmagick-postscript-delegate-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Government and data in Detroit</title>
		<link>http://matth.org/2010/03/19/open-government-and-data-in-detroit/</link>
		<comments>http://matth.org/2010/03/19/open-government-and-data-in-detroit/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 21:16:40 +0000</pubDate>
		<dc:creator>Matt Hampel</dc:creator>
				<category><![CDATA[badgers]]></category>

		<guid isPermaLink="false">http://matth.org/2010/03/19/open-government-and-data-in-detroit/</guid>
		<description><![CDATA[If you are interested in either, both, or related subjects, please do get in touch: matthew.hampel@gmail.com This post is way too long in coming, especially because I was disappointed to find no other like it when I googled those keywords earlier this year. Some starting points: (hopefully I&#8217;ll be able to add more) http://detroitwiki.org/Data_about_Detroit http://datadrivendetroit.org/ [...]]]></description>
			<content:encoded><![CDATA[<p>If you are interested in either, both, or related subjects, please do get in touch: matthew.hampel@gmail.com</p>
<p>This post is way too long in coming, especially because I was disappointed to find no other like it when I googled those keywords earlier this year.</p>
<p>Some starting points: (hopefully I&#8217;ll be able to add more)</p>
<p>http://detroitwiki.org/Data_about_Detroit</p>
<p>http://datadrivendetroit.org/ (501c3, I&#8217;m interning there this semester)</p>
]]></content:encoded>
			<wfw:commentRss>http://matth.org/2010/03/19/open-government-and-data-in-detroit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

