<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adam Phillabaum on Medium]]></title>
        <description><![CDATA[Stories by Adam Phillabaum on Medium]]></description>
        <link>https://medium.com/@adamb0mb?source=rss-ce6f0096f2b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iGdPzzofbO9rVX2j3FOHug.jpeg</url>
            <title>Stories by Adam Phillabaum on Medium</title>
            <link>https://medium.com/@adamb0mb?source=rss-ce6f0096f2b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:23:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adamb0mb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to get Apache Superset to connect to Athena]]></title>
            <link>https://medium.com/payscale-tech/how-to-get-apache-superset-to-connect-to-athena-6d9b56bec7fb?source=rss-ce6f0096f2b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d9b56bec7fb</guid>
            <category><![CDATA[apache-superset]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[aws-athena]]></category>
            <dc:creator><![CDATA[Adam Phillabaum]]></dc:creator>
            <pubDate>Thu, 28 Mar 2019 23:51:52 GMT</pubDate>
            <atom:updated>2019-03-29T15:24:19.927Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7hFwgfjElWCzkR56mZ3thw.png" /><figcaption>Awesome Screenshot of Apache Superset, compliments of Apache Incubator.</figcaption></figure><p>This took a couple of rounds for me, so I thought I’d just share my learnings on how to get Apache Superset connecting to Athena. I’m running this on my local Mac. These are <strong>NOT</strong> “how to set it up in prod” instructions.</p><p>I started with the instructions here: <a href="https://superset.incubator.apache.org/installation.html#start-with-docker">https://superset.incubator.apache.org/installation.html#start-with-docker</a></p><pre>git clone <a href="https://github.com/apache/incubator-superset/">https://github.com/apache/incubator-superset/</a> <br>#<br># Hidden steps here, to be revealed later in this post<br>#<br>cd incubator-superset/contrib/docker <br>docker-compose run --rm superset ./docker-init.sh <br>docker-compose up</pre><p>This stood up the cluster for me. But, without the connectors I need, this is pretty much worthless.</p><p>The trick is that you need to customize your docker image to suit your needs. So, after you git clone you can edit your Dockerfile to include:</p><pre>apt install default-jre<br>pip install &quot;PyAthenaJDBC&gt;1.0.9&quot;</pre><p>Do these in the place in the Dockerfile where you see similar looking commands.</p><p>e.g. my Dockerfile has these sections in them</p><pre>RUN apt-get install -y build-essential libssl-dev \<br>libffi-dev python3-dev libsasl2-dev libldap2-dev \<br>libxi-dev default-jre</pre><p>and</p><pre>RUN pip install --upgrade setuptools pip \<br>&amp;&amp; pip install -r requirements.txt -r requirements-dev.txt \<br>&amp;&amp; pip install &quot;PyAthenaJDBC&gt;1.0.9&quot; \<br>&amp;&amp; rm -rf /root/.cache/pip</pre><p>And, when you’re in the UI, this is the JDBC string you want:</p><p>awsathena+jdbc://&lt;Your-AWS-key&gt;:&lt;Your-AWS-key-secret&gt;@athena.&lt;AWS-Region&gt;.amazonaws.com/?s3_staging_dir=s3://aws-athena-query-results-XXXX-&lt;AWS-Region&gt;</p><p>Good luck, and happy Business Intelligencing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d9b56bec7fb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/payscale-tech/how-to-get-apache-superset-to-connect-to-athena-6d9b56bec7fb">How to get Apache Superset to connect to Athena</a> was originally published in <a href="https://medium.com/payscale-tech">PayScale Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Analytics: Remove Email Addresses.]]></title>
            <link>https://medium.com/@adamb0mb/google-analytics-remove-email-addresses-1f1592e617be?source=rss-ce6f0096f2b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f1592e617be</guid>
            <dc:creator><![CDATA[Adam Phillabaum]]></dc:creator>
            <pubDate>Tue, 18 Mar 2014 17:35:21 GMT</pubDate>
            <atom:updated>2014-03-18T19:55:10.880Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to define a filter for redacting email addresses from Google Analytics.</h4><p>Did you know that it’s against the <a href="http://www.google.com/analytics/">Google Analytics</a> <a href="http://www.google.com/analytics/terms/us.html">Terms of Service</a> to capture email addresses in their system? It is, and so is any other personally identifiable information (PII).</p><blockquote>You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an individual (such as a name, email address or billing information), …</blockquote><p>If you run a site of any sufficient size, you know that this is next to impossible. People put crazy stuff in form fields, regardless of what you intend for them to put there.</p><p>Before we start, I have to point out one downside: all of your defense against PII collection is done at the “profile” level. It might make sense for Google Analytics to move these to the “property” level, because it make sense to have some filters property-wide. What this means for you: you’ll have to apply these filters to any profile you create. That’s OK though, because I have a feeling most people only have one or two profiles anyways.</p><h3>View Settings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8Df1iIDnIbg1MJ7_hNqAA.png" /><figcaption>Your first line of defense: View Settings</figcaption></figure><p>Your first line of defense is to exclude any parameter you KNOW will have an email address on it here. It’s just a comma separated list. THIS IS CASE SENSITIVE, so make sure you get that right. Maybe the topic for another post, but you could also lowercase all the data coming into your profile.</p><h3>The Advanced Filter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*iS3u_cu2M2b0kUWxcxDdoA.png" /><figcaption>An advanced filter to remove email addresses</figcaption></figure><p>Here comes the magic. Well, here comes the <a href="http://www.regular-expressions.info/email.html">RegEx for email addresses</a> at least. Here is the filter you want:</p><ul><li>Field A -&gt; Extract A<br>Request URI<br>^(.*)=([A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4})(.*)$</li><li>Field B -&gt; Extract B can be left empty</li><li>Output To -&gt; Constructor<br>Request URI<br>$A1=\[email redacted\]$A3</li><li>The radio buttons should be selected as shown in the screenshot.</li></ul><p>I hope this helps you. I tried a couple of other solutions (mostly with the Search and Replace filter type), but didn’t have any success. But, this works.</p><p>If you have any feedback about (a) how this might be breaking something, or (b) might be improved. Please let me know.</p><p><a href="https://news.ycombinator.com/item?id=7424408">Join the Discussion on HackerNews »</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f1592e617be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make $1,200 with R]]></title>
            <link>https://medium.com/@adamb0mb/how-to-make-1-200-with-r-24ef2d227985?source=rss-ce6f0096f2b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/24ef2d227985</guid>
            <dc:creator><![CDATA[Adam Phillabaum]]></dc:creator>
            <pubDate>Mon, 17 Mar 2014 04:50:28 GMT</pubDate>
            <atom:updated>2014-03-17T16:00:13.439Z</atom:updated>
            <content:encoded><![CDATA[<h4>Set your rental price with data, not with guesses.</h4><p>“How much should I rent my condo for?”<br>Turns out, the answer is: “Guess.”<br>So, I built the data-driven solution this problem.</p><p>Our family has spent the last year trying to buy a house in Seattle, and we’ve finally hit the mark and we’re moving in a couple week. But, what should we do with our condo? We’ve decided to keep it, and rent it out. But, as a mediocre software engineer and a person obsessed with data, how should I go about it? Zillow has rental zestimates, but they seem to be <em>really </em>lagging. Guessing didn’t seem right. So, I’ll do my own.</p><h4>Getting the Data</h4><p>I know craigslist is the king of rental listings, so I went there to see if I could find some units comparable to mine. Turns out, it was super easy, I just filtered it to “queen anne” units with 2+ bedrooms. And, there is an associated RSS feed for this page now too.</p><p>Here is my <a href="http://seattle.craigslist.org/search/apa?zoomToPosting=&amp;catAbb=apa&amp;query=queen+anne&amp;minAsk=&amp;maxAsk=&amp;bedrooms=2&amp;housing_type=&amp;excats=#list">example search</a>, and the <a href="http://seattle.craigslist.org/search/apa?bedrooms=2&amp;catAbb=apa&amp;query=queen%20anne&amp;s=0&amp;format=rss">associated RSS</a>.</p><p>This list is neither comprehensive nor perfect. But, definitely good enough to make this as a proof-of-concept and help me figure out the value of my unit.</p><h4>Formatting the Data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dq_T3OBWPioZG59HPc5O_w.png" /><figcaption>Finished manipulations in Excel.</figcaption></figure><p>I’ve chosen to use <a href="http://www.r-project.org/">R</a> as my tool of choice to do this analysis, because (a) everybody else seems to be using it, and (b) I think it’ll make what I want to do super easy. Unfortunately, I’m damn-near illiterate in R, and I’m too stubborn to read an intro or anything. So, I muddled my way through on my little knowledge and a lot of hacks.</p><p>The second (and almost always the hardest) step in a problem like this is getting the data into a “learnable” format. I had the data as an RSS, but how could I get that into R? Well, I had to figure out how to turn it into a CSV, because that’s the only way I know how to get data into R.</p><p>If you don’t know, there are a couple of amazing functions in Google Spreadsheet that make web scraping easy (and RSS scraping borderline illegal): ImportXML, ImportHTML, <a href="https://support.google.com/drive/answer/3093337?hl=en">ImportFeed</a> and ImportData.</p><p>In cell A1, I put this formula: =importFeed(“http://seattle.craigslist.org/search/apa?bedrooms=2&amp;catAbb=apa&amp;query=queen%20anne&amp;s=0&amp;format=rss”)</p><p>And, I instantly had 20 rows of data from craigslist. Now, for some things to regress on. Based purely on intuition (thanks <a href="https://en.wikipedia.org/wiki/Andrew_Ng">Andrew Ng</a> for using that word so often during the <a href="https://www.coursera.org/course/ml">Coursera Machine Learning class</a>) and effort-level required to extract the data, I was going to build a model on:</p><ul><li>Square footage</li><li>number of bed rooms</li><li>number of bathrooms</li></ul><p>There are a couple of other things that I’d like to take into account later, but haven’t had the time to yet: WalkScore, year built and quality (judging the pictures)<br>With a couple of simple formulas, I was able to get the easy stuff out:</p><ul><li>Price:<br>=iferror(REGEXEXTRACT(A2,”\$(….)”),””)</li><li>Square footage:<br>=iferror(REGEXEXTRACT(A2,”([0-9]{3,4})sqft”),””)</li><li>Number of bedrooms:<br>=iferror(REGEXEXTRACT(A2,”(.)bd”)&amp;”bed”,””)</li><li>Number of bathrooms: =iferror(REGEXEXTRACT(A2,”(\d)\s{0,1}ba”)&amp;”bath”,””)</li></ul><p>Turns out the number of bathrooms was unusable because the number is not in a standardized format in the title like the others. So, I ended up excluding it from my model because it wouldn’t have been able to contribute anything. Also, bathrooms are usually listed as: 1, 1.25, 1.5, 1.75, 2, 2.25, etc… so this regex doesn’t work well</p><p>Next, it’s much easier to build a model when you’ve “dummy coded” the categorical values. So, I had to get the number of bedrooms split up. I’ve included a screenshot of what this looks like. But basically, I created a column called “2bed”, and put a 1 in the row if that was a 2 bedroom unit, 0 if it was something else. Then did the same for 3 bedrooms, and 4 bedrooms</p><p>Now, I just saved this to CSV.<br>For those of you who prefer the “just effin’ show me!” approach, <a href="https://docs.google.com/spreadsheet/ccc?key=0Ar4kfZZXcgkddGpkTGhVRnpzNWlwdGtPM1RRcmJzb1E&amp;usp=sharing">here is the spreadsheet</a>.</p><h4>Building the Linear Model in R</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OLNYYpOtbFrrowRtTFF1yw.png" /><figcaption>Building the model in RStudio</figcaption></figure><p>This might be cheating… but I’m actually using <a href="https://www.rstudio.com/ide/download/">RStudio</a>. It seems to make things a little easier to understand. Once I had usable data in a CSV, building the model was actually really easy. It was only a fewlines!</p><p>rents = read.csv(“Documents/adam/house/qarents.csv”)<br>rents &lt;- head(rents,20)<br>m &lt;- glm(price ~ sqft + X2bed + X3bed, data=rents)<br>predict(m,data.frame(sqft=909,X2bed=1,X3bed=0,X4bed=0))</p><p>Et viola! I’ve got an answer for what I’m going to rent our condo for! (kind of)</p><h4>Conclusion</h4><p>Based on my work, I think I’m actually going to ask for <strong>$100/month more</strong> than I had planned.</p><p>I noticed that professional property management companies are purposely posting units several times at slightly different locations, and us “do it yourselfers” stick to the rules (a little). Properties with professional management are typically higher-valued-units. Therefore, the ratio of high-to-low cost units on craigslist is disproportional to reality. So, I just kind of dropped my price a little.</p><p>Anyways, this was a fun Friday-night-while-watching-<a href="https://en.wikipedia.org/wiki/Star_Trek:_Deep_Space_Nine">DS9</a>-and-drinking-<a href="http://www.millerhighlife.com/">High-Life</a> project.</p><h4>Changes</h4><p>Google Spreadsheets will refresh the data from the RSS feed, so to streamline the process of getting new data, I quit using Excel and save to CSV straight from Google Spreadsheet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24ef2d227985" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>