<?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 Ufuoma Ejite on Medium]]></title>
        <description><![CDATA[Stories by Ufuoma Ejite on Medium]]></description>
        <link>https://medium.com/@ufuomaejite?source=rss-236b782c6ac4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*clG9FWEw2NMCrmDB3Sg9-Q.jpeg</url>
            <title>Stories by Ufuoma Ejite on Medium</title>
            <link>https://medium.com/@ufuomaejite?source=rss-236b782c6ac4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:38:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ufuomaejite/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[SQL JOINs: A Comprehensive Guide to Advanced Data Retrieval Techniques]]></title>
            <link>https://ufuomaejite.medium.com/sql-joins-a-comprehensive-guide-to-advanced-data-retrieval-techniques-a047b9eb129?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a047b9eb129</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[sql-joins]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Wed, 24 May 2023 19:59:18 GMT</pubDate>
            <atom:updated>2023-05-24T19:59:18.863Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*5hhzuQc1UqyUsNL-novT2A.jpeg" /><figcaption>Photo by <a href="https://www.istockphoto.com/portfolio/mirsadsarajlic?mediatype=photography">Mirsad Sarajlic</a> on <a href="https://www.istockphoto.com/">iStock</a></figcaption></figure><p>There are several clauses used in SQL. A typical SQL clause is the JOIN clause. The JOIN clause combines data from multiple tables based on matches from one or more columns. In very simple terms, the JOIN clause combines multiple tables into one. It allows us to retrieve data from more than one table at a time.</p><p>If the <a href="https://www.investopedia.com/terms/c/churnrate.asp">customer churn analysis</a> of a business is to be performed, for example, multiple information or multiple datasets containing customer information, product information, and maybe, details on churn reasons or churned customers could be provided. For a thorough analysis, these multiple pieces of information could be combined. This is where the SQL JOIN clause comes in. Based on a match or relationship between two or more tables, the JOIN clause makes it possible to retrieve and query data from those tables.</p><p>Another instance could be an analysis of the employee attrition rate in XYZ organization. Multiple information in various tables could be provided ranging from the demographics of employees to salary information to departments in the organization, etc. In this case, a JOIN would be needed to combine the tables to determine various factors.</p><h3><strong>SQL JOINs Best Practices</strong></h3><p>SQL JOINs are a very powerful tool for retrieving and analyzing data; however, if not correctly used, they can produce incorrect results and cause performance issues. Here are some helpful points to note when using SQL JOINs:</p><ul><li>Choose the right JOIN type for the task at hand. It is vital to understand the differences between the types of JOINs and choose the one that best suits your need.</li><li>Avoid using ambiguous column names. For example, the column name “id” is commonly used across tables, and therefore, you may have to specify which tables “id” column you want to select or filter. It is best practice to use aliases for column names to avoid this ambiguity.</li><li>Always test your JOIN query result to ensure they are accurate before deploying them to a production environment — the database server or the database management system (DBMS).</li><li>Ensure you use the appropriate JOIN conditions.</li></ul><h3><strong>Types of SQL JOINs</strong></h3><p>There are different types of SQL JOINs, and each of them has its characteristics and applications.</p><h3>1) INNER JOIN</h3><p>An INNER JOIN is a type of join operation used to combine rows from two or more tables based on a specified condition. It retrieves only the matching rows that satisfy the join condition from both tables.</p><p>Conceptually, the INNER JOIN operation aligns with the idea of intersecting sets in mathematics, as it focuses on the shared elements between the tables involved in the join.</p><p>The basic syntax for an INNER JOIN is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92cddc1a6cb947942ec4dda07d860f98/href">https://medium.com/media/92cddc1a6cb947942ec4dda07d860f98/href</a></iframe><p>It is worth noting that if there is no match between rows in the joined tables based on the specified condition, those rows will not be included in the result set.</p><p>Here’s an example to illustrate the usage of an INNER JOIN: Suppose you have two tables, “employees” and “departments” and you want to retrieve a list of employees along with their corresponding department names. You can use an INNER JOIN to achieve this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad9ea4dd874452a573ac59985d1fb768/href">https://medium.com/media/ad9ea4dd874452a573ac59985d1fb768/href</a></iframe><p>In this example, the query performs an INNER JOIN between the “employees” table (aliased as “e”) and the “departments” table (aliased as “d”) using the common column “department” from the “employees” table and “id” from the “departments” table. The result of this query is the names of the employees along with their corresponding department names.</p><p>The INNER JOIN is commonly used when you need to retrieve data that exists in both tables based on a shared key or relationship. It allows you to establish connections between related tables and combine data from multiple sources into a single result set.</p><p>It is important to note that if there is no match between rows in the joined tables based on the specified condition, those rows will not be included in the result set. If you want to include unmatched rows as well, you can consider using OUTER JOINs like LEFT OUTER JOIN or RIGHT OUTER JOIN.</p><h3>2) OUTER JOIN</h3><p>The OUTER JOINs are three — the LEFT JOIN, the RIGHT JOIN, and the FULL OUTER JOIN. Generally, these joins keep all records of the original table. The code syntax for these joins is similar to that of the INNER JOIN:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f9e7de1ab013c478ce010e6ee4a2ca4/href">https://medium.com/media/7f9e7de1ab013c478ce010e6ee4a2ca4/href</a></iframe><h4><strong>LEFT JOIN</strong>:</h4><p>The LEFT JOIN keeps all the records in fields specified in the left table. However, the values that do not match in the right table are included as null or missing values.</p><p>Here’s an example to illustrate the usage of a LEFT JOIN: Suppose we have a “customers” table and an “orders” table, we can use a LEFT JOIN to retrieve all customers and their orders, including customers who have not placed any orders.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f6f34884af436a38bfb63fea4bed307/href">https://medium.com/media/2f6f34884af436a38bfb63fea4bed307/href</a></iframe><p>This example demonstrates how a LEFT JOIN allows you to retrieve all records from the left table (Customers) and the matching records from the right table (Orders) while including NULL values for the columns of the right table when there is no match.</p><h4><strong>RIGHT JOIN</strong>:</h4><p>The RIGHT JOIN is not as common as the LEFT JOIN, but it is the reverse of the LEFT JOIN. The RIGHT JOIN keeps all the records in fields specified in the right table, and the values that do not match in the left table are included as null or missing values.</p><p>Here’s an example to illustrate the usage of a RIGHT JOIN: Suppose we have a “products” table and a “reviews” table, we can use a RIGHT JOIN to retrieve all reviews and their corresponding products, including products that have not been reviewed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4458b78cca5845ec7a49036ade8ff15d/href">https://medium.com/media/4458b78cca5845ec7a49036ade8ff15d/href</a></iframe><p>This example demonstrates how a RIGHT JOIN allows you to retrieve all records from the right table (Reviews) and the matching records from the left table (Products), while including NULL values for the columns of the left table when there is no match.</p><h4><strong>FULL OUTER JOIN</strong>:</h4><p>The FULL OUTER JOIN is a combination of both the LEFT JOIN and the RIGHT JOIN. That is, it returns both unmatched and matched rows from both tables. If there is no match, NULL values are included for the columns of the table(s) with no match.</p><p>Here’s an example to illustrate the usage of a FULL OUTER JOIN: Suppose we have two tables “Students” and “Grades”, we can use a FULL OUTER JOIN to retrieve all students and their corresponding grades, including students without grades and grades without students.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86881b4255863c8dd0e37680b6ed7283/href">https://medium.com/media/86881b4255863c8dd0e37680b6ed7283/href</a></iframe><p>This example demonstrates how a FULL OUTER JOIN combines the results of both the left table (Students) and the right table (Grades), including unmatched rows from both sides, represented by NULL values in the corresponding columns.</p><h3>3) SELF JOIN</h3><p>SELF JOIN is a type of join operation where a table is joined with itself. It allows you to combine rows from the same table based on a related condition or relationship between the columns within that table. By treating the table as two separate entities within the query, you can compare and match rows within the same table. This join does not have a specific syntax.</p><p>When performing a SELF JOIN, you use the same table multiple times in the query and differentiate between the instances of the table using table aliases. You specify the join condition based on the columns within the same table.</p><p>Here’s a simple example to illustrate the usage of SELF JOIN: Let’s consider an example scenario where we have an “employees” table with columns such as “employee_id”, “employee_name”, and “manager_id”. We can use a SELF JOIN to retrieve the names of employees along with their corresponding managers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc6ed319e12b793ae20701c04586d494/href">https://medium.com/media/bc6ed319e12b793ae20701c04586d494/href</a></iframe><p>This query retrieves the employee names from the “employees” table, aliased as “e”, along with the corresponding manager names, aliased as “m”.</p><p>By using a SELF JOIN, you can establish relationships and retrieve data from different rows within the same table, providing a powerful tool for analyzing hierarchical or related data.</p><h3>4) CROSS JOIN</h3><p>A CROSS JOIN combines every row from one table with every row from another table, creating a result set that includes all possible combinations of rows between the two tables (called a ‘Cartesian product’).</p><p>The basic syntax for a CROSS JOIN is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/560a18f36f2539942213e898886b6c5e/href">https://medium.com/media/560a18f36f2539942213e898886b6c5e/href</a></iframe><p>It is important to note that a CROSS JOIN does not require a join condition or a specific relationship between the tables. It simply combines every row from one table with every row from another table.</p><p>Here’s an example to illustrate the usage of a CROSS JOIN: Let’s say you want to generate a list of all possible combinations of students and subjects. You can use a CROSS JOIN to achieve this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba09560f425ac06e9ffc0ef98028e649/href">https://medium.com/media/ba09560f425ac06e9ffc0ef98028e649/href</a></iframe><p>In this example, the query performs a CROSS JOIN between the “students” table (aliased as “s”) and the “subjects” table (aliased as “sb”). The result of this query is a comprehensive list of students with their corresponding subjects.</p><p>It is worth noting that CROSS JOIN should be used with caution as it can generate a large number of rows and result in a potentially huge result set if the tables involved have many rows.</p><h3>5) SEMI AND ANTI JOIN</h3><p>SEMI JOIN and ANTI JOIN are types of joins that allow for the comparison of two tables and filter rows based on their existence or non-existence in the other table. These joins are particularly useful for finding matching or non-matching records between two tables.</p><p>Whilst the SEMI JOIN filters the first table based on conditions that are set in the second table, the ANTI JOIN filters the first table based on conditions that are not in the second table.</p><p>Let’s consider an example scenario with two tables: “customers” and “orders.” The “customers” table contains information about customers, including a “customer_id” column. The “orders” table contains order details, including a “customer_id” column as well. We can demonstrate the SEMI JOIN and ANTI JOIN using these tables.</p><p>The SEMI JOIN will return customers who have placed orders. It filters out customers who have not placed any orders. Here’s an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4ea5834dce48622bb53da2afd5dcd02/href">https://medium.com/media/d4ea5834dce48622bb53da2afd5dcd02/href</a></iframe><p>In this query, we select the customer_id and customer_name from the “customers” table. The WHERE EXISTS clause checks if there is a match in the “orders” table for each customer based on their customer_id. Only the customers who have at least one matching order will be returned.</p><p>The ANTI JOIN will return customers who have not placed any orders. It filters out customers who have placed orders. Here’s an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fcc1a94de04e7adebebfd4841da0220/href">https://medium.com/media/0fcc1a94de04e7adebebfd4841da0220/href</a></iframe><p>In this query, we select the customer_id and customer_name from the “customers” table. The WHERE NOT EXISTS clause checks if there is no match in the “orders” table for each customer based on their customer_id. Only the customers who do not have any matching orders will be returned.</p><p>By executing these queries, you can obtain a list of customers who have placed orders (using SEMI JOIN) or customers who have not placed any orders (using ANTI JOIN).</p><h3><strong>Joining more than Two Tables</strong></h3><p>Joining more than two tables is a common scenario in relational database management. The process of joining three or more tables is similar to joining two tables. However, the query syntax can become more complex as more tables are added to the join.</p><p>A chaining technique can be employed by using multiple JOIN clauses in our SQL query to join more than two tables. Let’s imagine, for illustration purposes, that we have three tables: <em>customers</em>, <em>orders</em>, and <em>order_details</em>. Using the following query, we can link these tables:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11a418def168618302b8047cf732f0ba/href">https://medium.com/media/11a418def168618302b8047cf732f0ba/href</a></iframe><p>In this example, we start by joining the <em>customers</em> and <em>orders</em> tables on the common <em>customerID</em> column. Then, we join the resulting table with the <em>order_details</em> table on the common <em>OrderID</em> column.</p><p>The order in which we join the tables is important. In the above example, we join the <em>customers</em> and <em>orders</em> tables first, as they have a direct relationship. Then, we join the resulting table with the <em>order_details</em> table, which has a relationship with the <em>orders</em> table.</p><p>It matters which tables we join in what order. As they have a direct relationship, we first join the <em>customers</em> and <em>orders</em> tables in the example above. The <em>order_details</em> table, which is related to the <em>orders</em> table, is then joined to the resulting table.</p><p>When combining multiple tables, it’s crucial to take the size of the tables into account as well. Large table joining can be resource-intensive and slow down query performance. To improve performance, we can utilize indexing or limit the number of columns the query returns.</p><p>In summary, joining more than two tables can be achieved by chaining multiple JOIN clauses in our SQL statement. We need to consider the relationships between the tables and the performance implications when joining large tables.</p><h3><strong>Advanced Joining Techniques</strong></h3><p>In addition to the basic SQL JOINs, there are advanced joining techniques for more complex data retrieval tasks.</p><p>The most commonly used advanced joining techniques are:</p><ol><li>Nested queries</li><li>Union clause</li><li>Intersect clause</li><li>Except clause</li></ol><h4>Nested queries:</h4><p>A nested query, also known as a subquery, is a query within another query. In this joining technique, the output of one query serves as the input for another. In other words, the outer query’s condition is based on the inner query’s output. Nested queries are useful for a variety of purposes, including merging tables, filtering results, and performing calculations.</p><p>Here’s a simple example to illustrate the usage of nested queries:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a52c93e03213ab96042f232956ef026b/href">https://medium.com/media/a52c93e03213ab96042f232956ef026b/href</a></iframe><p>In this example, the nested query <em>(SELECT product_name FROM products WHERE products.product_id = orders.product_id)</em> retrieves the product name from the <em>products</em> table using the product ID from the outer query. The result of the nested query is aliased as “product_name”. The outer query then selects the order ID, quantity, and the corresponding product name obtained from the nested query. When this query is executed, the result set gotten will include the order ID, quantity, and the respective product name for each order.</p><h4>Union Clause:</h4><p>In SQL, the UNION clause is used to combine the results of two or more SELECT statements into a single result set. It allows you to merge rows from different queries that have the same structure and column types.</p><p>The syntax for the UNION clause is typically as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d66ea8a329c489e28b4741c66383873/href">https://medium.com/media/7d66ea8a329c489e28b4741c66383873/href</a></iframe><p>Here’s a simple example to illustrate the usage of the UNION clause: Let’s say we have two tables: “customers” and “employees.” Both tables have columns like “name” and “email,” and we want to retrieve a combined list of names and emails from both tables:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1f8e858ff5e9f34d3718a28aea6c694/href">https://medium.com/media/b1f8e858ff5e9f34d3718a28aea6c694/href</a></iframe><p>The above query will return the names and emails that exist in both the “customers” and “employees” tables.</p><p>The UNION clause is commonly used for merging data from multiple tables or queries that share a similar structure. It allows consolidation of data and retrieval of a single result set from multiple sources. However, it’s worth noting that not all database systems support the UNION clause, so its availability may depend on the specific database being used.</p><p>There is also the UNION ALL clause which is used to combine the results of two or more SELECT statements into a single result set, including duplicate rows. It is similar to the UNION clause, but unlike UNION, UNION ALL does not eliminate duplicate rows from the final result.</p><h4>Intersect Clause:</h4><p>The INTERSECT clause is used to retrieve the common rows between two result sets. It is used to find the intersection or overlap between two or more sets of data. This clause removes duplicate rows by default.</p><p>The syntax for the INTERSECT clause is typically as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5a5d2709229b51ae8281fa74417db8d/href">https://medium.com/media/d5a5d2709229b51ae8281fa74417db8d/href</a></iframe><p>Here’s a simple example to illustrate the usage of the INTERSECT clause: Let’s say we have two tables: “employees” and “managers.” Both tables have a common column, “employee_id,” and we want to find the employee IDs that appear in both tables:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e23695d66eb69f1e669b26bb3bbe9f73/href">https://medium.com/media/e23695d66eb69f1e669b26bb3bbe9f73/href</a></iframe><p>The above query will return the employee IDs that exist in both the “employees” and “managers” tables.</p><p>The INTERSECT clause can be useful in scenarios where you need to compare or find common records between two or more result sets. However, it’s worth noting that not all database systems support the INTERSECT clause, so its availability may depend on the specific database you are using.</p><h4>Except Clause:</h4><p>The EXCEPT clause in SQL allows you to extract distinct rows from one query’s result set that are not found in another query’s result set. This clause is commonly used to compare and identify differences or set complements between two sets of data.</p><p>The syntax for using the EXCEPT clause is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e7c783d12cd5a09eafe95dfa0ac2314/href">https://medium.com/media/8e7c783d12cd5a09eafe95dfa0ac2314/href</a></iframe><p>It’s important to note that the order of the columns and their data types in the SELECT statements must match, as the EXCEPT clause compares the entire rows between the result sets.</p><p>Here’s a simple example to illustrate the usage of the EXCEPT clause: Let’s say we have two tables: “products” and “orders.” The “products” table contains information about various products, including a “product_id” column. The “orders” table contains details about customer orders, including the “product_id” column. We want to find the products that have not been ordered by any customers. The EXCEPT clause can be used to achieve this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca3f05cef8afb0a7de30a7ecec7a9c32/href">https://medium.com/media/ca3f05cef8afb0a7de30a7ecec7a9c32/href</a></iframe><p>The above query will return the distinct products (identified by their product_id and product_name) that do not appear in the result set of the orders table.</p><p>The EXCEPT clause is useful when you want to find the distinct values in one result set that are not present in another result set. It helps you identify differences or obtain the set complement between two sets of data. However, it’s worth noting that not all database systems support the EXCEPT clause, and in some cases, alternative methods like using LEFT JOIN or NOT IN subqueries can be used to achieve similar results.</p><h3><strong>Conclusion</strong></h3><p>The usefulness of SQL JOINs cannot be overemphasized. They are used extensively in various industries for data retrieval and analysis and are a critical aspect of database management.</p><p>For instance, to gain insights into customer behavior and preferences, eCommerce websites employ SQL JOINs to connect user data with order information. SQL JOINs are used by the financial sector to combine data from many sources for risk management and compliance reporting. For clinical research and decision-making, healthcare organizations employ SQL JOINs to link patient data with medical records.</p><p>By mastering SQL JOINs and adhering to the best practices, you can improve the efficiency and effectiveness of your data retrieval processes and gain valuable insights into your data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a047b9eb129" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Extract Tweets on a Hashtag from Twitter API Using Tweepy]]></title>
            <link>https://python.plainenglish.io/how-to-extract-tweets-on-a-hashtag-from-twitter-api-using-tweepy-34d697ecba21?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/34d697ecba21</guid>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[tweepy]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tweet]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Mon, 30 Jan 2023 22:03:21 GMT</pubDate>
            <atom:updated>2023-02-23T07:21:35.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kKaR0Oh-0xLSMiwz1jFhiA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@alexbemore">Alexander Shatov</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>The internet is a host for the largest source of information on earth. It has revolutionized the way we access and share information, making it easier and faster than ever before. Twitter is one powerful platform for hosting and sharing information. It is a valuable source of data for researchers, as it contains a wealth of information about people’s attitudes, beliefs and behaviors, and lots more.</p><p>Web scraping is the process of extracting raw data from a website using automated scripts or programs. The extracted data can then be stored in a database or spreadsheet for further analysis. The data obtained could be used for several purposes, including sentiment analysis, social media trends analysis, surveys, email address extraction (for email marketing), etc.</p><p>Web scraping is the most efficient way to collect data from Twitter. The data scraped from Twitter are used for several purposes. It finds a lot of applications in fields such as data analytics, social media marketing, e-commerce, and so on.</p><h4>Tweepy</h4><p>Python is a great web scraper, as it is easy to use, has an easy-to-understand syntax, and saves time. Popular python libraries for web scraping include BeautifulSoup, Scrapy, Selenium, urllib3, and Requests. They automate the extraction of large amounts of data from websites.</p><p><a href="https://www.tweepy.org/">Tweepy</a> is a Python library for accessing Twitter’s API. It is an easy-to-use library that provides developers access to data such as tweets, user profiles, and more. It also provides support for OAuth authentication, which is necessary for accessing the Twitter API. Tweepy also provides support for streaming data from Twitter, allowing developers to create applications.</p><h4>Twitter API</h4><p>API (Application Programming Interface) helps a developer work with the databases of an app without having to work within the codes of the app. Using the Twitter API, a user has programmatic access to Twitter in unique and advanced ways. The user can access, retrieve, analyze, learn from, and interact with the core elements of Twitter, including tweets, retweets, direct messages, lists, spaces, users, followers, and lots more.</p><p>The Twitter API is not “open” — users have to be authorized to use it. Before authorization can be gotten, the user has to have a Twitter Developer account. But before then, the user must have a Twitter account. If you don’t have one, sign up <a href="http://twitter.com/signup">here</a>. The <a href="https://developer.twitter.com/en">Twitter Developer account</a> can then be set up <a href="https://developer.twitter.com/en/docs/developer-portal/overview"><em>(learn more about the Developer’s account</em></a><em>).</em></p><p>In setting up the Twitter Developer’s account, the user would be required to describe what they are building. After the application for the account is submitted, a mail would be sent by Twitter stating if the account has been approved. The user would have to fill in an app name and a few other details, and a new developer page would be displayed. Here, the app can be managed.</p><h4>Steps involved in extracting the tweets</h4><p><strong>Step 1</strong>: Install and import libraries and dependencies to be used for the task.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3656bac07c49bb53d57bcc8ba550cebc/href">https://medium.com/media/3656bac07c49bb53d57bcc8ba550cebc/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43712ab7d52bf25bb8c2d90b474e3513/href">https://medium.com/media/43712ab7d52bf25bb8c2d90b474e3513/href</a></iframe><p><strong>Step 2</strong>: Go to the Developer Portal Dashboard and generate the authentication credentials (Consumer Keys, and Authentication Tokens). These can be gotten from the <strong>key</strong> icon circled in red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhHVVMq6jQNVpczqJUsO-Q.jpeg" /><figcaption>Image by author</figcaption></figure><p><strong>Step 3</strong>: Declare the authorization keys and tokens gotten from step 2 above. Fill in the authentication credentials generated into the <strong>‘HIDDEN…’</strong></p><p><strong>Note</strong>: If you are to submit or publish your codes, <strong>do not</strong> include your authentication credentials. Therefore, after you run your codes and the data you need is generated, you <strong>must </strong>hide your keys and tokens (just as I did below). This is standard practice when working with APIs.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2aa9112ce41828489b034bc833e6e90/href">https://medium.com/media/f2aa9112ce41828489b034bc833e6e90/href</a></iframe><p><strong>Step 4</strong>: Authorize the keys and tokens.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc4aa717c27f121608637dd6def8a4a6/href">https://medium.com/media/cc4aa717c27f121608637dd6def8a4a6/href</a></iframe><p>Next thing is to create a Twitter API object to pass on the authorization details to Tweepy. Set the “wait_on_rate_limit” to “True”. The essence of this is to control the rate of traffic that is sent or received by Twitter API. Read more about Twitter API rate limits <a href="https://developer.twitter.com/en/docs/rate-limits">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c03e5044a00fad8c7ab45e23b102e076/href">https://medium.com/media/c03e5044a00fad8c7ab45e23b102e076/href</a></iframe><p><strong>Step 5</strong>: Use the “search_tweets” method of the API class in Tweepy to extract the hashtag (in this case, we’re extracting <em>#100daysofcode</em>). The hashtag you are searching for is to be defined first. The “q” parameter specifies the query to search for, and also count limits the number of tweets returned.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ded813f4684e7919e01c95b963b203e/href">https://medium.com/media/0ded813f4684e7919e01c95b963b203e/href</a></iframe><p><strong>Step 6</strong>: Iterate through the process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3cb125355e5cf0df0f9985c067b0adf/href">https://medium.com/media/c3cb125355e5cf0df0f9985c067b0adf/href</a></iframe><p>100 tweets with the hashtag #100daysofcode will be displayed after the above code is run.</p><p><strong>Step 7</strong>: Save the extracted tweets to any file format you deem fit. You could either save it in CSV format or JSON. CSV (comma-separated values) format is one of the most common file formats for storing data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/539244cf4ed881ea6d4842ee9e4244de/href">https://medium.com/media/539244cf4ed881ea6d4842ee9e4244de/href</a></iframe><p>For the above code, you should specify and extract the kind of information you need from the tweets (for example, I used “id”, “created_at” and “text”).</p><p>You could then confirm your extraction process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/13f77b4068a60caab8afb10adac59d3c/href">https://medium.com/media/13f77b4068a60caab8afb10adac59d3c/href</a></iframe><h4>Conclusion</h4><p>In this article, the process of extracting tweets on a hashtag from Twitter’s API using Tweepy was highlighted. Another cool Python library for extracting data from Twitter is <a href="https://github.com/JustAnotherArchivist/snscrape/blob/master/snscrape/modules/twitter.py">Snscrape</a>. Snscrape is specifically designed for scraping social media data, including data from Twitter.</p><p><em>The link to the GitHub repository for this article could be accessed </em><a href="https://github.com/joy-commits/twitter-web-scraping"><em>here</em></a><em>.</em></p><p><em>If you enjoyed this piece, consider following </em><a href="https://medium.com/@ufuomaejite"><em>me</em></a><em> for more technical content.</em></p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Interested in scaling your software startup</em></strong><em>? Check out </em><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34d697ecba21" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/how-to-extract-tweets-on-a-hashtag-from-twitter-api-using-tweepy-34d697ecba21">How to Extract Tweets on a Hashtag from Twitter API Using Tweepy</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Career Journey So Far…]]></title>
            <link>https://ufuomaejite.medium.com/my-career-journey-so-far-2e650f67d4dd?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e650f67d4dd</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech-newbie]]></category>
            <category><![CDATA[career-journey]]></category>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[newbie]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Mon, 17 Oct 2022 15:23:40 GMT</pubDate>
            <atom:updated>2022-10-17T15:23:40.867Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="An empty road in between grass fields at dusk" src="https://cdn-images-1.medium.com/max/1024/1*QPz-3o8KIXbB2aJJAlht6Q.jpeg" /><figcaption>Source: pexels.com</figcaption></figure><p>Choosing a path in Tech is usually the bulk of the journey as a newbie because you could end up meandering the “streets” and depression could set in. In my case, the first code I wrote was in C++. I just felt it was a good place to start, as I wanted to develop games initially. Thereafter, I felt “lost in the codes”, and I wasn’t just satisfied with it. I moved over to app development (I actually did develop my first mobile app — a browser — yeah!). It felt cool at first, but it wasn’t just what I wanted. I felt there was something more I needed to explore.</p><p>Afterward, I attended my first ever “Tech meeting” in 2019. It was a meeting for newbies, and my eyes were opened to see various possibilities in Tech. Later, I got into frontend web development and still felt unsatisfied.</p><p>I finally settled for data science. Data science was one field that piqued my interest (and it still is). My first “stage moment” was sometime in 2021 when I gave a talk about “Getting Started in Data Science” at an event (Ladies Can Tech 1.0) hosted by Harvoxx Tech Hub. It was quite a scary moment for me. I was in a disorganized phase, as I did not even have a well-defined path for myself. It was a “wake-up” for me after I delivered the talk.</p><p>The defining moment for me was in November 2021 when I had my first data science gig. I felt like I couldn’t deliver (…the imposter syndrome thing again). At the end of the contract in January this year, my client was super-pleased with me and even had to refer me to someone else too. It felt good then.</p><p>I participated in my first hackathon (organized by DataFest Africa) early this month. We were required to build a machine learning model that could predict the outcome of a FinTech’s lending process—if the credit facility process was completed via e-process or not. It was a fun and interesting experience, although my team didn’t make it to the final round. Our model’s accuracy was about 64.8%, which was not very good. However, I enjoyed working with my team, and I learned a lot.</p><p>Just recently, I took a major step by enrolling in a Writing Streak Bootcamp, and luckily, I got accepted. It has been a cool ride so far, and I am hoping to explore the world of Technical Writing and contribute to the Tech space by documenting my learning process.</p><h3><strong>Conclusion</strong></h3><p>It has not been all too rosy, of course. I have learned so many lessons so far and had so many losses. I have learned that diligence and consistency would keep me on the right path. I just have to keep on pushing and being focused on the journey ahead. I have also learned gratitude for every step or leap forward I make.</p><p>A major lesson I would never forget is about building projects. I began my journey “theoretically”, and I felt all that mattered was my certifications. I went through information overload and tutorial hell. At some point, I became confused. I know better now. As much as possible, I try to avoid consuming too many resources, and I stick to just a few.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e650f67d4dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey to the World of Python Programming: From a Python Newbie to You]]></title>
            <link>https://ufuomaejite.medium.com/my-journey-to-the-world-of-python-programming-from-a-python-newbie-to-you-c990e240fa45?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c990e240fa45</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 22:55:35 GMT</pubDate>
            <atom:updated>2021-06-03T22:55:35.269Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Source: unsplash.com" src="https://cdn-images-1.medium.com/max/750/1*P_K4kPEFPg_Wnl6B4fKE1g.jpeg" /><figcaption>Source: unsplash.com</figcaption></figure><p>I could remember writing my first “Hello World!” sometime in May, 2020☺. It was a very exciting moment of my life, as it was my very first time understanding how codes work. The study resource used then was “python tutorials for absolute beginners”. The course flow begun with variables in python, and then, gradual progress was made to data types, functions, the conditional statements (if, else &amp; elif), loops (for &amp; while), lists, index slicing, tuples, sets, dictionaries, datetime module, web scrapping, and zip functions. Much more focus was made then on the theoretical aspect than creating projects (a crucial mistake I made).</p><p><strong>BASIC CONCEPTS OF PROGRAMMING</strong></p><p>Programming just entails taking a task and writing it down in a programming language that the computer can understand and execute. The computer only understands 0s and 1s (binary). Source code (human-readable code) is fed into the computer via a software/IDE, which is then interpreted into the computer as 0s and 1s.</p><p>Computer programming involves formulating problems, breaking them down down into meaningful steps, and communicating these steps to the computer in an organized way. You do not have to come from a Tech background before you understand the concepts of programming. The only must-haves are problem-solving skills and abstract thinking, technical reasoning (understanding the syntax of a programming language) and having a good style of coding (easy-to-understand and well-arranged code lines; your codes must have a logical flow!!!).</p><p><strong>A BASIC UNDERSTANDING OF PYTHON</strong></p><p><strong>Why Use Python in Data Science?</strong></p><ol><li>Open-source — free and has a large usage community</li><li>General-purpose programming language</li><li>High-level programming language</li></ol><p><strong>Python’s IDE</strong></p><p>There are a couple of IDEs (Integrated Development Environment) available for Python [PyCharm, VS Code, Spyder, Jupyter Notebook, and several others] . An IDE is simply a software that enables programmers to write, edit and debug codes. I make use of Jupyter Notebook. Jupyter is a server-client application that allows code editing via a web browser. The codes stored in the notebook document using the file extension <em>.ipynb</em> (IPython NoteBook file), which could be stored locally or remotely. Anaconda is a software package that contains Python and Jupyter Notebook. You could install via this link <a href="https://docs.anaconda.com/anaconda/install/">https://docs.anaconda.com/anaconda/install/</a></p><p><strong>A few basic concepts/terms I had to know in Python programming as a newbie Data Scientist…</strong></p><ul><li>Variables and data types: 4 types of variables — integers, floats, boolean, strings.</li><li>Conditional statement: The if statement, else statement and elif (‘else if’) statement</li><li>Loops: For loop and While loop</li><li>Functions in Python</li><li>Lists, tuples and dictionaries</li><li>Iterations</li><li>Object-oriented programming</li><li>Modules and packages</li></ul><p>All these are just the basics I’ve come to understand. With time and consistency, I am advancing in Python programming and learning to apply all I’ve got into building data science projects. Learning never ends! This is just the beginning…</p><p><strong>SUMMARY</strong></p><p>The entirety of programming shouldn’t lie in just “reading codes” and forfeiting project building. Inasmuch as I strongly advise that any newbie like me to understand the basics and concepts of python programming, I wouldn’t still recommend that much time be dwelt on just head knowledge and real-time projects be left out. Also, consistency should be the key whilst laying your hands on codes (an hour or two dedicated study time per day wouldn’t hurt at all).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c990e240fa45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Things I’ve Learnt About Statistics]]></title>
            <link>https://ufuomaejite.medium.com/basic-things-ive-learnt-about-statistics-d068f85af107?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d068f85af107</guid>
            <category><![CDATA[tech-newbie]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[newbie-coder]]></category>
            <category><![CDATA[bootcamp-experience]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 21:03:49 GMT</pubDate>
            <atom:updated>2021-06-03T21:03:49.995Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Source: the conversation.com" src="https://cdn-images-1.medium.com/max/554/1*rPmn9E9d1PCeo1zq5nLDcQ.jpeg" /><figcaption>Source: the conversation.com</figcaption></figure><p>It’s been quite a very long time I gave an update to my study path😐 I’ve been doing a whole lot more study than penning down my experiences. It’s been a wholesome journey altogether.</p><p>Anyways, I’d be doing a brief review on Statistics (basically what you need to know as a Data Scientist) in this blog post.</p><p>Statistics generally entails the collection, organization, analysis, and interpretation of data. The data (in question) could either be population data or sample data. Sample data is just a subset of the population data. Whilst dealing with population data (denoted by N), you use the word “parameter”, and for that of sample (denoted by n), you use “statistic”. Two vital characteristics of a good sample data are randomness (data chosen by “chance”) and representativeness (avoiding biased samples by accurately reflecting the members of the entire population).</p><p>Data cannot be analyzed if its type isn’t known. Now, data is being classified based on two criteria: based on type and levels of measurement.</p><p>Based on type:</p><ol><li>Categorical data — this describes data in categories/groups. An example is a yes/no survey (“yes” is one group of data, and “no” is another)</li><li>Numerical data — this basically describes numbers, and has two divisions: discrete data (finite) and continuous data (infinite; varies)</li></ol><p>Levels of measurement:</p><ol><li>Qualitative data— of two types: nominal (cannot be ordered, e.g. seasons[autumn, spring, summer, winter], country of origin) and ordinal (can be ordered or arranged in categories, e.g. stages of cancer)</li><li>Quantitative data — of two types: interval (does not have a true zero, e.g. year, time) and ratio (has a true zero, e.g. distance)</li></ol><p><strong>TYPES OF STATISTICS</strong></p><p>Statistics is of three (3) types: descriptive statistics, inferential statistics and hypothesis testing</p><p>DESCRIPTIVE STATISTICS</p><p>This entails organizing, visualizing/picturing, and summarizing data. Visualizing data is very much easy when we know the type of data and the level of measurement.</p><p>When working with categorical variables, you visualize using tools such as:</p><ol><li>Frequency distribution tables</li><li>Bar charts (or column charts)</li><li>Pie charts</li><li>Pareto diagrams</li><li>Cross tables</li></ol><p>But, with numerical variables, we could use:</p><ol><li>Histograms</li><li>Scatter plots</li></ol><p>Some Terms Used in Statistics</p><ol><li>Measure of central tendency: The mean (average), mode (most occurring data), and median (the middle number in an ordered dataset).</li><li>Measure of asymmetry (skewness): shows the concentration of the data</li><li>Measures of variability: The variance, standard deviation and coefficient of variation</li></ol><p>INFERENTIAL STATISTICS</p><p>These are methods that rely on probability theory and distributions to predict population values based on sample data.</p><p>HYPOTHETICAL TESTING</p><p>A hypothesis is an idea that can be tested. There are two types of hypothesis: the null hypothesis (Ho) and the alternative hypothesis (H1 or Ha). The null hypothesis is the idea that is to be tested while the alternative is every other idea. In other words, the null hypothesis could be likened to the “status quo” while the alternative would be the change/innovation challenging the status quo. Or, we could say simply that the null hypothesis is the “statement we are trying to reject” and the alternative hypothesis is “our personal opinion”. The null hypothesis is being accepted if it is closer to the mean.</p><p>In hypothesis testing, two (2) errors could be gotten:</p><ol><li>Type 1 error (or a false positive)— when you reject a TRUE null hypothesis</li><li>Type 2 error (or a false negative) — when you accept a FALSE null hypothesis</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d068f85af107" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematics in Data Science (2)]]></title>
            <link>https://ufuomaejite.medium.com/mathematics-in-data-science-2-bd6b1664e120?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd6b1664e120</guid>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[progress]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Sun, 18 Apr 2021 14:00:49 GMT</pubDate>
            <atom:updated>2021-04-18T14:00:49.623Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Source: Shutterstock" src="https://cdn-images-1.medium.com/max/501/1*HDf6SF0jVFYWTw6qHCQBwQ.jpeg" /><figcaption>Source: Shutterstock</figcaption></figure><p>Woww! It’s been quite an interesting learning path as a beginner in Data Science. In my previous blogpost, a brief note was made on probability, combinatorics and Bayes’ theorem. The focus here would be strictly on probability distribution.</p><h4>Probability Distribution</h4><p>Probability distribution shows the collection of all possible values a variable can take and how frequently they occur.</p><p>Two (2) vital characteristics of a probability distribution are:</p><ol><li>Mean- the average value of a collection of variables.</li><li>Variance- the measure of dispersion of a certain dataset; how spread out a data is.</li></ol><h4>Types of Probability Distribution</h4><p>Based on the type of data we have, probability distribution is grouped into two:</p><ol><li>Discrete distribution</li><li>Continuous distribution</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*3HWq5kC9vmTZDwPMlDnl-g.png" /><figcaption>Source: Google</figcaption></figure><p>The discrete distribution has a finite (limited) number of outcomes [for example, rolling a dice or picking a card out of a pile of cards], while the continuous distribution has an infinite (limitless) number of outcomes [for example, recording the blood pressure of adult male athletes in West Africa].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*mgY_SbNRo-GzFhuJv7Nl8w.png" /><figcaption>Source: Google</figcaption></figure><h4>Discrete Distribution</h4><p>As mentioned earlier, the discrete distribution has a finite number of outcomes. There are four types of the discrete distribution: uniform, Bernoulli, binomial, and Poisson distributions</p><p><strong>Uniform distribution</strong>: Here, all outcomes of events are equiprobable (having equal likelihood of occurrence). An example of such event is rolling a standard 6-sided die. The probability of getting a 1 is same as that of getting a 2, 3, 4, 5 and even 6; that is, P(1)=P(2)=P(3)=P(4)=P(5)=P(6). Another example is making a choice out of 5 identical grey T-shirts. The probability of picking any of the shirts is always same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*oKp7r1ayLe9IOZhmdTXQUQ.png" /><figcaption>A typical uniform distribution graph (Source: xaktly.com)</figcaption></figure><p><strong>Bernoulli distribution:</strong> Here, each events produce 2 outcomes with 1 trial (or iteration). A Bernoulli distribution is denoted as <em>Bern(P)</em>. Examples of such events include: a coin flip (you’d get either a head or a tail) and quizzes with True/False answers. The outcomes gotten are assigned either 0 or 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*YioKEQP4F_xxTLM4qRih8Q.gif" /><figcaption>A typical Bernoulli distribution (Source: Google)</figcaption></figure><p><strong>Binomial distribution:</strong> This is a sequence of identical Bernoulli events. Hence, a Bernoulli distribution can be said to be a binomial distribution with a single trial. For example, taking a quiz and guessing the entire questions would be binomial, while guessing just 1 question in the quiz would be a Bernoulli distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*OgEOdqYi4td4jjs16qNoWQ.jpeg" /><figcaption>A typical binomial distribution (Source: Google)</figcaption></figure><p><strong>Poisson distribution:</strong> This shows the frequency with which an event occurs within a specific interval.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSZEu5UbmmTfepXCv8SsoQ.png" /><figcaption>A typical Poisson distribution (Source: Google)</figcaption></figure><h4>Continuous Distribution</h4><p>Continuous distribution deals with “continuous” outcomes (infinite outcomes). They can’t be represented on tables (due to their “large sample size”), but on graphs. Its graph is a smooth curve (which could be called a Probability Distribution Curve or PDC), rather than bars (as in discrete distribution).</p><p>There are five (5) types of the continuous distribution: Normal distribution, Student’s-T distribution, Chi-Squared distribution, Exponential distribution and Logistic distribution.</p><p><strong>Normal Distribution:</strong> Often observed in nature, hence called a normal distribution. An example of events that follow normal distribution is this: According to health researches, the normal blood pressure of a healthy adult is 120/80mmHg. However, some individuals might still have values as high as 125/85mmHg and as low as 110/75mmHg. When represented, these other values would fall at the extremities of our graph, and are called <em>outliers</em>. They occupy just a small percentage of our dataset.</p><p>The graph of a normal distribution is bell-shaped and symmetric (as regards to the mean). The outliers in the graph are represented by thin tails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*NBzqc0bkQIuCQK24bmdJCw.png" /><figcaption>A typical normal distribution curve (Source: Google)</figcaption></figure><p><strong>Student’s-T distribution:</strong> This is a small sample size approximation of a normal distribution. Its notation is t(k) where k represents the “degree of freedom” . The T distribution is applied in statistical analysis for hypothesis testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*fBzYAU8wqt1ruoNsHmzXrA.jpeg" /><figcaption>A typical student’s-T distribution (Source: Google)</figcaption></figure><p><strong>Chi-Squared distribution: </strong>This is an asymmetric distribution, and its curve is typically skewed to the right. It doesn’t often occur in real-life events. It is more featured in statistical analysis when doing hypothesis testing to determine the “goodness of fit” of categorical variables and for computing confidence intervals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*VjsgAobK1jtg35wdLTWU0A.jpeg" /><figcaption>A typical Chi-Squared distribution curve (Source; Google)</figcaption></figure><p><strong>Exponential distribution:</strong> As the name implies, its variables are those in which their probability starts off high and later decreases. A typical real-life example would be this: When there is a breaking news or a trend on Twitter, at first there is a great interest upon the start of the trend and huge engagement on that supposed trend. Thereafter (maybe, within a few days), the engagement begins to decrease. As time goes on, engagement is random due to less relevancy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*dSxYB6Di7P9_LXU0vYeXSA.gif" /><figcaption>A typical exponential distribution curve (Source: Google)</figcaption></figure><p><strong>Logistic distribution:</strong> Often used in mathematical modelling. It is used to determine how continuous variable inputs can affect the probability of a binary output. The center of the logistic distribution curve is the mean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2_hjD_lb1ZLr1HN0ovJYw.png" /><figcaption>A typical logistic distribution (Source: machinelearningmastery.com)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd6b1664e120" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mathematics In Data Science (1)]]></title>
            <link>https://ufuomaejite.medium.com/mathematics-in-data-science-1-f652b74ee36e?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f652b74ee36e</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Fri, 09 Apr 2021 23:19:19 GMT</pubDate>
            <atom:updated>2021-04-18T13:59:33.617Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Probability</strong></p><figure><img alt="Source: cuemath.com" src="https://cdn-images-1.medium.com/max/679/1*SnF7rx1HsSNtkxFH6IIxWw.jpeg" /><figcaption>Source: Google</figcaption></figure><p>Our everyday life comes with uncertainties; an event could be expected or not. For instance, when someone sits for an examination, the person either succeeds (passes) or fails. The attempt in sitting for the examination, in this instance, is a <strong>trial</strong> (or experiment), while the result of such attempt is the <strong>outcome. </strong>Similarly, in a crate of eggs, there are chances that we could take out both rotten eggs or the good ones when doing a random selection.</p><p>The basis of probability is that expectations may likely occur or not, due to happenings (events) and their results.</p><p>Therefore, probability is the likelihood of an event occurring; that is, the chance of something happening. Events are specific outcomes or combinations of several outcomes. They might be likely (having a chance of occurrence) or unlikely (no chance of occurrence).</p><p>Probability measures the outcomes (results) of events (expectations) in numerical form, and it ranges between 0 and 1 (0≤P&lt;1); a result of 0 meaning absolute certainty of an event NOT occurring, and 1 meaning an absolute certainty of an event occurring.</p><p>There are basically two forms of probability:</p><ol><li>Theoretical probability</li><li>Experimental probability</li></ol><p><strong>Theoretical Probability</strong></p><p>Theoretical probability takes into cognizance the actual disposition of a situation to give an exact value for a probability. It could be called the true or actual probability.</p><p>Theoretical probability, P(A) = Number of favorable outcomes ÷ All possible outcomes</p><p>The probability of getting a number divisible by 2 when you roll a dice is 3 ÷ 6 = 0.5</p><p><strong>Experimental Probability</strong></p><p>This uses experimental data gotten from the outcome of an experiment to predict future events. In other words, it is the probability gotten after conducting experiments (multiple trials). The average expected outcome of our experiment is called the <strong>expected values. </strong>If you roll a dice 50 times and record 50 outcomes, that’s a single experiment with 50 trials!</p><p>Experimental probability, E(A) = Number of successful trials ÷ All trials</p><p>Experimental probabilities are NOT ALWAYS equal to theoretical probabilities.</p><p>E(A) = P(A) × n, where n is the number of trials</p><p><strong>Complements in Probability</strong></p><p>A complement is anything the event is not. The complement of an event, B would be B’. The addition of an event B and its complement (B’) would give the total sample space. That is, P(B’) + P(B) = 1</p><p>Let’s assume we have the probability of rolling an odd number (in a dice), P(O) as 0.5, then the probability of not rolling an odd number would be the complement of P(O), which would be: P(O’) = 1- P(O) = 1- 0.5 = 0.5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDiA8mvaz8ERf3oDWGQtNA.png" /><figcaption>Source: Google</figcaption></figure><p><strong>Combinatorics</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*sDYFUoF6gGZJ7SaTzFQs-Q.png" /><figcaption>Source: Google</figcaption></figure><p>Combinatorics essentially deals with combination of objects from specific finite sets. The components of combinatorics are: permutation, variation and combination.</p><p><strong>Permutations</strong></p><p>This is the number of different possible ways we could <strong>arrange</strong> a set of elements. Permutation doesn’t allow for repetition. A typical example would e selecting the first 3 winners from a certain competition. The permutation of a set of n numbers would be</p><p>Pn = n × (n-1) × (n-2) × … × 1 = n!</p><p><strong>Variations</strong></p><p>This is the total number of ways we can <strong>pick and arrange</strong> some elements of a given set.</p><p><strong>Combinations</strong></p><p>This is the number of different ways we can <strong>pick </strong>certain elements of a set. In combination, the order in which we pick is irrelevant. A typical example is selecting food from a meal menu.</p><p><strong>Bayes’ Theorem</strong></p><p>Bayes’ theorem is a mathematical law that allows us find a relationship between the different conditional probabilities of 2 events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*MKMGSNeEUv48JaOnkuW0Qg.png" /><figcaption>The Bayes’ formula (Source: Google)</figcaption></figure><p>The Bayes’ theorem is applied in machine learning where it shows the relationship between a data and a model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f652b74ee36e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey Into The World Of Data Science]]></title>
            <link>https://ufuomaejite.medium.com/my-journey-into-the-world-of-data-science-c40e935a07c1?source=rss-236b782c6ac4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c40e935a07c1</guid>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Ufuoma Ejite]]></dc:creator>
            <pubDate>Fri, 09 Apr 2021 18:40:15 GMT</pubDate>
            <atom:updated>2021-04-09T22:21:16.431Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TLFrTcr65AkKuLD67eegQ.jpeg" /><figcaption>Source: Google</figcaption></figure><p>Hello, my Medium fellows!😊 It’s my first work here, and I’d be making some updates on my journey thus far into Data Science.</p><p>Getting into Tech from a non-Tech (or even a Mathematics or Statistical) background could be quite difficult, especially when there isn&#39;t any proper exposure.</p><p>The best way to dive in would have to be undoubtedly via an Introductory course. I would be taking a course on Udemy in conjunction with 365 DataScience (the complete data science bootcamp).</p><p><strong>General Overview of Data Science</strong></p><p>Data science is just basically all about storytelling (visualizing data) and making sense of numbers.</p><p>Data is the foundation of data science. It&#39;s essentially the material on which all analyses are based; that is, data science is completely reliant on data availability.</p><p>Data can be said to be of two (2) types:</p><ol><li>Traditional data: These are structured and stored in databases, and can be managed from just one computer. They are arranged in tables and contain numeric or text values.</li><li>Big data: These are extremely large data distributed across a network of computers. It could be structured, semi-structured, or even unstructured. Its characteristics aren&#39;t only in volume (data measured in terabytes, petabytes, zettabytes, exabytes, hence its name, &quot;big&quot; data), but also variety (various formats like images, numbers, texts, audio, video, mobile data, etc), and velocity (extraction of data done as quickly as possible).</li></ol><p>The field of data science has evolved over the years, as can be seen below:</p><p>Statistics =&gt; Data mining =&gt; Predictive analysis =&gt; Data science</p><p>...and it still keeps on evolving.</p><p><strong>Data Preprocessing</strong></p><p>There are five (5) main steps in converting raw data into a more understandable data format useful for further processing. These processes could also be collectively known as &quot;data wrangling&quot; or &quot;data munging&quot;.</p><ol><li>Class-labeling the observations- arranging data by category or format</li><li>Data cleansing/data scrubbing- dealing with inconsistent data (e.g. misspelled words, etc)</li><li>Data balancing- extracting an equal number of observations for each category</li><li>Data shuffling- rearranging data points to eliminate unwanted patterns and improve predictive performance</li><li>Data masking (for big data)- ensuring and maintaining confidentiality and data privacy</li></ol><p><strong>Analysis vs Analytics</strong></p><p>Analysis simply deals with data from the past while Analytics takes on the data from the past and uses it to explore potential future events. Analytics works on the computations gotten from Analysis. Data science incorporates analysis and analytics.</p><p><strong>Data Science Tools</strong></p><p>Data science is an interdisciplinary field that combines</p><ul><li>statistical tools- includes SPSS, MS-Excel, Stata, and MATLAB for statistical methods (such as linear regression analysis, logistic regression analysis, cluster analysis, factorial analysis, and time series)</li><li>mathematical tools- mathematics is the bedrock of data science, and they include calculus, algebra, and probability</li><li>programming tools- majorly R and Python</li><li>problem-solving tools</li><li>data management tools</li></ul><p><strong>Data Science Roles</strong></p><figure><img alt="Source: 365 data science infographics" src="https://cdn-images-1.medium.com/max/607/1*2A_e-yedp5L-tnl393ke5A.jpeg" /><figcaption>Source: 365 data science infographics</figcaption></figure><p>According to 365 Data Science, data science roles are grouped into five:</p><ol><li>Traditional data — data architect, data engineer, database administrator</li><li>Big data — big data architect, big data engineer</li><li>Business intelligence (BI) — BI analyst, BI consultant, BI developer</li><li>Traditional methods (statistics) — data scientist, data analyst</li><li>Machine learning — data scientist, machine learning engineer</li></ol><p><strong>Conclusion</strong></p><p>Several misconceptions have been made as regards the data science field and its role divisions and even tools applied. As I make progress into further sections, clarity would be achieved, in terms of role diversification and proper application of the data science tools, hence, becoming a Data Science Amazon would be easily attainable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c40e935a07c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>