<?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 Jeff Daniel on Medium]]></title>
        <description><![CDATA[Stories by Jeff Daniel on Medium]]></description>
        <link>https://medium.com/@jeff.daniel77?source=rss-7dce6192c69f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XQcMYmcYqGIqvNoR.jpg</url>
            <title>Stories by Jeff Daniel on Medium</title>
            <link>https://medium.com/@jeff.daniel77?source=rss-7dce6192c69f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:04:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeff.daniel77/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[Accessing the Kaggle.com API with Jupyter Notebook on Windows]]></title>
            <link>https://medium.com/@jeff.daniel77/accessing-the-kaggle-com-api-with-jupyter-notebook-on-windows-d6f330bc6953?source=rss-7dce6192c69f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6f330bc6953</guid>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[kaggle-competition]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Jeff Daniel]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 17:51:22 GMT</pubDate>
            <atom:updated>2019-08-09T13:12:14.295Z</atom:updated>
            <content:encoded><![CDATA[<p>This week is project week at <a href="https://lambdaschool.com/">Lambda School</a>, and our project was an in-class Kaggle competition. I wanted to be able to download the data and submit files using the Kaggle API, but the tutorials I found were for setting up the Kaggle API on Google Colab, using a Mac, or using Linux operating system. I searched Google for hours and finally figured it out, so I wanted to share this with other Windows users working locally with Jupyter Notebook.</p><p>First, you need to pip install the Kaggle library. In the Windows search bar type cmd and open a command prompt window. At the prompt, type “pip install kaggle” as shown below (your prompt will look slightly different).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*miwHdY0DyQiWz1xvPKxrMQ.jpeg" /></figure><p>Next, go to your Kaggle account (or create one if you haven’t yet), click the profile icon in the top right corner of the screen, and select “my profile” from the dropdown list. Scroll down to about middle of the page, and click on “Create a New API Token”. Then, a file named kaggle.json will automatically download to your downloads folder. This file contains your sign-in credentials to allow you to access the API. Once the download is complete, go back to the command prompt window.</p><p>Pretty simple so far, right? Now for the tricky part. You need to create a directory to put the API token in, so the Kaggle library will know where to look for your sign-in credentials when you try to access the API from your notebook. The problem is, you can’t just add this directory using the Windows file explorer. It must be done from the command line because you can’t create a “.file_name” from the GUI. So, from your home directory type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*oXsaT62S5pT655pDL3zzBw.jpeg" /></figure><p>This file must be named “.kaggle” and it must be in the same directory as your installation of Python, which is typically the home directory.</p><p>Once you have created the .kaggle file, navigate to your downloads directory as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/1*fnH-rjUzx31APxcvcV-0oA.jpeg" /></figure><p>Once you are in the downloads directory, you need to move the kaggle.json file to the new .kaggle directory. From the command prompt type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*FgbiWGIP062HzcvK_yV58A.jpeg" /></figure><p>Press enter and you are now ready to use the Kaggle API. To test that everything is working, type:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*jos8aIAQSTEVz5afHcD8Gw.jpeg" /></figure><p>This should bring up a list of all the active Kaggle competitions.</p><p>Next, go back to Kaggle.com, join the competition of your choice, accept the rules, click on the data tab, then scroll down and find the API link. Click on the link to save it to the clipboard, then open a Jupyter Notebook or Jupyter Lab, import kaggle, then import the data for your competition by typing “!paste-kaggle-api-link-here” as seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*a9W-NclSu9wbNEYMqIp8JA.jpeg" /></figure><p>Finally, you will need to unzip the data files. Usually, you will receive the train_features, test_features, and train_labels files, but inspect your downloaded files to make sure you have the correct file names, then unzip the files with the “!unzip” command as seen below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/1*o4S-9uEuJ323KbftzjBQpw.jpeg" /></figure><p>Congratulations! You are now ready to start exploring your dataset. This might seem like a lot of trouble if you are only planning on entering one competition, but the real value of using the Kaggle API is seen when making competition submissions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6f330bc6953" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Machine Learning to Solve Real-World Problems]]></title>
            <link>https://medium.com/@jeff.daniel77/using-machine-learning-to-solve-real-world-problems-97fb089d19ef?source=rss-7dce6192c69f------2</link>
            <guid isPermaLink="false">https://medium.com/p/97fb089d19ef</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[predictive-modeling]]></category>
            <dc:creator><![CDATA[Jeff Daniel]]></dc:creator>
            <pubDate>Fri, 24 May 2019 12:56:10 GMT</pubDate>
            <atom:updated>2019-05-24T19:35:26.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*VE_jnKN_2znS36EZyFeh3Q.jpeg" /></figure><p>Ten weeks into my <a href="https://lambdaschool.com/">Lambda School</a> experience, and we have completed an end-to-end machine learning project. The project was set up as a week-long Kaggle competition within our class, using Tanzania water pump data from <a href="https://www.drivendata.org/competitions/7/pump-it-up-data-mining-the-water-table/page/24/">DrivenData.org</a>. Our goal was to build a classification model to predict whether the water pumps were functional, functional in need of repair, or non-functional based on the given data.</p><p>This project tested the knowledge we’ve gained thus far: data acquisition, data exploration, data wrangling, building a model, hyper-parameter optimization, model validation, model interpretation, and creating visualizations. This blog post will focus on model interpretation. If you are interested in seeing the more technical aspects, you can find the notebooks in my GitHub repository <a href="https://github.com/JLDaniel77/Water-Pump-Project">here</a>.</p><h4>Insights From Data Exploration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*WdgoHJLiFqnGYK1aEuYXBg.jpeg" /></figure><p>After building a model, I ran a permutation importance report. This report indicates that water quantity has the greatest impact on the model. Water quantity is broken down into five categories: enough, insufficient, dry, seasonal, and unknown. Looking at the graph below, we see that there are over 5,000 functioning water pumps with enough water. However, there are more than 2,000 water pumps with enough water, but non-functional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*ASi_veZXUzPoCioQcwcr5A.jpeg" /></figure><p>From the chart above, we also see that the non-functioning pumps have the highest number of dry water sources. This makes sense because a dry well would be abandoned and neglected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*wS4NkhxiPqfTbsjc0nivLQ.jpeg" /></figure><p>The chart above shows more than 4,000 non-functioning water pumps have a water quality of good. It is quite possible that some or all of the 2,000 non-functioning water pumps with a sufficient water supply (from the previous chart) could also have drinkable water.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*EOCSkQtFK27lKSt8GMySAw.jpeg" /></figure><p>From the chart above, we see that there are close to 2,000 water pumps that are non-functional with water quality of good and water quantity of enough. Surely, these water pumps would be a priority for repair, but how would you know which pumps to repair first?</p><p>You could choose a sample of water pumps at random and visit each one to see if they are in need of repairs. This may seem logical, but it might be a complete waste of time and resources. In fact, based on the distribution of water pump status in the training data seen below, we know that we have approximately a 46% chance of correctly choosing to visit a water pump that is non-functional or functional needs repair. Those are horrible odds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*_Z3WkzLoQgvCVz5hWiqDRg.jpeg" /></figure><h4>How do we improve results?</h4><p>We need to build a predictive model to increase our ability to correctly classify water pumps based on new data. With limited resources, it is not possible to visit all 14,000+ water pumps, so a targeted approach is required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*I1lW3WYFtb6WikqzHy82gg.jpeg" /></figure><p>The two charts above are a classification report and a confusion matrix. I have combined non-functional and functional needs repair for the sake of simplicity. The classification chart shows our model’s precision, recall, and f1-score; and the confusion matrix shows the number of true positives, true negatives, false positives, and false negatives based on our model.</p><p>As seen in the image below, precision is the percentage of predicted positives that were true positives, and recall is the percentage of actual positives that were correctly classified by our model. The confusion matrix shows that our model correctly predicted 6,805 water pumps as functional and 5,030 water pumps as non-functional. However, the model incorrectly predicted 1,530 non-functional water pumps as functional, and it predicted 993 functional water pumps were classified as non-functional.</p><p>The f1-score is the average of the precision and recall ratios. We use these three metrics to test the accuracy of our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*7nd-l7kEDuP3dy01h3YQwA.png" /></figure><h4>How does this relate to business?</h4><p>Assume that we only have enough resources to visit 2,000 water pumps to make repairs. We want to ensure that we are only sending out service crews to non-functioning pumps. We run our model and sort our predicted values, so we are selecting the top 2,000 pumps that our model has predicted as non-functional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*c7XRCFUTs40HrhvsJ4CjtQ.jpeg" /></figure><p>From the list of our top 2,000 predictions, we find that our model has correctly predicted 1,982 water pumps as non-functional; this is 99.1% accuracy. Compared to our earlier random sample where we only had 46% accuracy. If we had sent service crews out based on our random sample, we would have sent them to 1,080 pumps that didn’t need repairs. That is a total waste of time, money, and labor. With a predictive model, we can minimize costs and maximize resource utilization.</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dtech%26utm_content%3Dguest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://blog.usejournal.com/r/?url=https%3A%2F%2Fusejournal.com%2Fnewsletter%2Fnoteworthy-in-tech%2F%3Futm_source%3Dmedium.com%26utm_medium%3Dnoteworthy_blog%26utm_campaign%3Dtech%26utm_content%3Dguest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97fb089d19ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NFL Draft: Does Draft Round Affect Players’ Career Earning Potential?]]></title>
            <link>https://medium.com/@jeff.daniel77/nfl-draft-does-draft-round-affect-players-career-earning-potential-5921140c8ef?source=rss-7dce6192c69f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5921140c8ef</guid>
            <category><![CDATA[nfl-draft]]></category>
            <category><![CDATA[sports]]></category>
            <category><![CDATA[american-football]]></category>
            <category><![CDATA[nfl]]></category>
            <dc:creator><![CDATA[Jeff Daniel]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 23:14:07 GMT</pubDate>
            <atom:updated>2019-04-22T19:13:24.594Z</atom:updated>
            <content:encoded><![CDATA[<p>With the 2019 NFL Draft a week away, there are countless experts going round-by-round, and pick-by-pick, trying to predict where each player will be taken in the draft. This is not one of those articles. I decided to analyze the draft from a different perspective.</p><p><strong>How does draft round affect career earnings?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GfmdT1--nUV52nDxP7zlg.jpeg" /></figure><p>While NFL prospects eagerly wait to hear their name called from the podium, I am curious to know if the round a player is drafted has any affect on his career earning potential. So, I collected 20 years worth of NFL draft data from Pro-Football-Reference.com, and combined it with a list of the top 400 current players by career earnings found at <a href="https://www.spotrac.com/nfl/rankings/earnings/">Sportrac.com</a>.</p><p>The chart above shows the median career earnings for the 400 players by draft round. As expected, the median earnings for players drafted in the first round is the highest. I was surprised by the high median earnings for players drafted in the sixth round. After digging into the data, I realized that there were some big name players drafted in the sixth round of their respective drafts, notably: Antonio Brown, Jason Kelce, Mason Crosby, and of course Tom Brady.</p><p>Since I’m only looking at the top 400 earners, it makes since that there isn’t a huge difference between the median earnings after the first round. This prompted me to group the players by draft round, as seen in the chart below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZHBxNxWXyy7HCgUGptdIA.jpeg" /></figure><p>When we look at which round these 400 players were drafted, we see the majority of the top earners were drafted in the first three rounds. In fact, with the exception of Drew Brees (second round) and Tom Brady (sixth round), the players making 100 million or more were drafted exclusively in the first round.</p><p>This seems to indicate that career earnings are affected by draft round, but I’m not convinced yet of a cause-and-effect relationship. There must be other factors to consider.</p><p><strong>How does draft round affect career length?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*ypbgj4pas0wCG0Yk2k0VMQ.jpeg" /></figure><p>In the table above, I combined twenty years of NFL draft data grouping the players by draft round selected and career length in increments of five years. The number that jumps out at me is that of 4,612 players drafted, 60.9% have playing careers of five years or less. Using this number as a baseline, we see that first and second round players have significantly longer careers than later round players. Additionally, the table shows that 16.6% of players from the first round have careers longer than 10 years. The next highest round is half that number.</p><p>Now, there are many factors contributing to a player’s career length. The two primary factors being health and talent level. Since football is a physically demanding sport, there are countless players who’s careers have been cut short due to injury. In regards to talent level, you have to consider whether the player fits the coach’s scheme, has made any year-to-year improvement, or had any playing time opportunities.</p><p>With these considerations in mind, let’s look at how career length impacts a player’s career earnings.</p><p><strong>How does career length affect career earnings?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s9HKz__qzpLMPWMsfrOddA.jpeg" /></figure><p>As seen in the chart above, career length has a significant impact on career earnings. Players who have long careers make more money than players who have short careers. This is an obvious point, but it’s important because as we saw with the earlier table, 60.9% of players drafted have a career length of five years or less. Further, 93.2% of players drafted over the past twenty years have had a career of ten years or less.</p><p>Since the NFL implemented the rookie wage scale in 2011, career length has an even greater impact on career earnings than in prior years. Now players need to make it to a third or fourth contract to really make “big money”.</p><p><strong>Final thoughts</strong></p><p>While there is no reason to believe that there is a cause-and-effect relationship between the round a player is selected and their career earning potential, it is clear to see that players selected high in the draft tend to make more money than those taken lower in the draft. It’s easy to say that the better players are selected in the higher rounds, but every year there are first round busts and late round gems.</p><p>The real takeaway is that career length seems to have the most direct impact on career earnings. Talent level does play a roll, but a less talented player with a playing career of more than 10 years can earn significantly more money than a talented player with a shorter career.</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f2IVAl0TbsfES9cFGYr40g.png" /></a></figure><p>📝 Read this story later in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_read_later_text">Journal</a>.</p><p>🗞 Wake up every Sunday morning to the week’s most noteworthy Tech stories, opinions, and news waiting in your inbox: <a href="https://usejournal.com/newsletter/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=guest_post_text">Get the noteworthy newsletter &gt;</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5921140c8ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Driverless Trucks: Why Drivers Are Not as Replaceable as Some May Think]]></title>
            <link>https://medium.com/@jeff.daniel77/driverless-trucks-why-drivers-are-not-as-replaceable-as-some-may-think-36f6584a5ae9?source=rss-7dce6192c69f------2</link>
            <guid isPermaLink="false">https://medium.com/p/36f6584a5ae9</guid>
            <category><![CDATA[driverless-vehicles]]></category>
            <category><![CDATA[trucking]]></category>
            <category><![CDATA[logistics]]></category>
            <dc:creator><![CDATA[Jeff Daniel]]></dc:creator>
            <pubDate>Thu, 11 Apr 2019 15:26:24 GMT</pubDate>
            <atom:updated>2019-04-11T15:26:24.818Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Automation has reshaped life in the 21st Century.</strong> It has transformed how we do business, and no industry has been impacted more by automation than the manufacturing industry. Automation has increased productivity, without increasing labor costs. It has improved efficiency, so more product can be produced in a shorter amount of time. And automation has improved job site safety by taking some of the heavy lifting away from the workers.</p><p>However, these benefits have come at a price…jobs. In fact, the U.S. lost 5.6 million manufacturing jobs between 2000 and 2010, and around 85% of the jobs lost were due to automation (<a href="https://www.ft.com/content/dec677c0-b7e6-11e6-ba85-95d1533d9a62">Federica Cocco, Financial Times</a>). And now, automation has its sights set on the trucking industry. There is mounting fear that driverless technology will put 3.5 million drivers out of work. However, it’s our belief that drivers won’t be so easily replaced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2NC8FHgGwxDw7pw8fR1iw.jpeg" /></figure><h4>Drivers perform critical tasks that can’t be automated</h4><ul><li>Hooking up airlines</li><li>Hooking and unhooking trailers</li><li>Fueling the truck</li><li>Performing pre-trip inspections on trailers (checking for leaks, tears, holes, and road worthiness)</li><li>Liaison between the shipper/receiver and the trucking company</li></ul><p>Of all the responsibilities of being a driver, the most overlooked (and underappreciated) is that drivers interact with customers daily. They provide shippers with order information, so the correct freight is loaded on their trailer. They provide receivers with paperwork showing what’s on the trailer and where the load originated. Drivers also provide dispatch with critical information regarding delays, breakdowns, and wrong or missing load information.</p><h4>The cost of replacing existing fleet will be high</h4><p>Replacing standard trucks with driverless trucks will be very expensive in the short-term, which may prevent smaller trucking companies from investing in a new technology. In fact, a lot of the smaller companies have too much money tied up in their current assets, and will not have the available capital to invest in driverless trucks. As seen with most advancements in technology, there will be a lag between the introduction of driverless technology and widespread implementation.</p><p>Driverless trucks will also be a financial burden on shippers and receivers. Often times, drivers are responsible for moving trailers on a customer’s lot, assisting with the loading or unloading of freight, and verifying that the paperwork matches their load information. With driverless trucks, these responsibilities will be solely on the shippers and receivers. If the shipper makes a mistake, no one is going to catch it till the load arrives at the receiver, which might cost the customer thousands of dollars, not to mention lost time without product.</p><h4>The immediate impact of driverless trucks</h4><p>Driverless technology is the future of trucking, but that future will still need experienced drivers. In fact, most of the driverless trucks being tested now still require a human driver to navigate non-interstate roads. Pedestrians, cyclists, road construction, traffic lights, and stop signs all make it very difficult for driverless trucks to navigate city roads…it will be even more difficult to navigate rural roads.</p><h4>The Role of Driverless Trucks</h4><p>Driverless trucks should initially be used to supplement a company’s current fleet. They can help smooth out capacity issues caused by driver turnover and used to shuttle loads between terminal hubs, especially when the majority of the miles are on the interstate. This will free drivers up to stay in a central location, which will allow them to spend more time at home with their families.</p><h4>Closing Thoughts</h4><p>While change can be scary, it is inevitable. No matter how much we may want things to stay the same, technology is constantly evolving and impacting our lives in new and exciting ways. Driverless trucks should be embraced. They will reduce accidents caused by driver fatigue or error, and they will help reduce the stress related to driving long distances. But drivers should rest assured that they play a vital roll in the trucking industry, and that is not going to change any time soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36f6584a5ae9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>