<?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 Olubukola Ayemonisan on Medium]]></title>
        <description><![CDATA[Stories by Olubukola Ayemonisan on Medium]]></description>
        <link>https://medium.com/@ayemonisanolubukola?source=rss-fb44b72368b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ckoJ1eIDi4tQhKtQ2yfvqA.jpeg</url>
            <title>Stories by Olubukola Ayemonisan on Medium</title>
            <link>https://medium.com/@ayemonisanolubukola?source=rss-fb44b72368b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 02:40:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayemonisanolubukola/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[Predicting customer behavior on the Starbucks rewards mobile app.]]></title>
            <link>https://medium.com/@ayemonisanolubukola/predicting-customer-behavior-on-the-starbucks-rewards-mobile-app-eb5e081ad152?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb5e081ad152</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Wed, 22 Jul 2020 22:18:27 GMT</pubDate>
            <atom:updated>2020-07-23T18:56:51.071Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rm4C2sK2uQYDDtFhRnlKqg.png" /><figcaption>Image from nbc.com</figcaption></figure><h3>Introduction</h3><p>This data set contains simulated data that mimics customer behavior on the Starbucks rewards mobile app. Once every few days, Starbucks sends out an offer to users of the mobile app. An offer can be merely an advertisement for a drink or an actual offer such as a discount or BOGO (buy one get one free). Some users might not receive any offers during certain weeks. Not all users receive the same offer, and that is the challenge to solve with this data set.</p><p>The task is to combine transaction, demographic, and offer data to determine which demographic groups respond best to which offer type. This data set is a simplified version of the real Starbucks app because the underlying simulator only has one product whereas Starbucks actually sells dozens of products.</p><h3>Data Sets</h3><p>The data is contained in three files:</p><ul><li>portfolio.json — containing offer ids and metadata about each offer (duration, type, etc.)</li><li>profile.json — demographic data for each customer</li><li>transcript.json — records for transactions, offers received, offers viewed, and offers completed</li></ul><p>Here is the schema and explanation of each variable in the files:</p><p><strong>portfolio.json</strong></p><ul><li>id (string) — offer id</li><li>offer_type (string) — type of offer ie BOGO, discount, informational</li><li>difficulty (int) — minimum required spend to complete an offer</li><li>reward (int) — reward given for completing an offer</li><li>duration (int) — time for offer to be open, in days</li><li>channels (list of strings)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*7u4mgSm39fsDpe_yI2bjAw.png" /></figure><p><strong>profile.json</strong></p><ul><li>age (int) — age of the customer</li><li>became_member_on (int) — date when customer created an app account</li><li>gender (str) — gender of the customer (note some entries contain ‘O’ for other rather than M or F)</li><li>id (str) — customer id</li><li>income (float) — customer’s income</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*Y_zusKTsRF8OggKVk-GhkQ.png" /></figure><p><strong>transcript.json</strong></p><ul><li>event (str) — record description (ie transaction, offer received, offer viewed, etc.)</li><li>person (str) — customer id</li><li>time (int) — time in hours since start of test. The data begins at time t=0</li><li>value — (dict of strings) — either an offer id or transaction amount depending on the record</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*rOf6rVWNHq6EPx0__4ZVrw.png" /></figure><h3>Exploratory Data Analysis</h3><p>Doing an exploratory data analysis on customer attributes as Age, income, gender, can give us some insight into the data.</p><p>From the Charts below, we can see that men consume Starbucks products more than women with an average age of 54 (it’s a normal distribution)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*gnnBzXNgbKFQqAOJg6x7EQ.png" /></figure><p>The average age of customers is 54 (it’s a normal distribution)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*1QRHZEepouRxGuhXOCtLbA.png" /></figure><p>The average income of Customers is 65404 ( it’s a right-skewed distribution)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*KH_qNv8snUz-MgXDqePkvA.png" /></figure><p>The highest number of membership was recorded in 2017.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*n6NOFvleDUTjUE3QezQAaw.png" /></figure><h3>Data Modeling</h3><p>We will build a model that predicts whether or not someone will respond to an offer, If the answer is yes, the model will choose discount or BOGO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*e_HGKqqAIv4mub6Uutapfg.png" /></figure><p>From the dataset prepared above, I made ( bogo_offer, discount_offer) as targets ( y_bogo,y_discount) and the rest features as X.</p><p><strong>Metrics</strong></p><p>Since we have a simple classification problem, I used <strong>Accuracy</strong> to evaluate my models because we want to see how well our model is doing, by seeing the number of correct predictions vs total number of predictions and also answer the question of: How many customers use Starbucks offers?. This is my opinion and the reason why I chose to use the easiest metric (accuracy).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*34p9PZcvmVpA1NCb8BtsSw.png" /><figcaption>Model Result</figcaption></figure><p>The DecisionTreeClassifier model has a BOGO training data accuracy of 99 and BOGO test accuracy of 58, discount training accuracy of 99, and discount test accuracy of 57 suggest that the DecisionTreeClassifier model I constructed did not overfit the training data.</p><h3><strong>Model Improvement</strong></h3><p>I used <strong>GridSearchCV </strong>with DecisionTree to Improve the model to get better results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Uh2jtu8vSFo1w7NI2D8gjA.png" /></figure><h3>Conclusion</h3><p>In this project, I analyzed and built a model that predicts whether a customer will respond to an offer. If yes, the model will choose the best offer type (discount or BOGO). The Strategy I used for solving this problem has two steps. Firstly, I merged the offer portfolio, customer profile, and transaction data. Secondly, I built models for the BOGO offer and Discount offer. The analysis suggests that the Decision Tree model has the best training data accuracy. My Conclusion is that the Company should focus more on BOGO and Discount offers since these offers tend to make customers buy more.</p><p>Link:<a href="https://github.com/bukky24/Udacity-NanoDegree-Capsone-Project">https://github.com/bukky24/Udacity-NanoDegree-Capsone-Project</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb5e081ad152" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are the most common programming languages used in Nigeria]]></title>
            <link>https://medium.com/@ayemonisanolubukola/what-are-the-most-common-programming-languages-used-in-nigeria-a2d3f3ecc4bc?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2d3f3ecc4bc</guid>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Thu, 09 Jul 2020 21:34:27 GMT</pubDate>
            <atom:updated>2020-07-11T18:54:41.800Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A data analysis using </em>Stackoverflow’s 2017 Annual Developer Survey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*yyo6SlR-OWl7J6W-_AvI-w.jpeg" /></figure><h3>Introduction</h3><p>Programming is definitely one of the most important computer skills one can acquire in today’s world. With the rise of computers ushering us into a digital age, there is a whole field of opportunity available to prospective computer programmers.</p><p>If you are a newcomer to the field of programming, one of the first (hardest) decision you most likely will have to make is picking the language you want to start with. Although you can learn multiple languages simultaneously, it is not advised, particularly for beginners.</p><p>Here in this post, I will show the most used languages,framework,databases and the best Programming Languages to Learn in Nigeria by analyzing real data from Stack Overflow survey data of 2017.</p><h3>Part I:What are the most common languages, framework and databases used by professionals in Nigeria</h3><p>We can see from the chart below that :JavaScript,PHP, SQL,Java,and C# are the most used languages by professional developers and therefore would be the most in demand and transferable skill between jobs.</p><p>In 2017, JavaScript is the most popular programming language in Nigeria. It is a frontend programming language with its gradually growing back-end relevancy, is used widely in designing interactive applications.</p><p>PHP is the second most used programming language after JavaScript here in Nigeria due to the fact that it’s hosting is cheaper than the rest of the pack and It is an easy language once mastered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*xyU65h5Nqg28pFxiBnMl5w.png" /></figure><p>The most used frameworks are AngularJS and NodeJS which are JavaScript based.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*nJfmVjZgvQCAHZCNjbQjXg.png" /></figure><p>MySQL is the most popular used database by professional developers in Nigeria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*G4G7AUKlaLJQrql7t3oniw.png" /></figure><h3>Part II:What are the most want work languages and framework by professionals in Nigeria</h3><p>We can see that <strong>Python</strong> have grown tremendously close to other languages. This is probably happening because its’s a programming language that is very versatile and has been used extensively in data related areas.</p><p>Some of the programming languages ​​that appeared as programming languages ​​most used at work, also appeared in the ranking of most wanted programming languages, this shows that many people wants to learn these languages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*1xRDrvDOJJKV8WGewryl-A.png" /></figure><p>The JavaScript-based web development framework, NodeJS is the most wanted framework according to Stack OverFlow survey in 2017. It is getting enough attention from many web developers and many people wants to learn probably because of its web applications with many input/output operations and real-time functionalities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*JydMyML61IriaCg6CpmRtQ.png" /></figure><h3>Part III:Which programming language has the highest job satisfaction</h3><p>We can see from the chart below that the top five programming language that has job satisfaction in Nigeria according to Stackoverflow’s 2017 Annual Developer Survey data are C++,Objective-C,Go,F# and C.</p><p>This means that the older programming language has the highest programming language</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*ugjSwwu26V1VkG0RjcM1Lg.png" /></figure><h3>Conclusion</h3><p>In this article, we took a look at the most popular languages, framework, database and most want work programming languages, according to Stackoverflow’s 2017 Annual Developer Survey data.</p><ol><li>We have seen that some older programming languages such as PHP,JavaScript, SQL, and Java still dominates.</li><li>programming languages like Python have been well-deserved to be learned, but the oldest ones still have their value and are being much demanded.</li><li>The most used and most want work framework in Nigeria are mostly JavaScript based.</li></ol><h3>References</h3><p>Stackoverflow Developer Survey Data: <a href="https://insights.stackoverflow.com/survey">https://insights.stackoverflow.com/survey</a></p><p>Github:<a href="https://github.com/bukky24/WriteaBlogPost/blob/master/WriteaBlogPost.ipynb">https://github.com/bukky24/WriteaBlogPost/blob/master/WriteaBlogPost.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2d3f3ecc4bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Regression Analysis]]></title>
            <link>https://medium.com/@ayemonisanolubukola/intro-to-regression-analysis-b37e27e1f7c2?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b37e27e1f7c2</guid>
            <category><![CDATA[classification-algorithms]]></category>
            <category><![CDATA[regression-analysis]]></category>
            <category><![CDATA[supervised-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[regression]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Thu, 27 Jun 2019 12:05:22 GMT</pubDate>
            <atom:updated>2019-06-27T12:05:22.608Z</atom:updated>
            <content:encoded><![CDATA[<p>Regression is the process of predicting a continuous variables. it is a type of Supervised Learning. regression analysis is a set of statistical processes for estimating the relationships among variables.</p><blockquote>This project is from Gitgirl school of Data I currently attend.</blockquote><p>Regression Analysis focuses on the relationship between a dependent variable and one or more independent variables. The dependent variable can be seen as “state”, “target” or “final goal” we study and try to predict, and the independent variables also known as explanatory variables can be seen as the “causes” of those “states”. The independent variables are shown conventionally as <strong><em>X</em></strong>, and the dependent variable is notated as <strong><em>Y</em></strong>.</p><h4><strong>Uses of Regression Analysis</strong></h4><ul><li>It is widely used for prediction and forecasting.</li><li>it is used to understand which among the independent variables are related to the dependent variable, and to explore the forms of these relationships.</li><li>it helps one understand how the typical value of the dependent variable changes when any one of the independent variables is varied, while the other independent variables are held fixed.</li></ul><h4><strong>Types of Regression Model</strong></h4><p>There are two types of Regression model, they are:</p><p><strong>(a)Simple Regression</strong></p><p>This is when one independent variable is used to estimate a dependent variable. it can either be linear or non-linear.</p><p><strong>Linear Regression</strong>: It is a machine learning Algorithm based on supervised learning. Linear regression performs the task to predict a dependent variable (y) based on the given independent variable(x). So, this regression technique finds out a linear relationship between<strong><em> x </em></strong>(input) and <strong><em>y</em></strong> (output).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*_FO4fa7aF7MEzFNKyFAc4Q.png" /><figcaption>Linear Regression</figcaption></figure><p>Where<strong> Y : </strong>labels to the data, <strong>X: </strong>input training data, <strong>β1:</strong> Intercept,<strong> β2: </strong>Coefficient of <strong>X.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*dEsC1JwbydG52MnfzhbpfQ.png" /><figcaption>Linear Regression images from google</figcaption></figure><h4><strong>pros of Linear Regression</strong></h4><ul><li>It is very fast</li><li>No parameter tuning</li><li>Easy to Understand and highly interpret-able.</li></ul><h4><strong>(b) Multiple Linear Regression</strong></h4><p>Multiple regression describe how a single response variable <strong><em>Y</em></strong> (dependent variable) depends linearly on a number of predictor variables<strong><em> X </em></strong>(independent Variables).</p><h4><strong>Logistic Regression</strong></h4><p>Logistic regression is a statistical and machine learning technique for classifying records of a data-set based on the values of the input fields. it is used for classification.</p><p><strong>Difference between Logistic Regression and Linear Regression</strong></p><ul><li>Logistic regression is used when the response variable is categorical in nature. For instance, yes/no, true/false, red/green/blue, etc. While Linear regression is used when your response variable is continuous. For instance, weight, height, number of hours, etc.</li><li>In linear regression, the coefficient interpretation of independent variables are quite straightforward. While logistic regression depends on the family (binomial, Poisson, etc.) and link (log, inverse-log, etc.) you use.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b37e27e1f7c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Statistics: Analysis of Chinook dataset using statistics]]></title>
            <link>https://medium.com/gitgirl/intro-to-statistics-analysis-of-chinook-dataset-using-statistics-cd370d16477e?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd370d16477e</guid>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[correlation]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Mon, 27 May 2019 20:57:50 GMT</pubDate>
            <atom:updated>2019-08-17T12:33:57.118Z</atom:updated>
            <content:encoded><![CDATA[<p>Statistics allows us hear the story data presents and aim at us to use that information to formulate more of a realistic idea when it comes to interpreting, and analyzing the existing situation, which in turn leads to assessing future decisions. When used correctly, statistics tell us any trends in what happened in the past and can be useful in predicting what may happen in the future.</p><p>This project is from Gitgirl School of Data. In this session, we learned about Statistics which is simply using numerical values to reflect life events and events that occur in life.I would be using Statistics to identify trends and features within chinook dataset, i.e. total spending revenue of each country.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*MhPNql7jOVNqdGgN0Na9_A.png" /><figcaption>Total spending revenue for each country</figcaption></figure><h3>Measures of Central Tendency</h3><h4><strong>Mean</strong></h4><p>The mean also known as the average is equal to the sum of all the values in the data set divided by the number of values in the data set.</p><h4><strong>Median</strong></h4><p>The median is the middle number for a set of data that has been arranged from least to greatest. when there is an even number of data, add the middle two numbers and average the result.</p><h4><strong>Mode</strong></h4><p>The mode is the number that occurred the most in a data.</p><h4>Range</h4><p>The range is highest minus the lowest.</p><p>To get the statistics for the for the chinook dataset, I used the Analysis Toolpak add-in Excel to generate descriptive statistics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/154/1*aWcYOV7BnJON1nQbjG5fpA.png" /><figcaption>summary statistics for total spending revenue</figcaption></figure><p>From the result above, the mean is $97.025k. Inspecting the raw data suggests that this mean value might not be the best way to accurately reflect the typical spending revenue of the countries, as most countries have spending revenue in the $37.62k to 100k range. The mean is being skewed by the six large revenue.</p><p>The Median $44.12k is preferred over the mean or mode when the data is skewed because it retains its position and is not strongly influenced by the skewed values. the mean loses its ability to provide the best central location for the data because the skewed data is dragging it away from the typical value.</p><p>The mode is $37.62k,this is because it occurred the most in the data.</p><h4><strong>probability</strong></h4><p>Probability means the likelihood of the occurrence of an event.</p><p>Examples of events can be :</p><ul><li>Tossing a coin with the head up</li><li>Drawing a red pen from a pack of different colored pens</li><li>Drawing a card from a deck of 52 cards etc.</li></ul><h3><strong>Correlation and Regression</strong></h3><h4><strong>Correlation</strong></h4><p>The<strong> </strong>correlation coefficient (a value between -1 and +1) tells you how strongly two variables(X and Y) are related to each other. A correlation coefficient of +1 indicates a perfect positive correlation. As variable X increases, variable Y increases. As variable X decreases, variable Y decreases.</p><h4><strong>Regression</strong></h4><p>Regression analysis is a set of statistical processes for estimating the relationships among variables. regression analysis helps one understand how the typical value of the dependent variable changes when any one of the independent variables is varied, while the other independent variables are held fixed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd370d16477e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gitgirl/intro-to-statistics-analysis-of-chinook-dataset-using-statistics-cd370d16477e">Intro to Statistics: Analysis of Chinook dataset using statistics</a> was originally published in <a href="https://medium.com/gitgirl">Gitgirl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I used Lambda Function(s) to discover insights from a data set]]></title>
            <link>https://medium.com/@ayemonisanolubukola/how-i-used-lambda-function-s-to-discover-insights-from-a-data-set-16886fe08eb0?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/16886fe08eb0</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[lambda-function]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Thu, 02 May 2019 15:42:12 GMT</pubDate>
            <atom:updated>2019-07-11T12:11:41.858Z</atom:updated>
            <content:encoded><![CDATA[<h3>Use Lambda Functions like a pro</h3><p>Lambda comes from the Lambda Calculus and refers to anonymous functions in programming. Anonymous function is a function definition that is not bound to an identifier. Anonymous functions are often arguments being passed to higher-order functions.</p><p>The project for last month at Git girl School of Data Science, is on using Lambda function to discover insights from a record of domestic flight from the US Department of Transportation that took place from January 1–15 of 2015. Each record contains a number of values.The data set consists of 201664 rows and 14 columns.</p><p><strong>Getting started</strong></p><p>First of all, import the Python Libraries(Pandas and Numpy) and the data set into python script as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*kmmk2bDgysfAB0283u3vJQ.png" /></figure><p><strong>cleaning and Sorting the data set</strong></p><p>The data set is rough and it consists of missing values. I cleaned the data and made it consistent with other data sets by using the ‘<em>fillna()</em>’ method to replace missing values with <em>‘np.nan</em>’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*q_ciW6sQ1744SeY0RFoNjQ.png" /></figure><p>The ‘sort_values’ operation was then used to sort the data set in descending order (from the highest values to the least value). The values were sorted by the ‘arr_delay’ column because it represent the number of minutes a given flight is delayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*AknUh8umTTvi9yWq3dDX5Q.png" /></figure><p><strong>Lambda Function</strong></p><p>Lambda operator can have any number of arguments, but it can have only one expression. It allows you to write quick throw away functions without naming them.</p><p>Now that the data set has been cleaned and sorted, I proceeded to using the lambda function to discover the following;</p><p>a. How often did delays occur from January 1st-15th</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*MI5HL71aoYUVqnMKvDgb2A.png" /></figure><p>Since the ‘arr_delay’ column represent the number of minutes a given flight is delayed, the <em>‘lambda a : a &gt; 0</em>’ function checks if the value of each ‘<em>arr_delay</em>’ record is greater than zero, then returns <em>‘True’ </em>or ‘<em>False</em>’.</p><p>b. Find aggregate trends and the percentage of flight delays</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*nf-fKrCY7cAzH4LLTtsStw.png" /></figure><p>The ‘<em>value_counts()</em>’ operation was used to count the number of flight delayed and the number of flight not delayed.Whenever a flight is delayed it returns <em>‘True’, </em>it<em> </em>returns ‘<em>False</em>’ when a flight is not delayed.</p><p>To get the percentage of flight delayed, <em>‘delayed_flight’</em> was divided by the <em>‘total_flight’. </em>The result shows that approximately 49% of the flight was delayed.</p><p>c. Numbers of flights were delayed longer than 20 minutes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*yywPf9D70ti6XCqMza_0Rw.png" /></figure><p><em>‘lambda b : b &gt; 20’ </em>function checks the ‘arr_delay’ column in the data set for values that are greater than 20 minutes. The result shows that 48679 flights were delayed longer than 20 minutes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16886fe08eb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Atom and PostgreSQL: How to run PostgreSQL queries in Atom using a package called Data Atom]]></title>
            <link>https://medium.com/@ayemonisanolubukola/atom-and-postgresql-how-to-run-postgresql-queries-in-atom-using-a-package-called-data-atom-5b0fb88f0800?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b0fb88f0800</guid>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 13:40:25 GMT</pubDate>
            <atom:updated>2019-03-29T13:40:25.656Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>We were given some projects to work on, and running queries in atom using Data atom was part of the projects. The project was from Git girl school of Data Analytics, I currently attend. I had challenges Connecting postgreSQL to data Atom during the course of this project because,it was my first time using Data Atom Package and there was limited resources online that could serve as a guide.</blockquote><p>In this post, I will demonstrate how to connect Data Atom package to postgreSQL and run queries with it. First of all, you must have downloaded and installed postgreSQL and Atom on your PC.</p><h3><strong>Creating database in postgreSQL</strong></h3><p>After installing postgreSQL, launch the <strong>pgAdmin</strong> tool and connect to the PostgreSQL server. Double click on <strong><em>Servers</em></strong> -&gt;<strong><em>postgreSQL</em></strong>. Then right Click on <strong><em>Databases </em></strong>-&gt;<strong><em>create</em></strong> -&gt;<strong><em>Databases</em></strong>. You will then see a <strong>Create-Database </strong>dialog appear where you can create a database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*dvjJFwkL_t8ai4TA81mjpg.png" /></figure><p>Enter the name of your database and save.</p><h3>Import CSV File Into PosgreSQL Table</h3><p>To import CSV file into postgreSQL table, double click on the new database you created, Click<strong> <em>Schemas</em></strong> then right click on <strong><em>Tables </em></strong>-&gt;<strong><em>Create</em></strong> -&gt;<strong><em>Table</em></strong>. A Create-Table dialog box will appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*w5kx6gw7hy3VK7LDIdq-dQ.png" /></figure><p>Enter the name of your table and click the save button.Then right click on the new <strong><em>table</em></strong> you created and select <strong><em>import</em></strong>/ <strong><em>Export</em></strong> from the drop down menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*lbW069gzcj6Bf5xoafZmvw.png" /></figure><p>Then you will see a dialog box like the one below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*IDDuzMZyiYdyBUJPDcZ6zg.png" /></figure><p>Browse the CSV file, choose <strong><em>format</em></strong> as CSV. Choose “yes” if the file has a <strong><em>header</em></strong>, choose comma “,” as the delimiter and click the <strong><em>OK</em></strong> button.</p><p><strong>Install Data Atom Package</strong></p><p>In the Atom Setting Menu, Click on <strong><em>+ install Package</em></strong>. Then type Data Atom in the search field. You should see a blue install button, Click this to install the package or you can install directly from <a href="https://atom.io/packages/data-atom"><em>https://atom.io/packages/data-atom</em></a>. Once the package is installed, you should see Data Atom in the list of Packages. here</p><h4><strong>Setting up a Database Connection</strong></h4><p>In the Atom <strong><em>Packages</em></strong> Menu, Select <strong><em>Data Atom</em></strong> -&gt;<strong><em>New Connection</em></strong>. You will see a New Connection Dialog box, where you can setup your database connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*GRH0Q_06jq7uQCbOHyG1tA.png" /></figure><p><strong><em>Connection name</em></strong> should be the database you want to connect to, in postgreSQL. Select postgreSQL as the<strong><em> DB Type</em></strong>. The<strong><em> Auth</em> </strong>should be postgres, then type in your postgreSQL <strong><em>password</em></strong> and the <strong><em>Database</em></strong> name. Then click <strong><em>connect</em></strong> to activate the DB connection.</p><h4><strong>Run SQL queries in Atom</strong></h4><p>Once your database Connection has been set up, you can start writing queries in Atom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*U-Kul7ulKDtuJBQPOQdclw.png" /></figure><p>Data Atom has a feature that allows you to edit your Database Connection. From the Atom Menu, select <strong><em>Packages -&gt;Data Atom -&gt;Edit Connection</em></strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b0fb88f0800" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I used some Python Packages to Analyze, manipulates and visualize data]]></title>
            <link>https://medium.com/@ayemonisanolubukola/how-i-used-some-python-packages-to-analyze-manipulates-and-visualize-data-aeb4178112f3?source=rss-fb44b72368b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeb4178112f3</guid>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[python-numpy]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Olubukola Ayemonisan]]></dc:creator>
            <pubDate>Fri, 29 Mar 2019 13:29:21 GMT</pubDate>
            <atom:updated>2019-03-29T13:36:15.935Z</atom:updated>
            <content:encoded><![CDATA[<p>One of the projects I was given at Gitgirls School of Data Analytics, was to use Python packages such as; Numpy, Panda and Matplotlib to analyze, manipulate and visualize the Financial data of ABD Company for a year.</p><p>We were given four questions to solve, so I installed the three Python Packages and import them to my python Editor and started writing the code that will answer the questions.</p><p>Below is the Financial data for ABD Company for a year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*O9zxFzmr97o-dk-xfsxwbQ.png" /></figure><h4>a. Calculate the Profit using Numpy</h4><p>The first question was to calculate the Profit for ABD company, given the Revenue and Expenses for each month. I solved this question by first importing Numpy and copied the list containing the Company’s data, into the Python Script. Then I converted the list into Numpy Array. To get the profit, I subtract Expenses from the Revenue as shown below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*KDobWX4fe4sxHJxMX1q-NQ.png" /></figure><p>The profit for each month is shown below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*hNnvGDUa4rSC3zWPKBqHgw.png" /></figure><p><strong>b.</strong> <strong>Python program to extract data from month and profit into a dictionary</strong></p><p>The second question was to write a python program to extract data from month and profit into a <strong>dictionary</strong> to be named ‘Fin_status’. What is a dictionary? A <strong>dictionary</strong> maps a set of objects (keys) to another set of objects (values). knowing what a dictionary is gave me a full grasp of the question. So, after getting the Company’s profit for each month, I used the variable name ‘Fin_status’ to represent information that the variable contains as shown below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*9BdDSUKuJIskpSGReX8GQQ.png" /></figure><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zgOrEJz7XHjDjnKlVaF0VA.png" /></figure><p><strong>c. Python program to convert the dictionary to a Pandas series</strong></p><p>The Pandas Series is a one-dimensional array that can store various data types, including mix data types. To solve this question, I had to import pandas into the python script and convert the dictionary in to Series using ‘series’ method as shown below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*FStHbhIckI2AMkUqzVKrPA.png" /></figure><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/104/1*bAC8h83LvkvMahJw6sBYrw.png" /></figure><p><strong>d. Matplotlib program to create a line graph using the panda series data</strong></p><p>The last question was to write a matplotlib program to create a line graph (using the panda series data) where x-axis is for months and y-axis is for profit. The first thing I did was to import matplotlib into the python script and then write the matplotlib program that adds title, label to x and y axis and also color to the graph as shown below;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*bMRClUmDfd6O8eX708wWyQ.png" /></figure><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*WrD-x-hHsRCJgspYWQHckw.png" /></figure><p>The graph is majorly for visualization and to get insights from the Financial data for ABD Company. With the help of the graph i was able to explain the insights i got from the graph.</p><p>It can be deduced that there was an unsteady increase in profit from the first quarter of the year (January — April) after which the company incurred a loss from May to July; then it witnessed an increase in profit in the month of August and had the biggest loss for the year in the month of September. The Company also made a loss in October then it has a slight increase in profit in November and had a loss in December.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeb4178112f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>