<?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>Sosuke &#187; Data</title>
	<atom:link href="http://www.sosuke.com/index.php/category/data/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sosuke.com</link>
	<description>Dark music of the gods.</description>
	<lastBuildDate>Sun, 09 Jun 2013 04:41:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Launching the TheKnot.com Search BETA</title>
		<link>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/</link>
		<comments>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/#comments</comments>
		<pubDate>Mon, 24 Dec 2012 22:31:38 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Website Analysis]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=199</guid>
		<description><![CDATA[My major project of 2012, TheKnot.com Search BETA, launched earlier this month, the morning of December 14th, and it was a journey worth documenting. It began back in May when the company decided to start our own labs or internal incubator groups. One began right away in New York City and the other started a [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-210" alt="Screen Shot 2012-12-24 at 4.22.03 PM" src="http://www.sosuke.com/wp-content/uploads/2012/12/Screen-Shot-2012-12-24-at-4.22.03-PM-300x174.png" width="300" height="174" /></p>
<p>My major project of 2012, <a href="http://search.theknot.com/search/?q=eden%20bridals">TheKnot.com Search BETA</a>, launched earlier this month, the morning of December 14th, and it was a journey worth documenting. It began back in May when the company decided to start our own labs or internal incubator groups. One began right away in New York City and the other started a couple weeks later in Austin. I had the opportunity to join the Austin group with a team of developers and product people that I highly respected. I was grinning the whole time with excitement. With the direction that we were independent from the company but had access to the data we sequestered ourselves in a room for a few weeks. Over pots of coffee and pints of beer after work we brainstormed our some good ideas for our brides to find inspiration for their weddings. Our group started out as Judy Galani, Product Strategist, Forrest Andrews and Matt Oehlers, Senior Software Engineers, Erin Bender, Freelance Art Director, and myself as Interactive Media Developer. We &#8220;sold&#8221; the idea and working prototype to our &#8220;investors&#8221; by October and it was then time to go from prototype to production.</p>
<p>We had to take the design in house from this point on, but after a fond farewell and thank you to Erin we started to add in more management to the group. It was a <a href="http://en.wikipedia.org/wiki/Greenfield_project">greenfield project</a> so our back-end developers Matt and Forrest were excited to push forward into new territories. Within a day or two we were able to deploy projects straight from Visual Studio to the AWS servers, I was blown away. Forrest focused on our <a href="http://www.mongodb.org/">MongoDB NoSQL</a> data store and the API that I would later pull all the front-end content from, <a href="http://www.asp.net/mvc">ASP.NET MVC</a>. Matt worked on massaging the data into <a href="http://lucene.apache.org/solr/">Apache Solr</a> and in a matter of days we had an impressive result set coming back for queries.</p>
<p><img class="alignleft size-medium wp-image-212" alt="Screen Shot 2012-12-24 at 4.22.40 PM copy" src="http://www.sosuke.com/wp-content/uploads/2012/12/Screen-Shot-2012-12-24-at-4.22.40-PM-copy-196x300.png" width="196" height="300" /></p>
<p>The front-end technology was built to be a responsive two page website that used a combination ofjQuery and <a href="http://underscorejs.org/">Underscore.js</a> along with HTML and CSS to create a multi-device interface that would be familiar and easy to use. The <a href="http://search.theknot.com/search/?q=eden%20bridals">main grid view</a> uses <a href="http://masonry.desandro.com/">Masonry</a> to create the Pinterest-esque layout for search results and Underscore.js templates to load in a different layout for different data types. The <a href="http://search.theknot.com/search/single?q=eden%20bridals">single page view</a> focuses on a low browser width touch interface to give a very image focused search experience. To combine and minify the page scripts down I used the <a href="http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification">BundleCollection</a> library in ASP.NET MVC which worked great. There are still a large number of extra scripts on the page but I&#8217;ve tried to load them asynchronously and not let them interfere with using the interface immediately.</p>
<p>The site has been up and working great for a few weeks now and launched along side a new look and feel for <a href="http://TheKnot.com">TheKnot.com</a>. Go take a look, and of course let me know if you find any bugs here or on the feedback tab on the bottom!</p>
<p><span id="more-199"></span></p>
<hr style="clear: left;" />
<p>&nbsp;</p>
<p><strong>Search beta team at launch:</strong><br />
Forrest Andrews<br />
Judy Galani<br />
Keith Higbee<br />
Ringo Lertprecha<br />
Matt Oehlers<br />
Barrett Sonntag</p>
<p><strong>Special thanks:</strong><br />
Erin Bender<br />
Rob Fassino<br />
David Liu<br />
Carley Roney<br />
Matthew Rook<br />
Jason Sirota<br />
All our loved ones patience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free US Zip Code Database</title>
		<link>http://www.sosuke.com/index.php/2009/05/30/free-us-zip-code-database/</link>
		<comments>http://www.sosuke.com/index.php/2009/05/30/free-us-zip-code-database/#comments</comments>
		<pubDate>Sun, 31 May 2009 01:28:06 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[Data]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=42</guid>
		<description><![CDATA[So as one of my sites grew I quickly found out that my zip code database was horribly incomplete with only 33234 records and it even had duplicates for some zip codes. I did some searching and came across a post about a zip code csv file but the post goes to what looks like [...]]]></description>
				<content:encoded><![CDATA[<p>So as one of my sites grew I quickly found out that my zip code database was horribly incomplete with only 33234 records and it even had duplicates for some zip codes. I did some searching and came across a post about a <a href="http://coolthingoftheday.blogspot.com/2008/04/free-us-zip-code-database-as-csv.html">zip code csv</a> file but the post goes to what looks like an empty page with no file. A little digging lead me to the <a href="http://mappinghacks.com/data/?C=M;O=A">zip code file</a> download page that gives you a csv with entries like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">&quot;78701&quot;,&quot;Austin&quot;,&quot;TX&quot;,&quot;30.27127&quot;,&quot;-97.74103&quot;,&quot;-6&quot;,&quot;1&quot;</pre></td></tr></table></div>

<p>Awesome! This csv file has 43191 unique records and has entries for each zip code my users have reported as missing. I started by looking up how to import a csv into MSSQL and followed an article called <a href="http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file">Using BULK INSERT to Load a Text File</a> from which I came up with my query.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;">BULK <span style="color: #993333; font-weight: bold;">INSERT</span> ZipCodes <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">'c:<span style="color: #000099; font-weight: bold;">\z</span>ipcodes.csv'</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #66cc66;">&#40;</span>FIELDTERMINATOR <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'&quot;&quot;,&quot;&quot;'</span><span style="color: #66cc66;">,</span> ROWTERMINATOR <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #66cc66;">&#41;</span></pre></td></tr></table></div>

<p>It didn&#8217;t work and after a couple hours of trial and error I threw my hands up in the air and abandoned the bulk insert and fell back on another option of using phpMyAdmin. It sounds crazy but I setup the database in MySQL and imported the csv on the first attempt! Now to get it back to to MSSQL I exported the database as single row imports that looked like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #ff0000;">`ZipCodes`</span> <span style="color: #993333; font-weight: bold;">VALUES</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'78701'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Austin'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'TX'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'30.27127'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'-97.74103'</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>A few quick find and replaces to change the database name and remove the ` characters and I was able to run them as queries on my MSSQL database in blocks of 5500 to prevent timeouts.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #66cc66;">&#91;</span>databaseName<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>dbo<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>ZipCodes<span style="color: #66cc66;">&#93;</span> <span style="color: #993333; font-weight: bold;">VALUES</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'78701'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Austin'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'TX'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'30.27127'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'-97.74103'</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>It&#8217;s crucial to have a fairly complete zip code database for distance searching on my <a href="http://diveintothepool.com">free online dating</a> site and I&#8217;m glad I got this sorted out and updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2009/05/30/free-us-zip-code-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
