<?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 Kerry Benjamin on Medium]]></title>
        <description><![CDATA[Stories by Kerry Benjamin on Medium]]></description>
        <link>https://medium.com/@kerry_benjamin1?source=rss-78ff5a2855cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EG-Qd583Kn6OASOJ9LYimA.jpeg</url>
            <title>Stories by Kerry Benjamin on Medium</title>
            <link>https://medium.com/@kerry_benjamin1?source=rss-78ff5a2855cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 13:28:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kerry_benjamin1/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[Playing with Free Code Camp Data Pt 2]]></title>
            <link>https://medium.com/the-data-logs/playing-with-free-code-camp-data-pt-2-946485a59c3c?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/946485a59c3c</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Mon, 24 Sep 2018 16:06:38 GMT</pubDate>
            <atom:updated>2018-09-24T16:06:38.578Z</atom:updated>
            <content:encoded><![CDATA[<p>Getting deep into the data</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*5l9gZbxPNAAyKkQuIHoZOg.jpeg" /></figure><p>Heyo everyone! Happy that you’re back. Today we’re finishing this project. We’re analyzing the people who are interested in the data scientist and data engineer positions from the <a href="https://medium.com/the-data-logs/playing-with-free-code-camp-data-6393cbf407af">2016 Free Code Camp survey</a> to build a customer persona. We started the EDA process by finding out the age range of our participants. Let’s figure out how many already went to tech bootcamps.</p><pre>table(DSInt_df$AttendedBootcamp)</pre><pre>0     1<br>622   13</pre><p>Don’t be alarmed by this. In R, 1 is considered to be True and 0 is False. I originally went through a super sleuth method of figuring this out before I actually google it. You live and you learn. For convenience, this is something that’s easily fixed:</p><pre>DSInt_df$AttendedBootcamp &lt;- factor(DSInt_df$AttendedBootcamp, levels = c(1, 0), labels = c(&#39;Yes&#39;,&#39;No&#39;))</pre><pre>table(FCC_df$JobRelocateYesNo)<br>Yes  No <br> 13 622</pre><pre>DSInt_df %&gt;%<br>    ggplot(aes(AttendedBootcamp)) +<br>    geom_bar(fill = &quot;green&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*TNJkMoTrgK8Xsx7UIIg2CQ.png" /></figure><p>It is clear that a large amount of our prospects have never went to a bootcamp. This eliminates further questions on this topic such as if they graduated, if they got a job afterwords, how much they make now, etc. Sometimes these things happen. You just have to make the most of what you have. And with that we move on to more questions.</p><p><strong>Are you a software developer?</strong></p><p>It is very common for someone in a technical role to transition to another technical role with similar skill sets. Considering that a data engineer has a lot of skills a developer would have, it isn’t a surprise that software development was usually they position they held previously. Let’s take a look.</p><pre>DSInt_df$IsSoftwareDev &lt;- factor(DSInt_df$IsSoftwareDev, levels = c(1, 0), labels = c(&#39;Yes&#39;,&#39;No&#39;))</pre><pre>table(DSInt_df$IsSoftwareDev)<br>Yes  No<br>  0   0</pre><p>Huh, that’s odd. While not impossible I highly doubt that there wasn’t at least 1 software developer within the group of prospects. Let’s see if we can find a cause of this:</p><pre>summary(DSInt_df$IsSoftwareDev)</pre><pre>Yes   No NA&#39;s <br>   0    0  646</pre><p>646 NAs. That would mean our prospects left this question black for one reason or another. Disappointing but we continue to move forward.</p><p>While I’ve already answered my initial 4 questions, I have a few more things I’m interested in looking into. For example:</p><p><strong>How big of a city do our prospects live in?</strong></p><pre>DSInt_df %&gt;%<br>ggplot(aes(CityPopulation)) +<br>  geom_bar(fill = &quot;magenta&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*bkfvkzFh-Xd_0NsYxZoLRA.png" /></figure><p>It goes without saying that most prospects live within large cities. The biggest majority with populations bigger than a million. 229 to be exact. For a marketing push this is helpful in deciding where to focus. But I feel like there’s more we can get from this. Of the folks living within these areas, what is their employment status?</p><pre>DSInt_df %&gt;%<br>  ggplot(aes(CityPopulation, fill = EmploymentStatus)) +<br>  geom_bar()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*pBIJwkSKKBRtCo2HPgRzHw.png" /></figure><p>This is the same plot as the previous one except each bar is now filled with colors that reflect their employment status. This is a neat way for you to see and compare where everybody stands. You can see that most people here are currently working but probably looking for work.</p><pre>DSInt_df %&gt;%<br>  ggplot(aes(CityPopulation, fill = EmploymentStatus)) +<br>  geom_bar(position = &quot;dodge&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*M9J-_u55bt9od__DTKuoUQ.png" /></figure><p>By changing the positioning of the bar chart by employment status you can view each employment status side by side by city population group. This way you can see how much the individuals who are employed are a bigger group in each city population regardless of how big. This is followed by those unemployed but looking.</p><p>All in all, there are 267 people looking for work and 137 people or are jobless but looking. It would have been really interesting to see the field in which the individuals were employed on top of that but alas, over 400 observations where missing. Seeing a running theme here? Now, there are a multitude of actions that can be taken for handling missing data. In every case the facts remains that it changes the story and/or the truth of data so you have to be careful and be aware of whatever trade off you might be making. For this project, I didn’t want to change the story that wasn’t there and let you all know what is and isn’t available. My github will show more of my code where I tried to look into things and discovered decent chunks of missing data.</p><p>We’re in the final stretch now with a few questions left.</p><p><strong>What’s the education level of our demographic?</strong></p><pre>DSInt_df %&gt;%<br>  ggplot(aes(SchoolDegree)) +<br>  geom_bar(fill = &quot;Turquoise&quot;) +<br>  coord_flip()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Mz8kZfURnLfMxf1NNq6aMg.png" /></figure><p>So at the time the majority of all prospects had a bachelors degree. It would be interesting to see what this looks like now and have it matched up against the level of education different companies ask for. Maybe a future project?</p><p>Now, how much are our prospects expecting to make with data?</p><pre>ggplot(DSInt_df, aes(x = ExpectedEarning)) +<br>  geom_histogram(fill = &quot;dark green&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*mo8dzJSZH617DnsCjYJWvw.png" /></figure><p>The data skews to the right. This is quite interesting. Considering that a quick search on <a href="https://www.glassdoor.com/Salaries/us-data-scientist-salary-SRCH_IL.0,2_IN1_KO3,17.htm">Glassdoor </a>shows the base pay for data scientists this year is $120,931. The average is half that according to this data. The highest counts appear to hover around 60k. I’m curious as to how much our prospects have researched these salaries or if they all just guessed something. The minimum is actually $6000 and the max $200,000(Which is possible if you work in an industry like banking.)</p><p>Considering that there is a relationship between educational level and wages, it’d be interesting to look at what people expect to make based on their degree:</p><pre>DSInt_df %&gt;%<br>  mutate(SchoolDegree = fct_infreq(SchoolDegree)) %&gt;%<br>  ggplot(aes(SchoolDegree, ExpectedEarning)) +<br>  geom_boxplot() +<br>    coord_flip()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*hN4dHVIqChV1XdAd3yezaQ.png" /><figcaption>The magical boxplot.</figcaption></figure><p>The is a great way to combine the data we’ve seen previously to give a bit more context. For example, the minimum for every education group is less than $50,000. The maximum for each group with the exception of those who have studies trades are over $100,000. Bachelor degree holders have the highest max at about $125,000. Phds expect a higher median pay than all groups excluding the small amount of non-GED holders but have a smaller maximum pay than the groups excluding the same non-GED groups and associate’s degree holders. It’s interesting to see that the few people with no high school diploma/GED actually expect to make more than people who have trade skills.</p><p>So with that we’ll create 2 basic marketing personas based on our data. We’ll call them Frank and Jane.</p><p>Frank is a 24 year old man who recently graduated from his university with a bachelors degree in computer science and is currently working. Frank is hoping to transition into a data science role in the future and hopes to make $65,000 in a starting salary.</p><p>Jane is a 26 year old woman who recently graduated with a Phd in statistics and is currently employed. She however would like to explore her options and is curious about a machine learning role. She hoping for a starting salary of about $80,000.</p><p>Thanks for sticking around for this analysis. The challenge of doing what you can despite missing data while tedious can be fun. I may compare this data to the 2017 survey to see if the story or personas have changed any. If you’re interested, David Venturi did his own analysis on <a href="https://medium.freecodecamp.org/developing-data-scientists-engineers-710f4ef5a773">this subset of data</a> as well as two others articles based on other factors FreeCodeCamp data. I suggest you take a look!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=946485a59c3c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/playing-with-free-code-camp-data-pt-2-946485a59c3c">Playing with Free Code Camp Data Pt 2</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic SQL For Data Analysis]]></title>
            <link>https://medium.com/the-data-logs/basic-sql-for-data-analysis-3c5624d06d3d?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c5624d06d3d</guid>
            <category><![CDATA[street-fighter]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Wed, 06 Sep 2017 14:16:01 GMT</pubDate>
            <atom:updated>2017-09-06T18:14:33.919Z</atom:updated>
            <content:encoded><![CDATA[<p>Learn one of the most popular data languages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Uowq47sqS4a-B9ClJ6fI7A.jpeg" /></figure><p>Hello everybody. Hope you’ve been well. Today we’ll be looking at SQL, a language that’s very important to learn when you’re working with databases. As usual, I want to give you an easy to understand 101 of both SQL and databases. With a tiny bit of effort using SQL can be pretty fun and simple. Let’s get started.</p><h4>Databases: What are they?</h4><p>Before we start pulling all the fancy data with a new toy, let’s understand what a database is. A database is an organized collection of data. This can be anything from financial data, students in a university, players in an online video game etc. Databases are useful for pretty much every kind of company and institution and come in many varieties.</p><p>You may have seen things like <a href="http://www.oracle.com/technetwork/database/index.html">Oracle</a>, <a href="https://www.mysql.com/why-mysql/">MySQL</a>, <a href="https://www.postgresql.org/about/">PostgreSQL</a>, etc when looking up databases or a tech blog. These are called relational database management systems. In short, software that allows us to create and manage databases. In this article I’ll be using the RDMS <a href="https://www.sqlite.org/about.html">SQLite</a> . It is pretty easy to set up.</p><p>SQL is the language that talks to relational databases in order to store, update, change, and delete data. As to show you how it works, I’ll be creating a database in SQLite with data I created related the video game, <a href="http://streetfighter.com/">Street Fighter 5</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*etAWDnsrkT1Ge4VfMGYRmw.png" /><figcaption>Image and characters property of Capcom.</figcaption></figure><h4>Creating a Database and Importing File</h4><p>The first thing we’ll do is create a database. We’ll just call it testDB.</p><pre>-- Creating a new Database Note, statements go after sqlite&gt;<br>sqlite&gt; .open C:/sqlite/testDB.db<br>sqlite&gt; .databases<br>seq  name             file<br>---  ---------------  --------------------<br>0    main             C:\sqlite\testDB.db</pre><p>And done. The first line tells SQLite I want to make a permanent database in a specific location called testDB. The second line is just to make sure that the file has been created. Simple non? But alas our database is empty. Let’s fix that now.</p><p>Like I mentioned earlier, I created a CSV file of data related to characters in SF5. Like with R, I can upload this file into a database in order to start working with it.</p><pre>--First create a table<br>sqlite&gt; create table SF5Characters( Name Text  Not Null, Health  Int Not Null, Stun  Int Not Null, Origin Text Not Null, Projectile  Text Not Null, Command_Grab  Text Not Null);</pre><pre>sqlite&gt; .mode csv<br>sqlite&gt; .import C:/sqlite/SF5Characters.csv SF5Characters<br>sqlite&gt; .header on<br>sqlite&gt; .mode column</pre><p>In the create table statement I created a table. A table is pretty much the same thing as a data frame in R. It holds a specific set of data for us to view manipulate etc. The lines following are the names of the columns, the datatype the column will be accepting, and Not Null meaning it will not accept blank fields. Each column name is separated by a comma and the statement ends with a semicolon.</p><p>The next two lines are to let SQLite know that a CSV file will be coming and the actually importing of the file. Finally the next 2 lines are just so the output of our SQL statements will be clean.</p><h4>Working With Data: SQL Statements &amp; Queries</h4><p>We can finally start playing SQL now! Hooray! Most SQL queries look something like this:</p><pre>SELECT column_name FROM table_name WHERE column_name = &quot;Frank&quot;;<br>filter(dataframe, column_name == &quot;Frank&quot;)  #dplyr equivalent in R</pre><p>All queries end in semicolons. Queries are made up of statements (the upper case words) that structure how you want the data returned. The four most common statements are:</p><ol><li>SELECT: Choose this data</li><li>UPDATE: Change this data</li><li>INSERT: Add new data</li><li>DELETE: Remove this data</li></ol><p>Also for the those not familiar with SF5 here’s what some of the columns mean.</p><ol><li>Health: How much damage a character can take.</li><li>Stun: How damage a character can take before they are “stunned” or immobilized.</li><li>Origin: What Street Fighter game did a character debut in.</li><li>Projectile: Does a character have a “fireball” type move.</li><li>Command_Grab: Does the character have a special grab besides universal?</li></ol><p>Now that those definitions are out of the way let’s start by figuring how many rows are in this table:</p><pre>SELECT COUNT(*) FROM SF5Characters;<br>----------<br>27</pre><p>Our first query. Looking good except one problem. There’s 26 characters in this data set. Why do we have 27 rows? Let’s investigate.</p><pre>sqlite&gt; SELECT Name from SF5Characters;<br>Name<br>Name<br>Ryu<br>&quot;Chun li&quot;<br>Nash<br>&quot;M. Bison&quot;<br>Cammy<br>Birdie<br>Ken<br>Necalli<br>Vega<br>&quot;R. Mika&quot;<br>Rashid<br>Karin<br>Zangief<br>Laura<br>Dhalsim<br>F.A.N.G<br>Alex<br>Guile<br>Balrog<br>Ibuki<br>Juri<br>Urien<br>Akuma<br>Kolin<br>Ed<br>Abigail</pre><p>Ah I see the problem. The column name “Name” was accidentally added in as a part of the data set. Let’s put delete to work.</p><pre>sqlite&gt; DELETE FROM SF5Characters WHERE Name = &#39;Name&#39;;<br>sqlite&gt; SELECT COUNT(*) FROM SF5Characters;<br>----------<br>26</pre><p>There we go. Now let’s answer some basic questions.</p><p>Which characters are completely new to the Street Fighter Series?</p><pre>sqlite&gt; SELECT * FROM SF5Characters WHERE Origin = &quot;SF5&quot;;</pre><pre>Name        Health      Stun        Origin      Projectile  Command_Grab<br>----------  ----------  ----------  ----------  ----------  ------------<br>Rashid      950         1000        SF5         Yes         No<br>Laura       1000        1000        SF5         Yes         Yes<br>F.A.N.G     950         950         SF5         Yes         No<br>Alex        1025        1050        SF5         No          Yes<br>Kolin       1000        1000        SF5         Yes         No<br>Ed          1000        1000        SF5         Yes         No<br>Abigail     1100        1050        SF5         No          Yes</pre><p>SQL statements can give you all the data you need at once if you use the * after Select. This is convenient so that you don’t have type another statement in order to figure something out. But we got another problem. Alex is not new to Street Fighter but Necalli is. Update will come to our rescue.</p><pre>sqlite&gt; UPDATE SF5Characters Set Origin = &quot;SF5&quot; WHERE Name = &quot;Necalli&quot;;</pre><pre>sqlite&gt; UPDATE SF5Characters Set Origin = &quot;SF3&quot; WHERE Name = &quot;Alex&quot;;</pre><pre>sqlite&gt; SELECT * FROM SF5Characters WHERE Origin = &quot;SF5&quot;;</pre><pre>Name        Health      Stun        Origin      Projectile  Command_Grab<br>----------  ----------  ----------  ----------  ----------  ------------<br>Necalli     1000        1000        SF5         No          Yes<br>Rashid      950         1000        SF5         Yes         No<br>Laura       1000        1000        SF5         Yes         Yes<br>F.A.N.G     950         950         SF5         Yes         No<br>Kolin       1000        1000        SF5         Yes         No<br>Ed          1000        1000        SF5         Yes         No<br>Abigail     1100        1050        SF5         No          Yes</pre><p>Fixed. There are 7 characters new to the series so far. 2 characters have less than 1000 health, 5 have projectile attacks and 3 have command grabs. Good to know.</p><p>How about we do a bit of organizing? Let’s get a list of all the characters by from lowest to highest health. We can use a clause called ORDER BY to do that. a clause is a word that comes after FROM to return data under more specific commands.</p><pre>sqlite&gt; SELECT Name, Health FROM SF5Characters ORDER BY Health ;</pre><pre>Name        Health<br>----------  ----------<br>Akuma       900<br>Cammy       900<br>Karin       900<br>Dhalsim     925<br>Chun li     950<br>Nash        950<br>R. Mika     950<br>Rashid      950<br>F.A.N.G     950<br>Guile       950<br>Ibuki       950<br>Juri        950<br>Urien       950<br>Ryu         1000<br>M. Bison    1000<br>Ken         1000<br>Necalli     1000<br>Vega        1000<br>Laura       1000<br>Kolin       1000<br>Ed          1000<br>Birdie      1025<br>Alex        1025<br>Balrog      1025<br>Zangief     1050<br>Abigail     1100</pre><p>What if you only want characters with a projectile and a command grab? Then there’s the handy AND clause for that. Basically if both parts of the statement is true, you’ll get the results.</p><pre>sqlite&gt; SELECT Name, Health FROM SF5Characters WHERE Projectile = &quot;Yes&quot; AND Command_Grab = &quot;Yes&quot;  ORDER BY Health ;</pre><pre>Name        Health<br>----------  ----------<br>Laura       1000</pre><p>Huh, just Laura. I guess that makes her unique. I hope you got the gist of it. In SQL think of the data that you want returned to you and create the query that’ll allow you to do that. With a bit of practice you can get the hang of this in no time. Speaking of practice, here’s a a few links to some SQL tutorials. Best part about them is that they’re free and you don’t have to download a database in order to practice! How neat is that?</p><ol><li><a href="https://www.datacamp.com/courses/intro-to-sql-for-data-science">DataCamp SQL</a></li><li><a href="https://www.sqlteaching.com/#!select">SQLTeaching</a></li><li><a href="https://sqlbolt.com/">SQLBolt</a></li><li><a href="https://www.codecademy.com/learn/learn-sql">Codecademy SQL</a></li></ol><p>Well that’s all for now everyone. With the resources listed you can get started on SQL in no time at all. I might do a article in the future that shows you how you can access a database through R! It ought to be fun. If there’s something you’d like me to clear up please let me know.</p><p>If you liked this article hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c5624d06d3d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/basic-sql-for-data-analysis-3c5624d06d3d">Basic SQL For Data Analysis</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My 1st Machine Learning Project PT1]]></title>
            <link>https://medium.com/data-science/my-1st-machine-learning-project-pt1-2f4368f63f52?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f4368f63f52</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Wed, 09 Aug 2017 13:01:01 GMT</pubDate>
            <atom:updated>2017-08-09T13:01:01.757Z</atom:updated>
            <content:encoded><![CDATA[<p>Finally the moment has arrived</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ggCqQduKXeaTLuP8bjxXfA.jpeg" /><figcaption><a href="https://www.flickr.com/photos/wocintechchat/25497596540/in/photostream/">WOCinTechChat</a></figcaption></figure><p>Helloooooo everyone! Hope you’ve all been well. I’m making do on my promise from my <a href="https://medium.com/the-data-logs/machine-learning-as-explained-by-a-beginner-dd5b8119a45">last post</a>. Today we’ll be focusing on linear regression. The data set is on houses sold between May 2014 and May 2015 in the King County area. You can download it yourself on <a href="https://www.kaggle.com/harlfoxem/housesalesprediction">Kaggle</a>. It’s a great place to find data sets and practice machine learning. So if you’re as excited as I am let’s get started.</p><h4>Linear Regression</h4><p>Linear regression is an algorithm that uses variables (or features for machine learning) to predict a quantitative variable (the target variable). More specifically it tries to fit a straight line through the data that best represents the relationship between the predictor variables and the target variable.</p><p>Think of the salary example I made in the last post. You’re trying to predict the salary you’ll make based on the years of experience someone has. The salary is the target variable and the years of experience is the predictor variable. The target variable for this data set is going to be the price of the houses. What of our predictors? Let’s load this in and see what we got. A list of what they represent can be found<a href="https://rstudio-pubs-static.s3.amazonaws.com/155304_cc51f448116744069664b35e7762999f.html"> here</a>.</p><pre>Housing_df &lt;- read.csv(&quot;kc_house_data.csv&quot;)<br>str(Housing_df)<br>&#39;data.frame&#39;: 21613 obs. of  21 variables:<br> <br>$ id           : num  7.13e+09 6.41e+09 5.63e+09 2.49e+09 1.95e+09 ...<br> <br>$ date         : Factor w/ 372 levels &quot;20140502T000000&quot;,..: 165 221 291 221 284 11 57 252 340 306 ...<br> <br>$ price        : num  221900 538000 180000 604000 510000 ...<br> $ bedrooms     : int  3 3 2 4 3 4 3 3 3 3 ...<br> $ bathrooms    : num  1 2.25 1 3 2 4.5 2.25 1.5 1 2.5 ...<br> <br>$ sqft_living  : int  1180 2570 770 1960 1680 5420 1715 1060 1780 1890 ...<br> <br>$ sqft_lot     : int  5650 7242 10000 5000 8080 101930 6819 9711   7470 6560 ...<br> <br> $ floors       : num  1 2 1 1 1 1 2 1 1 2 ...<br> $ waterfront   : int  0 0 0 0 0 0 0 0 0 0 ...<br> $ view         : int  0 0 0 0 0 0 0 0 0 0 ...<br> $ condition    : int  3 3 3 5 3 3 3 3 3 3 ...<br> $ grade        : int  7 7 6 7 8 11 7 7 7 7 ...<br> $ sqft_above   : int  1180 2170 770 1050 1680 3890 1715 1060 1050 1890 ...<br> <br>$ sqft_basement: int  0 400 0 910 0 1530 0 0 730 0 ...<br> <br>$ yr_built     : int  1955 1951 1933 1965 1987 2001 1995 1963 1960 2003 ...<br> <br>$ yr_renovated : int  0 1991 0 0 0 0 0 0 0 0 ...<br> <br>$ zipcode      : int  98178 98125 98028 98136 98074 98053 98003 98198 98146 98038 ...<br> <br>$ lat          : num  47.5 47.7 47.7 47.5 47.6 ...<br> <br>$ long         : num  -122 -122 -122 -122 -122 ...<br> <br>$ sqft_living15: int  1340 1690 2720 1360 1800 4760 2238 1650 1780 2390 ...<br> <br>$ sqft_lot15   : int  5650 7639 8062 5000 7503 101930 6819 9711 8113 7570 ...</pre><p>Not counting price we have a total of 20 possible predictor variables. If we chose only one, it would be called simple linear regression. If we choose more than 1, multi-linear regression. Easy enough, non? Now how do we choose what variables we should be using? One method is to just use everything to build a model, evaluate that model on a specific criteria, then remove each predictor 1 by one. Another method which we’ll preform is to think logically on each predictor to see if it would be statistically significant to create a model and make a good prediction. To be more specific, we’ll be keeping variables that are ordinal in nature.</p><p>So let’s start removing a few now. ID &amp; zipcode can go. They’re both labels that don’t numerically tell you if a number is better than another. AN id of 2346 is not better than 2342. So now we’re down to 18. Next we’ll remove latitude and longitude. These are just a house’s coordinate on a map. For a linear regression model they aren’t needed.</p><p>The other 16 are acceptable for now. Though we need to make some tweaks. If you looked at the date variable, you’ll notice it isn’t the most legible. On top of that it isn’t quantitative either. So we’ll convert it into numbers:</p><pre>#Converting to regular text first<br>Housing_df$date&lt;- as.Date(as.Date(as.character(Housing_df$date),&quot;%Y%m%d&quot;))</pre><pre>#Now converting to number<br>Housing_df$date &lt;- as.numeric(Housing_df$date)</pre><p>Awesome. We’re now set to move onto the next step of machine learning.</p><h4>Training and Test Sets</h4><p>In machine learning you split your data into two sets: The training set and the test set. The training set is the part of the data that your model learns from. The test set is used to see how well your model predicts against data it hasn’t seen before. Why not just use the whole data set instead? Well if you did that, your model wouldn’t do well at predicting new values because because it captured the patterns of that particular set of data. Look at it this way. You study off of a practice exam for a test. You only study the answers you got as a class and the order the questions will come in without understanding the concepts. When the real test comes with questions in a randomized order, you won’t do well.</p><p>The first thing we’ll do is think of how much data will go into the training set and what will get left over to the test set. The more the better usually so I’ll be splitting the data 80–20 training-test.</p><pre>#Split data into training and test sets</pre><pre>library(caTools)</pre><pre>set.seed(1234)<br>split &lt;- sample.split(Housing_df$price, SplitRatio = 0.8)<br>training_set &lt;- subset(Housing_df, split == T)<br>test_set &lt;- subset(Housing_df, split == F)</pre><p>And it is done. The training set contains 17,839 observations and the test set will contain 3,774 observations. If you’re wondering about the set.seed it’s for working with teams. When a data set is split, the observations that ends up in one set vs another is at random. due to a random number generator. When you set a seed you’re stating where the rng starts. This allows your work to be reproducible, which is important in data science. So if your co-worker wants to evaluate your work or see where you went wrong, they can download the same data set and get the same observations as you as long as they enter the same seed.</p><p>Now we’re on to the good stuff. We’re going to build a linear regression model! Finally!</p><h4>Model Building</h4><p>A linear regression model is basically a representation of a mathematical formula. Don’t worry, we’re not getting super mathy in part 1; Just wanted to give you that heads up. Here’s how we’re going to build this model.</p><pre>model1 &lt;- lm(formula = price ~ date + bedrooms + bathrooms + sqft_living + sqft_lot + floors + waterfront + view + condition + grade + sqft_above + sqft_basement + yr_built + yr_renovated + sqft_living15 +  sqft_lot15, data = training_set )</pre><p>First we use the lm function to let so we know what kind of algorithm we’re building. Price is our target variable so we list it first. After the ~ we list all the variables we want to use for prediction. Finally let state the datset we’re using to build the model. Now if we want to see what it looks like:</p><pre>Call:<br>lm(formula = price ~ date + bedrooms + bathrooms + sqft_living + <br>    sqft_lot + floors + waterfront + view + condition + grade + <br>    sqft_above + sqft_basement + yr_built + yr_renovated + sqft_living15 + <br>    sqft_lot15, data = trainig_set)</pre><pre>Residuals:<br>     Min       1Q   Median       3Q      Max <br>-1415203  -110571   -10066    92170  4203618</pre><pre>Coefficients: (1 not defined because of singularities)<br>                Estimate Std. Error t value Pr(&gt;|t|)    <br>(Intercept)    4.687e+06  2.860e+05  16.384  &lt; 2e-16 ***<br>date           1.027e+02  1.463e+01   7.017 2.34e-12 ***<br>bedrooms      -4.568e+04  2.354e+03 -19.406  &lt; 2e-16 ***<br>bathrooms      4.805e+04  3.893e+03  12.342  &lt; 2e-16 ***<br>sqft_living    1.707e+02  5.195e+00  32.859  &lt; 2e-16 ***<br>sqft_lot      -6.375e-03  5.472e-02  -0.117  0.90725    <br>floors         2.323e+04  4.246e+03   5.470 4.56e-08 ***<br>waterfront     6.149e+05  2.042e+04  30.116  &lt; 2e-16 ***<br>view           4.267e+04  2.534e+03  16.840  &lt; 2e-16 ***<br>condition      1.979e+04  2.824e+03   7.009 2.49e-12 ***<br>grade          1.226e+05  2.515e+03  48.748  &lt; 2e-16 ***<br>sqft_above    -1.207e+00  5.074e+00  -0.238  0.81199    <br>sqft_basement         NA         NA      NA       NA    <br>yr_built      -3.663e+03  7.966e+01 -45.989  &lt; 2e-16 ***<br>yr_renovated   1.346e+01  4.408e+00   3.053  0.00227 ** <br>sqft_living15  2.293e+01  4.045e+00   5.669 1.46e-08 ***<br>sqft_lot15    -6.312e-01  8.790e-02  -7.181 7.22e-13 ***<br>---<br>Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</pre><pre>Residual standard error: 220400 on 17823 degrees of freedom<br>Multiple R-squared:  0.6607, Adjusted R-squared:  0.6604 <br>F-statistic:  2314 on 15 and 17823 DF,  p-value: &lt; 2.2e-16</pre><p>Woot! Our model is built! But what’s with all the numbers? And the stars? How good is the model? These are questions we’ll answer in part 2. Don’t want to overwhelm y’all right now.</p><p>If you learned something new and are ready for part 2 hit the recommend button!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f4368f63f52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/my-1st-machine-learning-project-pt1-2f4368f63f52">My 1st Machine Learning Project PT1</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner Explains Machine Learning 101]]></title>
            <link>https://medium.com/the-data-logs/machine-learning-as-explained-by-a-beginner-dd5b8119a45?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd5b8119a45</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Fri, 28 Jul 2017 17:27:32 GMT</pubDate>
            <atom:updated>2017-07-31T17:11:04.990Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*94h0LvfntSXZyNDrBWrMKw.jpeg" /><figcaption><a href="https://www.flickr.com/photos/wocintechchat/">WOCInTech Chat</a></figcaption></figure><p>Hey all! Hope you’ve all been well. Today I wanted to talk about something I’ve been waiting to get to for quite a while: machine learning! It is really exciting and really really deep so this primer won’t tell you all you need to know to become a “machine learning jedi ninja”. Also note that since I’m new to this topic I may make mistakes. I will be open to feedback while I continue to learn. In turn, I’ll try to make this as clear as I possibly can.</p><h4><strong>Machine Learning: What is it?</strong></h4><p>Like data science, sometimes you’ll get multiple definitions for machine learning. Here’s the way I define it. Machine Learning is program that uses algorithms that learns from data in order to make predictions. You can think of an algorithm as a series of steps used to solve a problem. They find patterns within the data that helps it make predictions.</p><h4>Types of algorithms</h4><p>There are a bunch of algorithms used in machine learning but they all typically belong in 3 groups.</p><ol><li>Regression</li><li>Classification</li><li>Clustering</li></ol><h4>Regression</h4><p>Regression algorithms typically deal with quantitative data. They look for patterns on different attributes of data in order to estimate or predict a numerical value. For example, if you have a list of employees at a company with attributes like how much they currently make and how many years they worked it’s possible for you to predict how much you might make based on your experience if you worked for that company.</p><h4>Classification</h4><p>Classification algorithms are similar to regression except for making predictions on categorical attributes. So think “gender”, “age” ,“nationality”, etc. You can use this to predict interesting things like customer churn, credit card fraud detection, or whether a company will be interested in an offer or not. Classification can even be used on images to identify things. In the medical field, a classification algorithm might be able to identify healthy and unhealthy tissue in a patient based on hundreds of images it has data on.</p><h4>Clustering</h4><p>Clustering algorithms group things together by similarity and separates them from other groups or clusters that are dissimilar. So with all the customers you have or people who liked your Facebook page you might want to see if they naturally form some sort of groups. Clustering is something you might use for exploratory data analysis. Its ability to group is useful because unlike regression, you might not know what you’re looking for in the beginning.</p><p>Clustering is very similar to the ironically named similarity matching algorithm. The main difference is that this algorithm tries to <em>identify</em> similar individuals based on data. You’ve probably interacted with this one before. Have you ever watched something on Netflix or bought something on Amazon? You ever find it interesting how they’re able make a recommendation of what you should watch or buy next? Similarity matching algorithm at work. Now you know the tech behind one of your favorite things!</p><h4>Supervised or Unsupervised</h4><p>There are 2 tasks that these 3 types of algorithms can fall into: supervised and unsupervised. A supervised algorithm tries to predict a new answer for a specific variable based on the data that is <strong>labelled</strong>. Regression &amp; classification algorithms fall into this task. Think of the term labelled<strong> </strong>like working through a math textbook with the answers in the back. By looking at them you might have an idea how to solve similar types of problems.</p><p>The reason you’ll be able to predict how much you’ll make at company A is because you have labelled data on current salaries. Or the reason you can identify what kind of mushroom you see in a picture is because a classification algorithm has data on what particular types of mushrooms already look like.</p><p>When you don’t have specific data labelled for your algorithm to learn from, this falls into an unsupervised machine learning task. This is where clustering algorithms fall. Because the data isn’t “laid out” , you don’t really know what kinds of insights or patterns an unsupervised algorithm might pick up on. Again useful for exploratory data analysis.</p><p>I hope this write up was easy to digest. There is a lot more to machine learning than this but I just wanted to give you a 101. In my next post we’ll actually go through a machine learning algorithm using some housing data. Hope you’re ready!</p><p>I’m also including some links on how machine learning is being used today. The last link a great article that explains the machine learning process using food and cooking as metaphors by <a href="https://twitter.com/BecomingDataSci">Renee Teate</a>.</p><ol><li><a href="https://www.technologyreview.com/s/607825/new-software-program-translates-thousands-of-rare-languages/?utm_campaign=Data%2BElixir&amp;utm_medium=email&amp;utm_source=Data_Elixir_132">Language Translation</a></li><li><a href="https://www.techemergence.com/machine-learning-healthcare-applications/">Medicine and Diagnosis</a></li><li><a href="https://www.programmableweb.com/news/can-machine-learning-improve-natural-and-human-disaster-outcomes/analysis/2016/03/23">Disaster Relief</a></li><li><a href="https://www.rtinsights.com/netflix-recommendations-machine-learning-algorithms/">Netflix</a></li><li><a href="http://www.becomingadatascientist.com/2017/07/17/introductory-machine-learning-terminology-with-food/">Machine Learning Terms with Food</a></li></ol><p>If you liked this and learned something new hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd5b8119a45" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/machine-learning-as-explained-by-a-beginner-dd5b8119a45">A Beginner Explains Machine Learning 101</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Technical Assignment Pt 2]]></title>
            <link>https://medium.com/the-data-logs/my-first-technical-assignment-pt2-e967680e9909?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e967680e9909</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[r]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[decision-making]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Mon, 03 Jul 2017 14:06:45 GMT</pubDate>
            <atom:updated>2017-07-03T16:46:09.404Z</atom:updated>
            <content:encoded><![CDATA[<p>Wrapping up the business questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*FJCFzIqUC7uH2ToTYMQwNw.jpeg" /><figcaption><a href="https://www.flickr.com/photos/wocintechchat/25388844584/">#WOCinTech Chat</a></figcaption></figure><p>Hiya everyone! Glad you’re back. Today we’re finishing up the<a href="https://medium.com/the-data-logs/my-first-technical-assignment-pt1-367305712e8c"> take home assignment</a> Bright asked of me. We finished off their user acquisition side of things so next we move on to retention.</p><h4>User Retention</h4><ol><li>How many users do we keep week to week?</li></ol><p>I liked these questions. I decided there were 2 ways to answer this so I did both. First I wondered how many people are retained during each week that they sign up. In other words, how many people leave during the same week they sign up?</p><pre>week1unsub &lt;- filter(Unsubscribers, Date_Left &gt;= &quot;2017-04-01&quot; &amp; Date_Left &lt;= &quot;2017-04-07&quot;)<br>dim(week1unsub)<br>week2unsub &lt;- filter(Unsubscribers, Date_Left &gt;= &quot;2017-04-08&quot; &amp; Date_Left &lt;= &quot;2017-04-14&quot;)<br>dim(week2unsub)<br>week3unsub &lt;- filter(Unsubscribers, Date_Left &gt;= &quot;2017-04-15&quot; &amp; Date_Left &lt;= &quot;2017-04-21&quot;)<br>dim(week3unsub)<br>week4unsub &lt;- filter(Unsubscribers, Date_Left &gt;= &quot;2017-04-22&quot; &amp; Date_Left &lt;= &quot;2017-04-27&quot;)<br>dim(week4unsub)</pre><pre> 901   6    #week 1<br> 1129  6    #week 2<br> 1890  6    #week 3<br> 791   6    #week 4</pre><p>This is why we created the Unsubscribers data frame in part 1. Like with the Bright_Users data frame, all we have to do is filter our the specific dates for each week and get a count of the rows. In this case, we’re filtering the Date_Left column. Week 1–4 had 901, 1129, 1890, and 791 people leave respectively. With a little bit of algebra week can work out the percentage:</p><pre>wk1 - week1unsub = 6463  6463 / 7364 * 100 = 87.7 -&gt; 88%<br>wk2 - week2unsub = 6023  6023 / 6874 * 100 = 87.6 -&gt; 88% <br>wk3 - week3unsub = 9394  9394 / 9805 * 100 = 95.8 -&gt; 96%<br>wk4 - week4unsub = 5778  5778 / 5956 * 100 = 97   -&gt; 97%</pre><p>As you can see by the numbers, most people who sign up during a week stay during that week. As for the second analysis, I wondered how many of users who signed up <strong><em>eventually </em></strong>unsubscribe?</p><pre>week1unsubo &lt;- filter(Unsubscribers, Date &gt;= &quot;2017-04-01&quot; &amp; Date &lt;= &quot;2017-04-7&quot;)<br>dim(week1unsubo)<br>week2unsubo &lt;- filter(Unsubscribers, Date &gt;= &quot;2017-04-08&quot; &amp; Date &lt;= &quot;2017-04-14&quot;)<br>dim(week2unsubo)<br>week3unsubo &lt;- filter(Unsubscribers, Date &gt;= &quot;2017-04-15&quot; &amp; Date &lt;= &quot;2017-04-21&quot;)<br>dim(week3unsubo)<br>week4unsubo &lt;- filter(Unsubscribers, Date &gt;= &quot;2017-04-22&quot; &amp; Date &lt;= &quot;2017-04-27&quot;)<br>dim(week4unsubo)</pre><pre> 1812   6  75<br> 1928   6<br> 2436   6<br> 730    6</pre><p>Breakdown by percentage.</p><pre>wk1 - week1unsubo = 5552  75.4%<br>wk2 - week2unsubo = 4946  72%<br>wk3 - week3unsubo = 7369  75%<br>wk4 - week4unsubo = 5226  88%</pre><p>Now this tells a slightly different story. While large droves of people aren’t leaving the same week the sign up, more people leave eventually. Bright keeps at least 70% of their users in each segment(signup week). Still pretty decent. As for the entirety of April, Bright retains 77% of their sign ups. So out of the 29,999 people who signed up, By May 1st they kept 23,093.</p><p>2. If a user unsubscribes, how long does it take them to do so?</p><p>The best way to answer this question is to find the median number of days. In this case, 50% of the users leave within 5 days of signing up. However, we can garner much more information by visualizing this and using a bit of statistics.</p><pre>unsub_num &lt;- as.numeric(Unsubscribers$days_unsub)<br>ggplot(Unsubscribers, aes( x = unsub_num)) + geom_histogram(fill = &quot;dark blue&quot;) <br>median(Unsubscribers$days_unsub)<br>summary(unsub_num)<br>table(unsub_num)<br>IQR1 &lt;- 18<br>Outlier1 &lt;- 0-1.5*IQR1<br>Outlier2 &lt;- 18+1.5*IQR1</pre><pre>Outlier1<br>Outlier2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*izAHpj6KZBgHSWOoxHkkiQ.png" /><figcaption>Range of days that people unsubscribe</figcaption></figure><p>Uh oh. This certainly doesn’t look good. This histogram skews heavily to the right. In this case it means that most people who unsubscribe from Bright unsubscribe really, really early. While 50% of people leave within the first 5 days, looking at this chart most people seem to leave during day one. Let’s get more into the nitty gritty.</p><pre>Time difference of 5 days #The median<br>   <br>Min. 1st Qu.  Median    Mean  3rd Qu.   Max. <br>0.00    0.00    5.00   10.93   18.00   59.00 </pre><pre><br> -27  #Outlier1 Numbers lower than this stand out<br> 45   #Outlier2 Numbers higher than this stand out</pre><p>Here is a summary of this data. The average amount of days to unsubscribe is about 10. As seen before, the earliest they leave is on the same day represented by the Min. The latest someone has left is 59 days. Using a bit of stats we can identify numbers that let us know that their are numbers that are odd and stick out a bit. In this case, any day someone unsubscribers after 45 days. There is a small segment towards the tail end of the histogram that show this group.</p><p>3. How should Bright act on this data?</p><p>So on the overall scheme of things Bright keeps a good number of people who sign up. However, for the people who do unsubscribe, they unsubscribe really early. The majority on the same day they sign up. Why is that? There should be some form of feedback that can be used to figure this out. They could have simply believed that Bright isn’t for them but we can’t say for sure without data.</p><p>Then we have the outliers. These are people who unsubscribe after a whole month. The latest someone unsubscribes is almost 2. That’s more than enough time to understand Bright’s product. So, what is it that made them leave? That’s important data to understand for long-term subscribers.</p><p>Bright’s image is also that of cheerfulness and positivity. So throughout this process they should remain on brand and find ways to offboard that keeps that in mind. “While you’re sad to seem them go, you’re happy their they tried you out and you wish them the best.” Something along those lines.</p><h4>Other questions</h4><p>This was the free style portion of the assignment. Basically they wanted to see if there any questions that I can come up with that would be interesting to analyze and where we can possibly find this type of data. Here’s what I thought of:</p><p>1a. How are signups possibly driven by our news cycle?</p><p>1b Is negative news related to the White House causing large amounts of users to sign up?</p><p>2a When are you users most active?</p><p>2b When do they respond back to you?</p><p>3a What industries do Bright users work in?</p><p>3b. Would be helpful to cater certain messages to those in high stress fields?</p><p>I’d need survey data, user data, and to observe possible hourly spikes when breaking news is announced.</p><p>Well there you have it folks. One complete analysis served right up. Though it didn’t get me the job, it did get me more experience so I’m thankful for it. If you have any questions or anything that isn’t clear let me know so I can edit and explain appropriately. If you’re also a data scientist or analyst, was there something else I could have thought about or analyzed? Could I have used machine learning or time series analysis in some way? I’m here to learn. Speaking of learning, going to have to hit the books for activity 4 &amp; 5 of the <a href="http://www.becomingadatascientist.com/learningclub/">data science learning club</a>. Machine Learning will be the next project on the list so I need to get ready.</p><p>I also hope that you all noticed that none of this analysis needed fancy calculus rocket science type math to get done. Don’t let numbers scare you, you can do this as well if you’re interested. And you’re more than capable of learning them fancy mathematics. You’re ARE a math person. ^__^</p><p>If you enjoyed this analysis and learned something new hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e967680e9909" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/my-first-technical-assignment-pt2-e967680e9909">My First Technical Assignment Pt 2</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Technical Assignment Pt1]]></title>
            <link>https://medium.com/the-data-logs/my-first-technical-assignment-pt1-367305712e8c?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/367305712e8c</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[decision-making]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[r]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Mon, 26 Jun 2017 14:06:35 GMT</pubDate>
            <atom:updated>2017-07-26T15:18:05.511Z</atom:updated>
            <content:encoded><![CDATA[<p>Going through a real world challenge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9y2K2AtRHh8rjV42Yffptg.jpeg" /><figcaption><a href="https://www.flickr.com/photos/wocintechchat/">#WOCinTech</a> Chat featuring the dope <a href="https://twitter.com/TatianaKing">Taitiana King</a></figcaption></figure><p>Hello everyone. Nice to see you again. Today’s post will be about the take home <a href="https://medium.com/the-data-logs/my-first-technical-interview-549393efc407">technical assignment</a> that I was assigned by Bright. Like I mentioned previously it was fun and tiring at the same time. I enjoyed it knowing I was being asked real business questions and asked to think of or propose solutions. Basically things data scientists and analysts will have to do on a day to day basis. Because of this, this post will also double as<a href="http://www.becomingadatascientist.com/learningclub/thread-102.html"> assignment 3</a> on the Data Science Learning Club forums(Check it out if you want data science project ideas). Let’s get started.</p><p>I was given questions based on user acquisition, user retention, and investigating further. The data set consists of 29,999 users who signed up during the month of April, the date the signed up, and the date they unsubscribed if at all. Before we dive into any of these questions we have to do a bit of house cleaning. While the data set wasn’t dirty per say it can be cleaned up to make things more convenient for you and your stakeholders. So we’ll load in the data and necessary packages so we can start scrubbing.</p><pre>#Package loading<br>library(readr)     #Used for loading data<br>library(tidyverse) #Loads in multiple useful packages<br>library(lubridate) #Used for Dates and Time</pre><pre>#Loading Data<br>Bright_Users &lt;-read_csv(&quot;C:/Users/Kerry/Desktop/data_analyst_intern_test_data.csv&quot;)</pre><pre>#Preview of Data set<br>head(Bright_Users)</pre><pre>id      start_date          end_date<br>1410821 2017-04-01 00:03:23 NULL  <br>1410822 2017-04-01 00:04:11 NULL  <br>1410823 2017-04-01 00:08:04 NULL  <br>1410824 2017-04-01 00:08:22 NULL  <br>1410825 2017-04-01 00:10:58 NULL  <br>1410826 2017-04-01 00:12:53 NULL</pre><p>It’s a start. You can’t really see anything too useful from looking at this so let’s fill in the blanks. We’ll start by using dplyr and tidyr to manipulate the Bright_Users data frame to give us the day of the week and separate the date and time.</p><pre>Bright_Users &lt;- separate(Bright_Users, start_date, c(&quot;Date&quot;, &quot;Time&quot;), sep = &quot; &quot; )</pre><pre>Bright_Users &lt;- mutate(Bright_Users, Weekday = wday(Date, label = T))</pre><p>Now we’ll further clean this so that time resembles a normal 12 hour clock and the Date column turns into the Date data type. We’ll see why this is important later.</p><pre>Bright_Users$Time &lt;- format(strptime(Bright_Users$Time, format=&#39;%H:%M:%S&#39;), &#39;%r&#39;)<br>Bright_Users$Date &lt;- ymd(Bright_Users$Date)<br>Bright_Users &lt;- Bright_Users[,c(1,2,5,3,4)]<br>head(Bright_Users)</pre><pre>id      Date       Weekday Time        end_date<br>1410821 2017-04-01 Sat     12:03:23 AM NULL<br>1410822 2017-04-01 Sat     12:04:11 AM NULL<br>1410823 2017-04-01 Sat     12:08:04 AM NULL<br>1410824 2017-04-01 Sat     12:08:22 AM NULL<br>1410825 2017-04-01 Sat     12:10:58 AM NULL<br>1410826 2017-04-01 Sat     12:12:53 AM NULL</pre><p>Looks much better now. The user retention segment of our questions are going to focus on the people who unsubscribe from Bright. Let’s create a new data frame so analysis becomes easier.</p><pre># Creating unsubscribers data and making it easier to read<br>Unsubscribers &lt;- filter(Bright_Users, end_date != &quot;NULL&quot;)<br>Unsubscribers &lt;- separate(Unsubscribers, end_date, c(&quot;Date_Left&quot;, &quot;Time_Left&quot;), sep = &quot; &quot;)<br>Unsubscribers$Time_Left &lt;- format(strptime(Unsubscribers$Time_Left, format=&#39;%H:%M:%S&#39;), &#39;%r&#39;)<br>Unsubscribers$Date_Left&lt;- ymd(Unsubscribers$Date_Left)<br>diff_days &lt;- difftime(Unsubscribers$Date_Left, Unsubscribers $Date, units = c(&#39;days&#39;))<br>Unsubscribers &lt;-mutate(Unsubscribers,  days_unsub = diff_days)<br>Unsubscribers &lt;- select(Unsubscribers, id, Date, Weekday, Time, Date_Left, days_unsub)<br>head(Unsubscribers)</pre><pre>id<br>Date<br><br>Weekday<br><br>Time<br><br>Date_Left<br><br>days_unsub<br>id      Date       Weekday Time        Date_Left  days_unsub<br>1410853 2017-04-01 Sat     12:37:01 AM 2017-04-15 14 days<br>1410996 2017-04-01 Sat     01:27:15 AM 2017-04-12 11 days<br>1410997 2017-04-01 Sat     01:27:17 AM 2017-04-01 0 days<br>1410998 2017-04-01 Sat     01:28:49 AM 2017-04-07 6 days<br>1411298 2017-04-01 Sat     03:39:14 AM 2017-04-05 4 days<br>1411433 2017-04-01 Sat     04:45:39 AM 2017-05-16 45 days</pre><p>The format is very similar to creating the original data frame but with a few important additions. I turned end_date into the exact date and time a user unsubscribes. I also calculated how long it took each individual to unsubscribe from Bright in days_unsub. Now let the real fun begin!</p><h4>User Acquisition</h4><ol><li>How many users signed up per week?</li></ol><p>This one is easy. There were about 4 weeks in April so we need 4 data frames. We’ll extract them from Bright_Users by filtering out specific dates.</p><pre>Wk1 &lt;- filter(Bright_Users, Date &gt;= &quot;2017-04-1&quot; &amp; Date &lt;= &quot;2017-04-07&quot;) <br>dim(Wk1)<br>Wk2 &lt;- filter(Bright_Users, Date &gt;= &quot;2017-04-8&quot; &amp; Date &lt;= &quot;2017-04-14&quot;) <br>dim(Wk2);<br>Wk3 &lt;- filter(Bright_Users, Date &gt;= &quot;2017-04-15&quot; &amp; Date &lt;= &quot;2017-04-21&quot;)<br>dim(Wk3);<br>Wk4 &lt;- filter(Bright_Users, Date &gt;= &quot;2017-04-22&quot; &amp; Date &lt;= &quot;2017-04-27&quot;)<br>dim(Wk4)</pre><pre>[1] 7364    5   #The 1st number is the number of subscribers<br>[1] 6874    5   # The 2nd number is the number of variables(Ex Date)<br>[1] 9805    5<br>[1] 5956    5</pre><p>Weeks 1–4 have 7364, 6874, 9805, &amp; 5956 signups respectively. Man they are crushing it!</p><p>2. What day are users most likely to sign up?</p><p>Hmm going to have to start breaking out the math cap for this one. Here’s how I solved this. Well there are 7 days in a week so 1/7 chance for choosing any day. That’s just about 14%. Let’s visualize all signups by day and see what we find.</p><pre>ggplot(Bright_Users, aes( x = Weekday)) + geom_bar(fill = &quot;violet&quot;) <br>Bright_Table &lt;- table(Bright_Users$Weekday)<br>Bright_Table<br>prop &lt;- prop.table(Bright_Table) * 100<br>prop</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*3XZneDEdpYlzM7EiS3TUkg.png" /></figure><p>Would you look at that. Tuesday leads the pack on signups for the month of April. Over 10,000 signups. Monday is about half as much. Let’s get some exact numbers.</p><pre>Sun   Mon  Tues   Wed Thurs   Fri   Sat <br> 1537  5019 10148  3906  3936  3542  1911</pre><pre>Sun       Mon      Tues       Wed     Thurs       Fri       Sat <br> 5.123504 16.730558 33.827794 13.020434 13.120437 11.807060  6.370212</pre><p>So Tuesday has exactly 10,148 sign ups in all. This is about 34% of all signups during April. Considering the 14% that a person can sign up on any day of the week, I think it is safe to say people are most likely to sign up on a Tuesday.</p><p>3. How can Bright act on this data?</p><p>Now a question like this and the next steps that come after would usually be answered by multiple people. You and a domain expert/team. In this case to best maximize how to be even better at acquisitions, you would probably work wih the marketing department, especially those focused on content creation and curating. Considering that this was just me, I used what I remembered from marketing classes to come up with some ideas.</p><p>I think Bright should evaluate the top 3 marketing channels that new users come from and evaluate the content that is produced on those channels. If they aren’t already, they should be tagged so they can be analyzed. See if you can re-purpose what you have for them or do a running theme for Wednesdays. There is a significant drop off from the middle of the work week. Perhaps a “hump day” special? Might be a good mood lifter. Also they maybe want to look up the states or time zones the current users are in. Perhaps Bright is more popular on the West Coast?</p><p>That’s it for now. In <a href="https://medium.com/the-data-logs/my-first-technical-assignment-pt2-e967680e9909">Part 2 </a>we’ll wrap up the analysis . If you have any questions be free to ask. I hope you enjoy how data analysis can be used to evaluate and help a business.</p><p>If you enjoyed reading this and can’t wait for part 2, hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=367305712e8c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/my-first-technical-assignment-pt1-367305712e8c">My First Technical Assignment Pt1</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Technical Interview]]></title>
            <link>https://medium.com/the-data-logs/my-first-technical-interview-549393efc407?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/549393efc407</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Tue, 20 Jun 2017 16:03:07 GMT</pubDate>
            <atom:updated>2017-06-23T23:23:45.469Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re not in Kansas anymore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*dMFGaQcEK8aClmopchwUNQ.jpeg" /><figcaption>Photo from <a href="https://www.flickr.com/photos/wocintechchat/">#WOCinTech Chat</a></figcaption></figure><p>Hi everyone! Hope you’re well. Like I mentioned my last <a href="https://medium.com/the-data-logs/a-year-of-data-down-but-not-out-bb0509deacde">post</a>, I had an interview about 2 weeks ago for a data analyst internship position at a startup company. It was a fun and interesting experience that I thought would be worth sharing. This post is especially for those interested in tech/data science and wondering what this looks like from a first hand account. Note: this will be different for every position, company, and experience level so my experience is not a one size fits all.</p><h4>Phase 1: Online Application</h4><p>I was perusing Indeed one day to look at data related positions to see if anything has changed in terms of what skills employers looked for. There was this one company called Bright* that stood it out a bit. It dealt with mental wellness and helping people through challenges related to work, stress, relationships, and self-esteem. I liked the fact that they created a community and platform to make something like this free and accessible to a wide range of people beyond those who can afford a wellness coach. (Cough $$$ Cough). The application on the website asked for a resume, areas I’d like to tackle and explore, and my experience with data analysis. I provided what they asked for and waited. *Bright is not the actual company name. Changed for blog post.</p><h4>Phase 2: Virtual Interview</h4><p>A day later I got contacted by Bright’s CTO who wanted to set up an interview through Skype for the following week. I was psyched! In my previous encounter job hunting for data science roles I either heard nothing back(jerks) or got rejected out right. We set up for a Tuesday morning. I was excited and that weekend felt soooooo long. Tuesday arrived and our interview started. I was asked how I found Bright, my experience with data analysis, and questions about R. He had limited knowledge of it. I would have gasped if it were not professional. So I told him how I found the role on Indeed, a previous internship where I primarily used Google Analytics, and the wonderful world of R. I told him how I started with <a href="https://medium.com/the-data-logs/datacamp-and-r-language-basics-f000cf8e0566">DataCamp over a year ago</a>, the various packages it has, the basic projects I did, and projects I planned on doing.</p><p>The interview was relaxed and pretty free flowing which I enjoyed. I in turn asked about his previous role, size of the team, the importance of growth at Bright, and compensation. He answered well. When the interview was ending he let me know that he might me send me a short technical assignment if they decide to move with my application. And so again I waited.</p><h4>Phase 3 :Technical Application</h4><p>Two days later I got an email from the Jack the CTO. They liked me and wanted to proceed with a short assignment. I got a CSV file of dummy data that’s based on their real data for their users that signed up during the month of April. I got questions related to user acquisition, user retention, how I would visualize my findings, and other questions I might find interesting to ask and maybe explore. I thought finally! This is the the stuff I heard and read about from all my tech friends. This is real! This is my shot!…..Ahem. I was pumped to say the least.</p><p>I spent day 1 just thinking over all the questions and what tools I might want to use to solve this. I spent day 2 and 3 working on it. I loved the experience because it allowed me to learn and experiment with a few new packages and work with a data type that I haven’t before. Considering that I was to turn this in to a non-R user, I also thought it to be appropriate to learn how to create a R Notebook. An <a href="http://rmarkdown.rstudio.com/r_notebooks.html">R Notebook</a> is a special kind of file where all my code and comments can exist in one place. I can run chunks of code at a time for quick experimentation and make sure things run smoothly. The coolest part is that I can export my results as a Word document, PDF file, or even a semi interactive webpage. If you’re coming from the Python world, this would be the equivalent to the <a href="http://jupyter.org/about.html">Jupyter Notebook</a>.</p><p>As fun as it was, it was a bit tiring as well. Bugs, errors, you name it. Google and Stack Overflow became my BFFs that weekend. Also I took many a break so I don’t rattle my brain for hours on end. Once, after taking a few hours off before I went to bed I suddenly had an idea I wanted to try. And lo, the bug I had long rebuked removed itself from my sight. The answer I had searched high and low for had made it self known. I raised my hands in jubilation and then my eyes closed in weariness.</p><h4>Final Round: In Person Interview</h4><p>A day after I turned in my technical assignment I got this in my inbox:</p><p>“Hi Kerry,</p><p>We’d like to invite you in for a final round of in-person interviews at our office in Brooklyn. I know it’s short notice, but would you have availability tomorrow afternoon or Thursday between 3–4:30pm to meet?</p><p>It shouldn’t take more than 1.5 hours. You’d be meeting with myself and at least one other team member. I’ll focus more on a follow up to your submitted assignment. And meeting with another team member will offer an opportunity to meet more of the team and would most revolve around more general interview and data types of questions.</p><p>Let me know if there’s a time that works! Happy to try to reschedule if neither does.”</p><p>I was excited! And nervous. I never made it this far before. I was suddenly concerned about how much I actually knew. What if they asked me a question I didn’t know the answer to? What if they ask me what my weaknesses were?(I suddenly felt like the answer was everything). Thankfully one of my best friends called me when I gave her the news and she got me to relax. She reminded me that I made it this far. I knew what I was doing and I just have to get in there. She was right. I took 1 day to relax so I wouldn’t overthink anything or doubt myself while I did more research on Bright. I wanted to ask them GOOD questions in return. I also looked up general interview questions because it had been quite a while since I had one. I was going in prepared.</p><p>Thursday arrived. I had all my questions ready and written down. I looked over my project so that I might be able to answer how to improve things. Today was the day I crush the interview and claimed that internship. NOTHING WAS GOING TO STAND IN THE WAY OF GREATNESS!!!!</p><p>…….Except the 2 train. Today was the day it decided it would get stuck in train traffic on my way to the interview. TWICE!! If there was ever a fml moment it was that day. Oh 2 train, why did you not want me to be great? Thankfully the stop I was stuck on had wifi so I was able to email Jack and give him a heads up.</p><p>I finally arrived. A little tired from running but still confident. Jack being the understanding guy that he was offered me water and a few minutes to breathe before we began. After a little respite we moved into the interviewing room. Again, the interview felt conversational so I didn’t really feel nervous or stiff. He pulled out his laptop and asked me about the assignment. I told him honestly while a little challenging it was fun. I found a few things interesting and concerning in regards to sign ups and retention. When asked about possible solutions I suggested content specified for Wednesdays when users dropped off dramatically and possibly begin tagging content so that it can be tracked and analyzed for the future. I also suggested looking into <a href="https://www.linkedin.com/pulse/sentiment-analysis-101-scott-sims">sentiment analysis </a>so that we can possibly evaluate users feedback to see if users are becoming less enthusiastic and possibly needs to be engaged personally to stay on board. He was impressed by R’s flexibility and power of the R Notebook to remove code for non-technical or non R users so that you can only see the results of the report.</p><p>I asked Jack about what skills he learned on his last job that helps him in his current role and what he’s learned about himself since working at bright. He said he’s truly grown into a leading and management role and truly wants to invest in the growth and the learning of his team. He’s also more aware that he is human and that he doesn’t have to deal with the unhealthy 80 hour work week his previous role entailed(Wowzers!). He dealt with it because he was passionate about his work in the beginning but it eventually began to wear away at him.</p><p>It was around this point that the co-CEO had entered her room for her part of the interview. Mary was filled with positive energy from the moment she stepped foot inside and easily took over. She asked me about what led me to Bright. I told of my experience job hunting and how I felt towards the end. I thought her company was brilliant because it focused on sms (text messaging) which was a bit rare and that in managed to scale a good feeling and community support through it. I thought working there would be my chance to help people through tech, a lifelong goal of mine. She responded positively to that. Our conversation almost felt like 2 friends just chatting or getting to know each other. She told me about how her previous role gave her the skills to start this one. It was also the place she met her co-founder and got the idea in the first place. I told her about the <a href="http://www.codenewbie.org/">CodeNewbie community,</a> community management, sentiment analysis, traits used to describe me, and more. It was fun.</p><p>Jack then reentered the room to discuss any last questions I may have. We then walked to the elevator where he told me I’ll hear the big news next week. I bid Jack adieu and left the building with confidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*Gfi5FWnldnCOG8_0jOPdeA.gif" /><figcaption>Actual image of me walking out of Bright’s building</figcaption></figure><h4>The Results!</h4><p>After many days of anxious waiting I finally got an email back. I….. didn’t get it. I was miffed to say the least. Jack noted that my passion to learn data science and my communication skills were very apparent. I asked about any particular weaknesses or things that lead to the other candidate. My R skills were fine. He did note tools like MySQL, Google Analytics, and Tableau might be things to look into. He also noted while not listed, they were interested in exploring machine learning applications. I have some comments.</p><p>It is true I don’t have much experience with databases. Outside of a SQLite one I have installed on my computer. While it has been a while, I already have experience with GA and R covers anything I need in regards to visualization. Also, machine learning is not usually a skill needed or asked for data analyst roles. Could be wrong of course but to each their own.</p><p>Despite the end result I’m happy that I went through this process. I now have first hand experience going through a tech interview process. I learned a ton going through the short assignment. I have areas that I’m curious about learning on my own such as databases, sentiment analysis, APIs, and more. Plus on a positive note, I made it to the final round out of 500 applicants. To me that means I’m certainly on the right path. I’m going to keep going and share with you all when I finally land my first role. In the meantime, I hit the books.</p><p>My next post will be about the technical assignment that was given to me. You’ll see how I went through answering business questions for a real company and the neat R packages I used to answer them. Hope you’re ready!</p><p>If you enjoyed this read and ready for my next post hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549393efc407" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/my-first-technical-interview-549393efc407">My First Technical Interview</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Year of Data: Down, but not Out.]]></title>
            <link>https://medium.com/the-data-logs/a-year-of-data-down-but-not-out-bb0509deacde?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb0509deacde</guid>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[reflections]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Fri, 16 Jun 2017 17:10:29 GMT</pubDate>
            <atom:updated>2017-06-18T13:34:55.429Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O_jz0dxQ6znXqQOae13Gzw.jpeg" /><figcaption>One of my favorite boxers. Roman Gonzalez. Image Belongs to (Mark Ralston / AFP/Getty Images</figcaption></figure><p>Heya everyone! I’m back! I know it has been quite a while since you’ve last seen anything from me. There’s a reason for that. This post will be a reflection of my journey of where I started till now. It has been some year.</p><p>I started the The Data Logs late January of 2016 with this <a href="https://medium.com/the-data-logs/taking-the-plunge-into-0-s-1-s-3550669189c0">post</a>. I was extremely enthusiastic and excited to learn. From there I got used to the R language, took on a few projects, got accepted into <a href="https://open.nasa.gov/blog/nasa-datanauts-fall-2017-application-open/">NASA Datanauts</a> (Applications for new members are open!), and met tons of awesome people. I couldn’t be happier really. After my 6 month mark, I started to get a little overly ambitious. Because of how much I wanted to help people, I started to volunteer my time to help them. I also started looking for data science jobs to see what I can possibly get.</p><p>I should have known better to try all of that at once. I couldn’t fully dedicate time to the the tasks of others and couldn’t really deliver. Managing the time I used to study and practice was difficult. And with job hunting it ended up being one rejection after another. This period of time was filled with frustration that eventually turned into burnout and depression. I had doubts about my path and skills. I couldn’t get motivated and basically turned away from tech related things for months. That included people, events, and Twitter. It was by far one of the lowest periods in my life I had ever faced.</p><p>Thankfully I have good friends. They checked in on me during this time to see if I was ok. It took some time but with their support and my break, I eventually found the nerve to start again. Here’s some stuff I learned during that period.</p><h4><strong>1. Know your Bandwidth</strong></h4><p>If you’re anything like me you want to do and learn everything. Shiny object syndrome some call it. While not necessarily a bad thing, you have to accept that you can’t. There is only so much you can do at a time. So, don’t say yes to everything especially if it involves other people. You’ll be doing them and yourself a disservice. You have to know yourself (and your time). Make sure you can take things on and address them appropriately.</p><h4>2. Have a System</h4><p>I kinda sorta had a plan when I was learning new things. “Kinda sorta” doesn’t really get much done. So I did a little research and started to experiment. I decided to block out 3 months of time strictly for making myself a stronger data scientist. I looked over a bunch of job applications and decided I would learn recurring skills and evaluate what my weaknesses were. After that, I invested in a to do list to set up bi-weekly goals and daily tasks that would help me get there. I evaluated that every 2 weeks to see how I was doing. This is loosely based off on <a href="http://anthonyfrasier.com/2015/12/3-month-goals/">Anthony Frasier’s 3 months goals</a>.For those day to day tasks I began using the <a href="https://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro </a>technique. Basically 25 minutes of work by 5 minutes of rest for each rep. I’ve made a lot of progress with this and I still got a month to go.</p><h4><strong>3. It is OK to take Breaks</strong></h4><p>Grind. Hustle. Team No Sleep. You’ve seen these phrases at least once. We live in a productivity culture. Getting stuff done. But we have to be reasonable. 8 hours of sleep is a game changer yo. And taking a a few minutes to a few days off a difficult tasks won’t kill you (Unless you have a strict deadline). Insights and answers tend to reveal themselves when you’re relaxed and could look at things with a fresh mind. Hustle smart.</p><p>I’ve had some more interesting experiences these last few weeks that I think you’d love to read. The next post will focus on a technical task I was assigned as part of an interview. I’ll also be writing about the interview process I wen through for a data analyst internship. I have some blog posts on the neat stuff I’ve learned recently and I have a few things I want to accomplish for the <a href="https://www.becomingadatascientist.com/2017/05/29/summer-of-data-science-2017/">Summer of Data Science 2017</a>:</p><ul><li>A project involving an <a href="http://rank.shoryuken.com/api/index">API</a></li><li>2 Machine Learning Projects</li><li>Continue studying statistics</li><li><a href="https://shiny.rstudio.com/">A Shiny App</a></li><li>Keep Blogging</li></ul><p>I’m happy to be back. I feel like I’m in a better place mentally than I was last year and I feel just if not more motivated as when I started. Of course this isn’t a “Year of Data” anymore but it’ll be a fun ride and I hope you stay with me. I have more things to learn and a whole bunch to share.</p><p>If you liked this and you’re excited for what’s next hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb0509deacde" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/a-year-of-data-down-but-not-out-bb0509deacde">A Year of Data: Down, but not Out.</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[6 Months of Data]]></title>
            <link>https://medium.com/the-data-logs/6-months-of-data-dccdf34df52d?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/dccdf34df52d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[nasa]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[space]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Tue, 26 Jul 2016 13:56:01 GMT</pubDate>
            <atom:updated>2016-07-26T13:56:01.466Z</atom:updated>
            <content:encoded><![CDATA[<p>A reflection of the half year mark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*8cA1J0HczVoyPTTyjmlTBw.jpeg" /></figure><p>Hello everyone. Hope you have been well. Thank you for joining me for another monthly reflection. I must say I’m happy about making it to the half year point. I keep finding things in the field that inspires me to keep going. Here’s a snapshot of this month.</p><p>I finished my second official data science project based on Free Code Camp survey data. (Blog post coming soon) This is the second time I’ve worked with survey data and I’m starting to find them quite fun. Being able to use a bit of my marketing skills for this project was a neat bonus as well. That concluded activity 4 for the Data Science Learning club. Activity 4 involves taking some time to learn or brush up on math skills so I’m going to continue taking the <a href="https://www.edx.org/course/i-heart-stats-learning-love-statistics-notredamex-soc120x">I Heart Stats</a> class on edX. I’ll share my thoughts when I finally complete it.</p><p>The biggest highlight of this month has been being accepted as a <a href="https://open.nasa.gov/blog/meet-nasa-datanauts-2016-class/">NASA Datanaut</a>. This is a program that NASA (Yes the one with rockets) created to teach a group programming and data science skills to work with and solve challenges based on space and earth. We’ll be working in teams to solve monthly challenges from NASA as well as have our own special track to learn new skills! I was beyond excited to read the acceptance email and travel to DC for the offline kickoff event. I’ll be writing not only about the event but about the challenges and projects I’ll be tackling with my fellow Datanauts. This will be a year long of fun!</p><p>I also may or may not but working towards my first data science position. Keep checking the blog for updates. :)</p><p>This has been probably the best 6 months I’ve had in a while and I look forward to what I accomplish around December. Thank you all for remaining supportive in my journey. I hope that this remains a useful blog to you all as well as an entertaining one. Onward into August!</p><p>If you liked this reflection hit the recommend button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dccdf34df52d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/6-months-of-data-dccdf34df52d">6 Months of Data</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playing with Free Code Camp Data Pt 1]]></title>
            <link>https://medium.com/the-data-logs/playing-with-free-code-camp-data-6393cbf407af?source=rss-78ff5a2855cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6393cbf407af</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[r-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <dc:creator><![CDATA[Kerry Benjamin]]></dc:creator>
            <pubDate>Fri, 22 Jul 2016 00:36:01 GMT</pubDate>
            <atom:updated>2018-08-29T18:22:58.815Z</atom:updated>
            <content:encoded><![CDATA[<p>Analyzing data from 2 awesome groups</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*5l9gZbxPNAAyKkQuIHoZOg.jpeg" /><figcaption><a href="https://www.flickr.com/photos/wocintechchat/">WoCinTech Photos</a></figcaption></figure><p>Hello everyone. I hope you’re doing well. Today we are going to explore data from Free Code Camp. Specifically, the data they released from their <a href="https://medium.freecodecamp.com/we-asked-15-000-people-who-they-are-and-how-theyre-learning-to-code-4104e29b2781#.t7mb1qz6v">survey </a>they did a few months ago with CodeNewbie. They were nice enough to release it to the public for us to visualize and analyze. As a big fan, I was super excited to start diving in!</p><p>For those of you who don’t know, <a href="https://www.freecodecamp.com/">Free Code Camp </a>is an online program where you can start learning HTML and CSS all the way through making web apps with various JavaScript libraries. Towards the end of the program, you’ll use your new skills to help a non-profit organization. How cool is that?</p><p><a href="http://www.codenewbie.org/">CodeNewbie</a> is quite simply one of the most supportive online communities on the web for programmers of all skill levels, in particular beginners.They have an amazing weekly podcast on a variety of topics as well as a really fun Twitter chat every Wednesday at 9pm eastern. Definitely check them out. I love them (in a totally platonic way).</p><p>This data set also doubles as Activity 3 for the <a href="http://www.becomingadatascientist.com/learningclub/thread-102.html">Data Science Learning Club</a>. The task is to ask business questions that the data will be able to answer. So I will pose a few of them throughout this post and see if there are suggestions I can provide based on my marketing and business background. Perhaps you may even have questions of you’re own?</p><p>Ok, let’s get things started. If you want to follow along, <a href="https://www.kaggle.com/freecodecamp/2016-new-coder-survey-">here’s a link</a> to where the data is hosted on Kaggle. This is in the form of a CSV file so we don’t need a package for this. We can just use the read.csv function.</p><pre>FCC_df &lt;- read.csv(&quot;~/Data/2016-FCC-New-Coders-Survey-Data.csv&quot;, header = T)</pre><p>We now have a new data frame. In this function we tell read.csv where the data is found, in this case, my data folder on my computer, as well as the name of the file. The header portion of the function tells if we’re going to use the column names found with the file or generic ones. These are either True(T) or False(F) respectively.</p><p>Let’s have a look see at what we got:</p><pre>dim(FCC)<br>15620 113 </pre><p>There are over 15,000 responses across 113 observations or variables. I used <em>dim </em>instead of <em>str </em>because of the amount of said observations.</p><p>I’ve been thinking about how I can make this analysis relevant to me and still fulfill the activity 3 challenge. After looking over the responses of the survey for jobs that readers are interested in, I noticed that there was some for data scientists and data engineers. Eureka! I want to know about these people. So we’re subsetting this data frame and making this project about them. We’ll have a little help with from some packages</p><pre>library(tidyverse)<br>library(stringr)</pre><p>For budding R users, it is always a good habit to load the packages you’ll need to use towards the beginning of a project. You’ll see it when this is up on GitHub. Tidyverse is a series of packages combined into 1 that makes EDA convenient. Instead of doing something like loading ggplot2 on one line and dpylr on another, tidyverse will load 6 packages at once. Stringr is a package used to help with operations involving strings. R is a but fussy when it comes to white space so a package like this will save you a headache. So first, we’re going to tackle the white space problem.</p><pre>FCC_df$JobRoleInterest&lt;- str_trim(FCC_df$JobRoleInterest)</pre><p><em>Str_trim </em>is a function in stringr that removes spaces before words. Now to subset the FCC to get all our hopeful data scientists and engineers:</p><pre>DSInt_df &lt;- subset(FCC_df,  JobRoleInterest == &quot;Data Scientist / Data Engineer&quot;)</pre><p>Subset is a function already in R that works like dplyr filter function. Let’s see what we go now:</p><pre>dim(DSInt_df)<br>646 118 </pre><p>Now we know that 646 people have an interest in becoming a data scientist or data engineer. That’s about 4% of the original respondents.</p><h4>Questions and Visualizations</h4><p>Now we’re on to the EDA portion of the project. There are a few things I want to know:</p><ol><li>How many respondents already went to tech bootcamps?</li><li>How many respondents currently work as software engineers?</li><li>Where are most of the prospects located?</li><li>How old are they?</li></ol><p>These questions will no doubt lead to other questions and more things to explore. What fun!</p><p>Heads up if you viewed this dataset, you’ll see a few responses titled ‘NA’. This basically means that data is missing or unavailable. In the case with this survey, it simply means that some people didn’t answer particular questions. In some cases, NA won’t effect your analysis too much or at all. However, there are functions and options you can use to take care of them.</p><p>Let’s start with age</p><pre>ggplot(data = DataP, mapping = aes(x = Age)) + geom_histogram(binwidth = 1.0, fill = &quot;dark blue&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*mEO7KK57BSZZUtn9DZeEzA.png" /></figure><p>This histogram skews heavily to the right. Which means most of this group is pretty young with the highest concentration in the mid-twenties. In this plotting function as well as a few others, ggplot2 was nice enough to not include NAs in the graph so it doesn’t interfere. Let’s dig a little deeper about the age of our respondents</p><pre>summary(FCC_df$Age)<br>   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA&#39;s <br>  14.00   22.00   26.00   27.72   31.25   65.00      74</pre><p>The youngest person is 14 and the oldest is 65. You go y’all! The median age is 27. And there are a total of 74 people who didn’t tell us their age. Boo. If we wanted to get a count for the exact numbers of each age, we can use the table function:</p><pre>table(FCC_df$Age)</pre><pre>14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 <br> 1  2  9  9 18 32 28 24 41 40 37 42 27 25 29 23 24 18 18 12 11 15 8 </pre><pre>37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 54 55 56 58 65</pre><pre>10  6  4  7  5  7  4  3  8  6  2  1  2  4  2  1  1  2  2  1  1</pre><p>I know this may look confusing but trust me, table is effective. The numbers on the top that go from 14–65 are the ages a respondent inputted. The numbers below that are how many people gave that age. For example, while 1 person is 65, there are 42 people who are 25 years old, 41 that are 22 years old and so on. Most of the people in this survey are 25 from the table. And if you look closely, you can see this on the histogram as well. We’re done with the age. Another way to express this visually is to use a stem and leaf plot.</p><p>That’s enough for now. The EDA process will continue in part 2 which will be out next week. We’ll also build a mini customer persona for a would-be data science bootcamp. If you have any questions that this data may answer respond to this post and I may include it.</p><p>If you liked this post and learned something new, hit the recommend button ^__^</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6393cbf407af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-data-logs/playing-with-free-code-camp-data-6393cbf407af">Playing with Free Code Camp Data Pt 1</a> was originally published in <a href="https://medium.com/the-data-logs">The Data Logs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>