<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peter Wainaina </title>
    <description>The latest articles on DEV Community by Peter Wainaina  (@wainainapeter).</description>
    <link>https://dev.to/wainainapeter</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F996046%2F575f2eb6-01b8-480f-b912-36f78c3ccbb7.jpeg</url>
      <title>DEV Community: Peter Wainaina </title>
      <link>https://dev.to/wainainapeter</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wainainapeter"/>
    <language>en</language>
    <item>
      <title>Data Science for Beginners: 2023–2024 Complete Roadmap.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Sun, 19 Nov 2023 17:53:59 +0000</pubDate>
      <link>https://dev.to/wainainapeter/data-science-for-beginners-2023-2024-complete-roadmap-2h7i</link>
      <guid>https://dev.to/wainainapeter/data-science-for-beginners-2023-2024-complete-roadmap-2h7i</guid>
      <description>&lt;h2&gt;
  
  
  Data Science for Beginners: 2023–2024 Complete Roadmap.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B8ODJtFf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/4096/1%2AFrfgJTUCj9IcH9pKz-JMxg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B8ODJtFf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/4096/1%2AFrfgJTUCj9IcH9pKz-JMxg.jpeg" alt="cover picture showing galaxy" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Data Science?
&lt;/h2&gt;

&lt;p&gt;In very simple terms, Data Science is the study of data with the intention of extracting meaningful insights from the data and then using those insights to make data-informed decisions, mostly for businesses and organizations.&lt;/p&gt;

&lt;p&gt;A more technical definition, I especially like how IBM gives the definition of Data Science:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;“Data science combines math and statistics, specialized programming, advanced analytics, artificial intelligence (AI), and machine learning with specific subject matter expertise to uncover actionable insights hidden in an organization’s data. These insights can be used to guide decision making and strategic planning.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Mk0-RvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AUMWQCmryxfwsF-m_1X3dBQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Mk0-RvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AUMWQCmryxfwsF-m_1X3dBQ.jpeg" alt="picture written: yeah that's right, I am a data scientist" width="300" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why learn Data Science?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With the definition out of the way, why then do you need to learn Data Science?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data is the new oil.&lt;/strong&gt; You might have heard this somewhere and it may sound like an overstretch but truer words have never been spoken. In the 21st Century, Data is the new driving force behind industries and organizations that have tapped into drawing insights from their customer data, consensually of course, are far ahead of competition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pool of opportunities.&lt;/strong&gt; It goes without saying that data is at the center of any industry you may think of. Some of the industries that have really embraced data science include Healthcare, Fintech and E-commerce.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pFQL1t2D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AFCxm5xQRVygyCJnoh_kBzw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pFQL1t2D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AFCxm5xQRVygyCJnoh_kBzw.jpeg" alt="picture written: data science the job of the century" width="297" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;**Lucrative career. **This shouldn’t be the main reason driving you to get into Data Science but the fact is there’s pretty fair compensation in the Data Science industry. According to Glassdoor, the average salary for a Data Scientist is $117,345/yr.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**Use Data to do good. **Adversities can be detected and avoided by the insights gotten from building predictive models. For example in healthcare, there are a number of models built for detection of some serious complications like heart failure which can predict the chance of a person’s heart developing complications based on some inputs. As a result, a person can learn from the insights and change their lifestyle, consequently avoiding getting the disease in the long run.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Roadmap.
&lt;/h2&gt;

&lt;p&gt;In order to break into the field of Data Science, there are some basic Foundations that are a must have. These include:&lt;/p&gt;

&lt;h3&gt;
  
  
  Mathematics
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Linear Algebra&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Probability and Statistics&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calculus&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Programming
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Python —(&lt;a href="https://medium.com/@wainaina.pierre/python-101-introduction-to-python-for-data-science-5954cb4238da"&gt;“Introduction to Python for Data Science”&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Programming Syntax in Python&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Functions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Structures (lists, tuples, dictionaries)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object Oriented Programming&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;R&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Data Manipulation
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Numpy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pandas&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dplyr( R Programming)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Data Visualization
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Matplotlib&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Seaborn&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ggplot2 (R)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Data Preprocessing and Exploration.
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Exploratory Data Analysis&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feature Engineering&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Cleaning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handling Missing Data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Normalization&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Git and GitHub.
&lt;/h3&gt;

&lt;p&gt;As a data scientist, your work often involves collaborating with fellow data scientists on various projects. During these collaborations, you need to make updates to specific sections of the code. This is where Git and GitHub play a pivotal role in enhancing workflow efficiency.&lt;/p&gt;

&lt;p&gt;I have a detailed article on Git and GitHub for Data Scientists, &lt;a href="https://medium.com/@wainaina.pierre/comprehensive-guide-to-github-for-data-scientists-76e371f60226"&gt;“Comprehensive Guide to GitHub for Data Scientists.”&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL.
&lt;/h3&gt;

&lt;p&gt;SQL is one of the most important tools that a data scientist should be well versed with. It gives the Data Scientist the ability to retrieve and filter data, manipulate data, aggregate and summarize data, join data.&lt;/p&gt;

&lt;p&gt;I have a detailed article on SQL, &lt;a href="https://medium.com/@wainaina.pierre/essential-sql-commands-that-are-a-must-know-for-a-data-scientist-b69a68a8d8ac"&gt;“Essential SQL commands that are a must know for a data scientist.”&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Machine Learning.
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Supervised Learning&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Regression&lt;br&gt;
_Linear Regression&lt;br&gt;
_Polynomial Regression&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Classification&lt;br&gt;
_Logistic Regression&lt;br&gt;
_Support Vector Machines&lt;br&gt;
_Decision Trees&lt;br&gt;
_K-Nearest Neighbors&lt;br&gt;
_Random Forest&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Unsupervised Learning&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clustering&lt;br&gt;
_K-Means Clustering&lt;br&gt;
_Hierarchical Clustering&lt;br&gt;
_DBSCAN&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dimensionality Reduction&lt;br&gt;
_Principal Component Analysis (PCA)&lt;br&gt;
_T- Distributed Stochastic Neighbor Embedding (t-SNE)&lt;br&gt;
_Linear Discriminant Analysis (LDA)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reinforcement Learning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model Evaluation and Validation&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cross- Validation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hyperparameter Tuning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model Selection&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Python Libraries&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scikit-learn&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tensorflow&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pytorch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keras&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Deep Learning.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Neural Networks&lt;br&gt;
_Perceptron&lt;br&gt;
_Multi-Layer Perceptron&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Convolutional Neural Networks (CNNs)&lt;br&gt;
_Image Classification&lt;br&gt;
_Object Detection&lt;br&gt;
_Image Segmentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recurrent Neural Networks (RNNs)&lt;br&gt;
_Sequence-to-Sequence Models&lt;br&gt;
_Text Classification&lt;br&gt;
_Sentiment Analysis&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU)&lt;br&gt;
_Time Series Forecasting&lt;br&gt;
_Language Modeling&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generative Adversarial Networks (GANs)&lt;br&gt;
_Image Synthesis&lt;br&gt;
_Style Transfer&lt;br&gt;
_Data Augmentation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Visualization and Reporting.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dashboarding Tools&lt;br&gt;
_Tableau&lt;br&gt;
_Power BI&lt;br&gt;
_Dash (Python)&lt;br&gt;
_Shiny (R)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Storytelling with Data&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Must have Soft Skills.
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Be a Problem- Solver&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Effective Communication Skills&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time Management&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Teamwork&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Keep Learning.
&lt;/h3&gt;

&lt;p&gt;As a Data Scientist, similar to all other fields in tech, you will be a forever- learner. There will always be emerging trends, frameworks and languages and you have to stay up-to-date to be an effective Data Scientist.&lt;/p&gt;

&lt;p&gt;Some ways to keep you up to date and in a loop of continuous learning include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Doing online courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Work on projects. You can get datasets which are readily available on platforms like Kaggle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Solving online challenges like leetcode and Hackerrank.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reading Data Science Books and Research papers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reading Informative Articles and Blogs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Networking through Meetups both online and Physical.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BOCjb-9L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AIVPslkXavKMsA5v7UfxGZA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BOCjb-9L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2AIVPslkXavKMsA5v7UfxGZA.jpeg" alt="picture written: data scientists, data scientists everywhere" width="267" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>data</category>
      <category>datascience</category>
      <category>beginners</category>
      <category>python</category>
    </item>
    <item>
      <title>Web Scraping: Unleashing Insights from Online Data.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Sat, 18 Nov 2023 17:09:29 +0000</pubDate>
      <link>https://dev.to/wainainapeter/web-scraping-unleashing-insights-from-online-data-kon</link>
      <guid>https://dev.to/wainainapeter/web-scraping-unleashing-insights-from-online-data-kon</guid>
      <description>&lt;h2&gt;
  
  
  Web Scraping: Unleashing Insights from Online Data.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jg2Lmz06--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/15468/0%2AC0KTXIdafa_d43Il" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jg2Lmz06--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/15468/0%2AC0KTXIdafa_d43Il" alt="Photo by [Nathan Dumlao](https://unsplash.com/@nate_dumlao?utm_source=medium&amp;amp;utm_medium=referral) on [Unsplash](https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral)" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Some background info:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Collection&lt;/strong&gt; is a Data Process and it involves collecting relevant data from various sources, to be used for analysis or for building models. One of the methods of data collection is &lt;strong&gt;Web Scraping&lt;/strong&gt; which you will be able to do by the end of this tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Web Scraping?
&lt;/h2&gt;

&lt;p&gt;Web Scraping is basically a technique used to collect data from the internet. It is an automated process of collecting large unstructured data from websites.&lt;/p&gt;

&lt;h2&gt;
  
  
  When do you need Web Scraping?
&lt;/h2&gt;

&lt;p&gt;Under normal circumstances, you would ideally use an API to fetch content from a target website but this may not always be the case because not every website has an API through which you can fetch data. In such a scenario where an API is non-existent, you may have to turn to Web Scraping to get the content you want from a website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some of the reasons of scraping web pages include:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Collecting data to be used for analysis or building Machine Learning Models&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customer sentiment analysis through reviews on products for example on ecommerce websites.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Competitor analysis and product price comparison.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Take note that you may come across some websites that explicitly forbid the use of automated web scraping tools and therefore always check your target website’s acceptable use policy to ensure you do not violate its terms of use.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to web-scrape.
&lt;/h2&gt;

&lt;p&gt;You are going to use beautifulsoup, which is a dedicated web scraping Python library.&lt;/p&gt;

&lt;p&gt;A Web scraper uses hypertext transfer protocol (HTTP) to request data from a target website using the GET method.&lt;/p&gt;

&lt;p&gt;You will GET the HTML from your target URL using the requests library in Python. You will then pass the content that will be returned into beautifulsoup and then use selectors to query the specific data you want from the website.&lt;/p&gt;

&lt;p&gt;Prerequisites.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Have python3 installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An IDE to run your code, for example VS Code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After making sure that you have python3 installed on your computer, you will need to install the necessary libraries for building the web scraper. These libraries are: pandas, beautifulsoup and requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Have a copy of the URL to your target website. For my case I will scrape data from backmarket.com.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Install the required libraries:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PBuePCTt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AmZeXpODoiuD03gPl" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PBuePCTt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AmZeXpODoiuD03gPl" alt="code installing the required libraries" width="712" height="127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Import the required libraries into your code:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xdCDVb4Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AbI4M54AX6BMVUDgH" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xdCDVb4Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AbI4M54AX6BMVUDgH" alt="code importing the required libraries" width="717" height="110"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialize an empty list to store the data you will get from the target website:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rRAcU_81--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AzBVK77pXezF-YFYt" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rRAcU_81--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/0%2AzBVK77pXezF-YFYt" alt="code to initialize an empty list to store the data you will get from the target website" width="717" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect the target Website:
&lt;/h2&gt;

&lt;p&gt;Go to your target website and inspect it by either right clicking and going to inspect or using the shortcut ctrl+shift+i on Windows or command+shift+i on Mac.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aA1qVaWu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2AMw62vDNwhVasF9h2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aA1qVaWu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2AMw62vDNwhVasF9h2" alt="code to inspect target website" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the specific HTML code of a product card of your choice, preferably the first one in the page for easier navigation. You can see the product being overlaid by a blue filter as you continue collapsing the html code. Continue collapsing the HTML code until you get to the target data, for my case I want the name of the phone, the price and the status.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gT2l4OXP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2A18E4EK1rC-9lrg14" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gT2l4OXP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2A18E4EK1rC-9lrg14" alt="navigating to the specific HTML" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the collapsed data of my product card. I will select the class inside the div with the name, storage and status which will query the specific data as you will see in the full code down below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IKFUtVdw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2546/0%2AoVbid_I9duCVOShd" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IKFUtVdw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2546/0%2AoVbid_I9duCVOShd" alt="collapsed data of my product card" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the complete code that will essentially send a GET request to the target URL, query specific data and store the data in a CSV file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--khLOEdd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2A1OQAKc2WOX8ZjN_U" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--khLOEdd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2A1OQAKc2WOX8ZjN_U" alt="complete code that will essentially send a GET request to the target URL" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What specifically is the code doing?
&lt;/h2&gt;

&lt;p&gt;As you had seen earlier, the first three lines of code are the necessary imports you need for the web scraper.&lt;/p&gt;

&lt;p&gt;You then define an empty list where the data gotten from the target website will be stored.&lt;/p&gt;

&lt;p&gt;There is a for loop that will execute in all the 13 pages of my target website. The page numbers were indicated at the bottom of the page in my case, so I just specified them as they were. This may not always be the case as sometimes you may be scraping hundreds of pages and their number may not be explicitly stated.&lt;/p&gt;

&lt;p&gt;I am getting the name, price and status of the phone for each product in my target website, which is Samsung phones.&lt;/p&gt;

&lt;p&gt;I then created a list called info and assigned it three elements: Name, Price and Status and appended the info list to the “data” list defined in the code after the imports.&lt;/p&gt;

&lt;p&gt;Finally using pandas, put the data into a dataframe and convert the dataframe to CSV format and it should download in the directory where the file containing your code is located.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion.
&lt;/h2&gt;

&lt;p&gt;There you have it! You can now scrape a target website for specific data you may need, maybe for data analysis. In my case I managed to scrape 892 products, did Exploratory Data Analysis and zeroed down on the specific phone I wanted. This saved me the time that I would have otherwise taken to scroll through all the pages and look over all the 892 Samsung phones listed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iQZFO31y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2432/0%2AsVIoGEvXuboLjgaB" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iQZFO31y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2432/0%2AsVIoGEvXuboLjgaB" alt="code for EDA after web scraping" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webscraping</category>
      <category>python</category>
      <category>datascience</category>
    </item>
    <item>
      <title>What is WebAssembly? and does it have the potential to replace JavaScript on the web?</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Wed, 09 Aug 2023 07:53:53 +0000</pubDate>
      <link>https://dev.to/wainainapeter/what-is-webassembly-and-does-it-have-the-potential-to-replace-javascript-on-the-web-28b2</link>
      <guid>https://dev.to/wainainapeter/what-is-webassembly-and-does-it-have-the-potential-to-replace-javascript-on-the-web-28b2</guid>
      <description>&lt;p&gt;Since the inception of the web, the target compiler language has been JavaScript. Every web developer, myself included, has to have a good understanding of JavaScript, then advance to learning its frameworks, either for the front end or back end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some advantages of using JavaScript are:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript is easy to learn and understand&lt;/strong&gt;, making it accessible for both users and developers. The language’s structure is straightforward and user-friendly, making it easy to implement and saving web developers money when creating dynamic content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript is highly interoperable&lt;/strong&gt;, as it integrates seamlessly with other programming languages, making it a preferred choice for many developers when creating a range of applications. It can be included in any webpage or the script of another programming language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript is client-side&lt;/strong&gt;, therefore data validation can be done within the browser itself rather than being sent to the server, reducing the load on the server. In case of any discrepancies, only the selected area of the page needs to be updated by the browser, eliminating the need to reload the entire website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unlike other programming languages such as Java, &lt;strong&gt;JavaScript is an interpreted language&lt;/strong&gt;, which means it requires less compilation time, making it faster to execute. It is also a client-side script that speeds up program execution by eliminating wait times for server connections. JavaScript can be hosted anywhere and always runs in a client environment, which reduces bandwidth usage and boosts execution speed.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Truth be told, JavaScript is a bit stressful to work with, especially if you’re working on a large project and that’s where a language like TypeScript comes in, which is built on JavaScript but with type checking, meaning errors will be identified during run time and save you loads of time that you could have otherwise used during debugging your project, which is the worst situation to be in as a developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some other disadvantages of JavaScript include:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Although JavaScript may interpret quickly, the &lt;strong&gt;rendering of HTML through the JavaScript DOM can be slow&lt;/strong&gt;, leading to delayed rendering and debugging in HTML editors is not as efficient as other programming languages like C/C++.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For larger front-end projects, &lt;strong&gt;the configuration process can be tedious&lt;/strong&gt; due to the need to integrate multiple tools to create a suitable environment. This can directly impact the performance of the library.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developing large applications in JavaScript can be challenging&lt;/strong&gt;, but using a TypeScript overlay can help alleviate this issue by identifying errors during run time and significantly reducing the chance of shipping them to production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript can be interpreted differently by various browsers, making it challenging to write and read cross-browser code&lt;/strong&gt;. Additionally, errors in JavaScript can halt the rendering of an entire website and the continuous conversion of JavaScript also increases the time needed to run scripts and reduces their speed.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That was just some background information to get you up to speed.&lt;/p&gt;

&lt;p&gt;Now that we are on the same page, here’s the deal: everyone has that one language that they love programming with and sometimes wish they could use it in a more versatile manner, say use it to write code that will run on the web, if at all it’s not JavaScript.&lt;/p&gt;

&lt;p&gt;I bear good news, you can do exactly that, with Web Assembly. This is exciting news! Well at least it was for me when I first heard about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6puAYcOt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql7axbffmdbspq362wjw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6puAYcOt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql7axbffmdbspq362wjw.jpg" alt="lady jumping up in joy" width="720" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am sure you’re intrigued and asking what is this so called &lt;a href="https://webassembly.org/"&gt;WebAssembly&lt;/a&gt;? WebAssembly is a binary instruction format that boosts the efficiency of web browser programs. It gives a programmer the power to create web applications &lt;strong&gt;in the language of their choice&lt;/strong&gt; and creates minimal file sizes that load and run more quickly. In comparison to JavaScript, it is a new low-level binary compile format that is more suitable as a compiler target.&lt;/p&gt;

&lt;p&gt;Great news, right? I believe you are now as elated as I was when I first heard about Web Assembly.&lt;/p&gt;

&lt;p&gt;As a developer, &lt;strong&gt;you can write in your preferred language&lt;/strong&gt;, say C, C++ or Rust, which is subsequently translated into WebAssembly bytecode, meaning WebAssembly is not a programming language and you won’t have to learn a new language, if at all you might be wondering. After you have written your code, the bytecode is performed on the client, usually in a web browser, where it is converted into native machine code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7CeBmVTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owq3alife42qk836rym9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7CeBmVTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owq3alife42qk836rym9.jpg" alt="picture showing the process of web assebly" width="720" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebAssembly has a load of perks, including its compatibility with contemporary browsers and support for a variety of languages, including C, C++, Go and Rust.&lt;/p&gt;

&lt;p&gt;JavaScript is not meant to be replaced with WebAssembly, but rather to be used in collaboration with it. After all, JavaScript is still one of the core technologies of the web, since the inception of what we know as the World Wide Web, and powers more than 90% of websites on the client side for webpage behavior.&lt;/p&gt;

&lt;p&gt;Developers have been adopting WebAssembly, especially for performance-intensive use cases like video editing, CAD Applications, gaming (which are intensive in terms of heavy graphics) and music streaming. Below is a graph showing these uses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GWs1we5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68oygq5sq005ruw8hnvr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GWs1we5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68oygq5sq005ruw8hnvr.jpg" alt="graph showing various uses of web assembly" width="720" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a UX Designer, I can’t fail to mention Figma as an example of a web service that has already embraced WebAssembly, having been written in C++ and it is evident how powerful and performance intensive it is as a collaborative design tool on the web. WebAssembly supports a variety of languages such as C, C++, C#, Rust, Swift, Kotlin and Go, but support for other languages is being added, so don’t be all sully if your favorite language is not yet supported. Chances are it will be supported by the time you are reading this.&lt;/p&gt;

&lt;p&gt;The majority of WebAssembly scenarios involve writing code in a high-level language and converting it to WebAssembly. This can be accomplished in one of these three ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Through direct compilation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Through third-party tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Through a WebAssembly-based interpreter.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If at all you were interested in web development and for some reason don’t like JavaScript, WebAssembly has got your back. You can still create awesome web applications using your favorite language, so long as it is supported by WebAssembly. Happy coding!&lt;/p&gt;

</description>
      <category>webassembly</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Comprehensive Guide to GitHub for Data Scientists.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Wed, 26 Apr 2023 09:00:00 +0000</pubDate>
      <link>https://dev.to/wainainapeter/comprehensive-guide-to-github-for-data-scientists-5bmb</link>
      <guid>https://dev.to/wainainapeter/comprehensive-guide-to-github-for-data-scientists-5bmb</guid>
      <description>&lt;p&gt;This article is an in-depth guide to Git and GitHub. You will get to know what exactly Git and GitHub are and how you can leverage them to make your data science projects easier to track. As a data scientist, you need to have a solid grasp of these tools.&lt;/p&gt;

&lt;p&gt;As a data scientist, you are going to collaborate with other fellow data scientists on projects and as you guys collaborate, there will be times when you have to update some part of the code. This is where Git &amp;amp; GitHub comes in handy and helps create a better workflow in that whatever changes anyone you are collaborating with makes, they can easily make those changes available to all the other collaborators, without necessarily having to be in the same room, country or even time zone. And if you make a mistake, you can always roll back to a previous version.&lt;/p&gt;

&lt;p&gt;GitHub gives you the power to create a remote project and has all your team members work on different features in parallel, yet independently and still have a stable running code at the end of the day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LSEIGfm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpdincj9ik4ac0ml9qei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LSEIGfm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpdincj9ik4ac0ml9qei.png" alt="git image" width="348" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the difference between Git &amp;amp; GitHub?
&lt;/h2&gt;

&lt;p&gt;**Git **is a distributed Version Control System (VCS) that lets you keep track of all the modifications you make to your code. Being a distributed Version Control System ideally means that everyone who is collaborating on a project will have a history of the changes made on their local machine. This enables people to work on different features of the project without having to communicate with the server hosting the remote version of the project and you can easily merge any changes made to the project with the remote copy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt; is a platform for version control that is built on top of git technology and uses Git at its core. GitHub hosts the remote version of your project from where all the people collaborating can access it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminologies that you should be familiar with as we start:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt; – This is sort of a "Database" for all the branches and commits of a particular project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Branch&lt;/strong&gt; – It’s an alternative state or line of development for a repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Merge&lt;/strong&gt; – This is bringing together multiple branches into a single branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt; – This is creating a local copy of a remote repository on your machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Origin&lt;/strong&gt; – Refers to the remote repository from which the local clone was cloned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Master/Main&lt;/strong&gt; – This is the root branch of your remote repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stage&lt;/strong&gt; - Choosing the files that will be part of a new commit you intend to make.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt; - A saved snapshot of staged changes made to the file(s) in the repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HEAD&lt;/strong&gt; – It’s the current commit your local repository is currently on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt; – This is the act of sending your changes to the remote repository for everyone you may be collaborating with to see.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pull&lt;/strong&gt; – It’s the act of getting everybody else's changes (the changes that have been pushed) to your local repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Pull Request *&lt;/em&gt;– This is a mechanism to review and approve the changes you have made before merging to the main/master branch in the remote repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Basic commands that you should be familiar with:
&lt;/h2&gt;

&lt;p&gt;git init  - Create a new repository on your local computer.&lt;/p&gt;

&lt;p&gt;git clone - Start working on an existing remote repository.&lt;/p&gt;

&lt;p&gt;git clone &lt;/p&gt;

&lt;p&gt;git add - Choose file(s) to be saved (staging).&lt;br&gt;
git add  (adding a single file)&lt;/p&gt;

&lt;p&gt;git add -A (adding everything at once)&lt;/p&gt;

&lt;p&gt;git status  - Show which files you have changed.&lt;br&gt;
git status&lt;/p&gt;

&lt;p&gt;git commit  - Save a snapshot (commit) of the chosen file(s).&lt;br&gt;
git commit -m “”&lt;/p&gt;

&lt;p&gt;git push  - Send your saved snapshots (commits) to the remote repository.&lt;br&gt;
git push origin &lt;/p&gt;

&lt;p&gt;git pull  - Pull recent commits made by others into your local computer.&lt;br&gt;
git pull origin &lt;/p&gt;

&lt;p&gt;git branch  - Create or delete branches.&lt;br&gt;
git branch &lt;/p&gt;

&lt;p&gt;git checkout  - Switch branches or undo changes made to local file(s).&lt;br&gt;
git checkout &lt;/p&gt;

&lt;p&gt;git merge  - Merge branches to form a single branch.&lt;br&gt;
git merge  -m “”&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-step procedure of how to Create and Clone a Repository.
&lt;/h2&gt;

&lt;p&gt;This walkthrough will be of how to install Git on Windows and make a repository to which you will commit changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create Account &amp;amp; Git Installations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go to Git and install the latest version according to your computer. Once you are done installing, launch GitBash and then use the Git --version command to check the version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Initializing a new Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a new folder/directory using the $mkdir command and navigate to the created folder using the $cd command. My local directory name will be “myproject1” for the sake of context.&lt;/p&gt;

&lt;p&gt;Use the $Git init command to initialize the directory. To check if all is well so far, go to the folder where “myproject1” has been created and create a file with the .txt extension and write something to it like, ‘My first project is up and running’, then save the changes. After that, enter the Git bash and use the $Git status to check the status of the folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Configuring Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git config will allow you to set configuration values on how you would want Git to look and operate and uses these configurations to determine the non-default behavior that you may want. With Git config you can set global variables for example the name and email of a user and verify the variables using Git config --list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Commit Files in Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As it is currently, the file that we created is untracked. The Git add command will copy a file from the working directory to the staging area. Adding commits keeps track of the changes you perform. The commit command performs a commit and the -m “message” adds a message. It then takes a snapshot of the staging area and assigns a hash from the commit to the snapshot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Viewing Logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Logs will enable you to see the commit history and changes in a project when you have collaborated with different people on the same repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Uploading to a Remote Repository using Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a new repository on GitHub and give it a name as well as a readme description.&lt;/p&gt;

&lt;p&gt;Add a file into a folder and use these commands below in the exact sequence shown:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;cd &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git init&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git remote add origin &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git remote -v&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git add . (take note of the full stop/period)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git commit -m “your message”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git push origin master&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The file will be automatically added to the GitHub repository you just created.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Adding Git Remote to Your Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Git remote command can be used to share code to a remote repository. Any project can be downloaded from a remote server to your local computer. There is an existing connection between the original remote setup, which points to the “origin” remote connection.&lt;/p&gt;

&lt;p&gt;We use the command &lt;em&gt;Git remote add origin &lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8: Push using Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Git push command is used to upload local repository content and commits to a remote repository. After you have made the final modifications to your project, you perform a push operation so that the changes you have made can be successfully shared with remote team members you are collaborating with.&lt;/p&gt;

&lt;p&gt;The command is &lt;em&gt;Git push origin master&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9: Cloning a GitHub Repository&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cloning a repository will enable you to keep a copy from GitHub to your local repository. Each repository comes with versions of every file and folder for the project. It creates a copy of the existing repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10: Branching and Merging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Branching allows you to get the code from production to fix a bug or add a feature without modifying the already existing version. These branches work with a copy of code, make and build changes, test those changes, then merge them to the main branch.&lt;/p&gt;

&lt;p&gt;To create a new branch, use the command - _Git branch &amp;lt; name of branch &amp;gt;&lt;br&gt;
_&lt;br&gt;
**Step 1: **Create branch -&amp;gt; Git branch “branch name”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Checkout branch -&amp;gt; Git checkout “branch name”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Merge new branch in master branch -&amp;gt; Git merge “branch name”&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Step 11: Pull using Git&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Pull requests inform the changes in a branch in a repository. Once a pull request is opened, one can discuss and review the potential changes with collaborators and then commit after making those changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 12: Forking and Contributing to the world&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Forking is the process of contributing to or using someone else’s project as it creates a remote copy of the original repository into your repository. You get a copy on which you can make changes or improvements to the existing project using pull requests which can then be merged with the original project. You are basically making open-source contributions to someone else’s project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open any public repository and click on the Fork button to fork the changes.&lt;/li&gt;
&lt;li&gt;You can keep the same name of the repository you want to fork and click on Create Fork.&lt;/li&gt;
&lt;li&gt;Once you fork, you will see a copy of the original repository in your account.&lt;/li&gt;
&lt;li&gt;Once you have made changes in the code, you need to push the changes back.&lt;/li&gt;
&lt;li&gt;This takes the snapshot of the changes, commits and push help to push the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is how you contribute to open-source changes and contribute to a public repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As a data scientist, you must have in-depth knowledge of version control tools like Git and GitHub to participate in maintaining and reviewing changes in collaborative and personal projects.&lt;/p&gt;

&lt;p&gt;The key takeaway from this article is the basic Git commands and the step-by-step procedure of creating and cloning a repository.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>versioncontrol</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Getting started with sentiment analysis.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Wed, 26 Apr 2023 07:40:00 +0000</pubDate>
      <link>https://dev.to/wainainapeter/getting-started-with-sentiment-analysis-49jl</link>
      <guid>https://dev.to/wainainapeter/getting-started-with-sentiment-analysis-49jl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Sentiment analysis&lt;/strong&gt; is an approach to natural language processing (NLP) that studies the subjective information in an expression. When we say subjective information, this means that the information is subject to change from person to person and it includes the opinions, emotions, or attitudes towards a topic, person or entity which people tend to express in written form. These expressions can be classified as positive, negative, or neutral. Machine Learning algorithms review this textual data and extract valuable information from it and then brands and businesses make decisions based on the information extracted.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here are a few advantages of Sentiment Analysis especially in Business:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;It helps you understand your audience and their specific needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can gather actionable data about your products based on critiques and suggestions given by customers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can get meaningful insights about your brand and the kind of emotion it invokes among the people.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Conduct a comprehensive competitive analysis and gauge your product against that of your competitor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monitoring long-term brand health by tracking sentiments over long periods ensures that you have a positive relationship with your target customers.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It would be very expensive in terms of time and cost to have human beings read all customer reviews to determine whether the customers are happy or not with the business, service, or products. This necessitates the use of machine learning techniques such as sentiment analysis to achieve similar results at a large scale. For example, imagine a large company like amazon going through all reviews they receive about their products one by one, it would take ages and a lot of manpower to do so. A machine learning model would be the best approach in such a scenario.&lt;/p&gt;

&lt;p&gt;In this article, you will practically learn how to go about sentiment analysis using Twitter sentiments. By the end of the article, you will have developed a Sentiment Analysis model to categorize a tweet as either Positive or Negative.&lt;/p&gt;

&lt;p&gt;The dataset being used can be gotten from Kaggle.com using this link: &lt;a href="https://www.kaggle.com/datasets/kazanova/sentiment140"&gt;https://www.kaggle.com/datasets/kazanova/sentiment140&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This dataset contains 1,600,000 tweets extracted using the Twitter API and they have been annotated (0 = negative, 4 = positive) and can be used to detect sentiments.&lt;/p&gt;

&lt;p&gt;Take note that I have used Jupyter Notebooks.&lt;/p&gt;

&lt;p&gt;Make sure all relevant imports are present as shown in the code snippet below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pH_t_Jz7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zuz37hwriqt0v9dgiw2f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pH_t_Jz7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zuz37hwriqt0v9dgiw2f.jpg" alt="Image description" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Load the dataset into your notebooks and plot the distribution of the tweets based on whether they are positive or negative as shown:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0uQlzhfM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2nbwdsvgy9201xaj1b3v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0uQlzhfM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2nbwdsvgy9201xaj1b3v.jpg" alt="Image description" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You should expect the output shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MFYykkbG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t5b7o7b8afkcjlb5fatd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MFYykkbG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t5b7o7b8afkcjlb5fatd.jpg" alt="Image description" width="678" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perform Text Processing which is transforming text into a more digestible form so that machine learning algorithms can perform better.&lt;/p&gt;

&lt;p&gt;The Text Preprocessing steps that have been taken are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Converting each text into lowercase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;@Usernames have been replaced with the word "USER". (eg: "@pierre_wainaina" to "USER")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Characters that are neither numbers nor letters of the alphabet have been replaced with a space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replacing URLs: Links starting with "http" or "https" or "www" are replaced by "URL".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Short words with less than two letters have been removed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stopwords, which are words that do not add much meaning to a sentence, have been removed. (eg: "a", "she", "have")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Words have been lemmatized. Lemmatization is the process of converting a word to its base form. (e.g: “worst” to “bad”)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Emojis have been replaced by using a pre-defined dictionary containing the emojis and their meaning. (eg: ":)" to "EMOJIsmile")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;3 or more consecutive letters have been replaced by 2 letters. (eg: "Heyyyy" to "Heyy") &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y2GSUjX7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mwfv1z0gufj7vzy4xmlx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y2GSUjX7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mwfv1z0gufj7vzy4xmlx.jpg" alt="Image description" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EpjrcXID--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elk4x5b73undzaip5hh6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EpjrcXID--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elk4x5b73undzaip5hh6.jpg" alt="Image description" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0he1mA2l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emd6ac2bh8wwwz822fps.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0he1mA2l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emd6ac2bh8wwwz822fps.jpg" alt="Image description" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyzing the data
&lt;/h2&gt;

&lt;p&gt;Let's analyze the pre-processed data to get to understand it. Below is code for plotting Word Clouds for Positive and Negative tweets from the dataset and it will give a visual output of the words that occur most frequently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HhHV3tWi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwnaqv8eobhdj8cix6nf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HhHV3tWi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwnaqv8eobhdj8cix6nf.jpg" alt="Image description" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is the output of the word cloud for negative tweets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dz2ewhW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a3xic0qgblro52zamfvl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dz2ewhW0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a3xic0qgblro52zamfvl.jpg" alt="Image description" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Splitting the Data
&lt;/h2&gt;

&lt;p&gt;We shall split the pre-processed data into 2 sets :&lt;/p&gt;

&lt;p&gt;Training Data: The dataset on which the model would be trained will contain 95% of the data.&lt;/p&gt;

&lt;p&gt;Test Data: The dataset on which the model would be tested against will contain 95% of the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--32I4bM0c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vd0ypobv5nvqas7cmimw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--32I4bM0c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vd0ypobv5nvqas7cmimw.jpg" alt="Image description" width="800" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TF-IDF Vectoriser
&lt;/h2&gt;

&lt;p&gt;This is a tool that helps determine the significance of words while trying to comprehend a dataset. For example, if a dataset contains an essay about "My Car", the word "a" might appear frequently and have a higher frequency than other words such as "car", "engine", or "horse power". These words however, may carry very important information but have lower frequency as compared to words like "the" or "a".&lt;/p&gt;

&lt;p&gt;This is where the TF-IDF method comes into play, which assigns a weight to each word based on its relevance to the dataset.&lt;/p&gt;

&lt;p&gt;The TF-IDF Vectorizer transforms a set of unprocessed documents into a matrix of TF-IDF characteristics, and is typically trained only on the X_train dataset.&lt;/p&gt;

&lt;p&gt;As seen in the code below, X_train and X_test dataset have been transformed into matrix of TF-IDF Features by using the TF-IDF Vectoriser. These datasets will be used to train and test the model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VL4W2_Wf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90i25z4hk6mckq7wnqiv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VL4W2_Wf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90i25z4hk6mckq7wnqiv.jpg" alt="Image description" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating and Evaluating Models
&lt;/h2&gt;

&lt;p&gt;We will create 3 models for our sentiment analysis.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bernoulli Naive Bayes (BernoulliNB)&lt;/li&gt;
&lt;li&gt;Linear Support Vector Classification (LinearSVC)&lt;/li&gt;
&lt;li&gt;Logistic Regression (LR)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As seen in the very first output, our dataset is not skewed and therefore we choose accuracy as our evaluation metric. We are plotting the Confusion Matrix to get an understanding of how our model is performing on both classification types, either positive or negative as seen in the code below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ld3WFmO0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8mpuxr4goaw7pqqw6jr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ld3WFmO0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8mpuxr4goaw7pqqw6jr.jpg" alt="Image description" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MxqHGR4u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pzxdyfeuzcbb1izjs3a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MxqHGR4u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1pzxdyfeuzcbb1izjs3a.jpg" alt="Image description" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can now test to see if our model can classify the tweets correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MqDWhXqJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/078zfnm82xw670cwr0y3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MqDWhXqJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/078zfnm82xw670cwr0y3.jpg" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output should be as follows and our model works well as it can classify tweets as either positive or negative.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CF9N9PIP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8nl1wjjbi8zp7ijwpft.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CF9N9PIP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a8nl1wjjbi8zp7ijwpft.jpg" alt="Image description" width="800" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sentimentanalysis</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>data</category>
    </item>
    <item>
      <title>The Ultimate Guide to Exploratory Data Analysis</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Wed, 26 Apr 2023 03:00:00 +0000</pubDate>
      <link>https://dev.to/wainainapeter/the-ultimate-guide-to-exploratory-data-analysis-3oph</link>
      <guid>https://dev.to/wainainapeter/the-ultimate-guide-to-exploratory-data-analysis-3oph</guid>
      <description>&lt;p&gt;This is &lt;strong&gt;The ultimate guide&lt;/strong&gt; to exploratory Data Analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exploratory data analysis&lt;/strong&gt; (EDA) is an approach to analyzing and summarizing datasets to identify patterns, trends, and relationships. It is very important in the Data Science Life Cycle because it helps you to get a better understanding of your data, identify any issues or problems with the data, and formulate hypotheses for further analysis.&lt;/p&gt;

&lt;p&gt;The Data Science Life Cycle is an iterative set of data science steps you take to deliver a project or analysis and maintain any data science product.&lt;/p&gt;

&lt;p&gt;Below is a flow chart illustrating the Cycle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rlz8294h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yde91qqyucypdort46v4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rlz8294h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yde91qqyucypdort46v4.jpg" alt="flow chart illustrating the Data Science Life Cycle" width="340" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Exploratory Data Analysis is without a doubt one of the most important steps during the process of extracting insights out of data, even before the actual analysis or building of machine learning models begins. For businesses, companies or stakeholders to harness the ultimate power that data provides being the “new oil”, they have to focus on this phase of Exploratory Data Analysis. They, therefore, need to hire data professionals skilled in concepts of exploratory data analysis which include visualization, pattern recognition, creating maps and the like.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QiqZliDXCCg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;This article will give you a guideline on how to get these skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are some of the importance of Exploratory Data Science?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Exploratory Data Analysis helps us to clean the dataset that we are working with.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It provides a better understanding of the variables in our dataset and the relationships between them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It helps identify obvious errors and gives a better understanding of patterns present in the data and detects outliers or anomalous events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Exploratory Data Analysis helps to select the best algorithms for building a machine learning model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It answers questions about standard deviations, categorical variables, and confidence intervals within the data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once Exploratory Data Analysis is complete and insights are drawn, its features can then be used for more complex data analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  There are four primary types of Exploratory Data Analysis:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Univariate non-graphical&lt;/strong&gt;. It is the simplest form of data analysis, where the data being analyzed has a single variable. This means that in this case you won’t have to deal with causes or relationships in the data set.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Univariate graphical&lt;/strong&gt;. In this form, the non-graphical techniques do not present the data analyst with the complete picture of the data as it is in its raw form. Therefore, for comprehensive EDA, you have to implement graphical methods that include:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Stem-and-leaf plots, which show all data values and the shape of the distribution.&lt;/li&gt;
&lt;li&gt;Histograms are bar plots in which each bar represents the frequency (count) or proportion (count/total count) of cases for a range of values.&lt;/li&gt;
&lt;li&gt;Box plots, which graphically depict the five-number summary of minimum, first quartile, median, third quartile, and maximum.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multivariate nongraphical:&lt;/strong&gt; Multivariate data consists of more than one variable. Non-graphic multivariate Exploratory Data Analysis methods illustrate relationships between 2 or more data variables using statistics or cross-tabulation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multivariate graphical:&lt;/strong&gt; This technique makes use of graphics to show relationships between 2 or more datasets. The most used graphic is a grouped bar plot or bar chart with each group representing one level of one of the variables and each bar within a group representing the levels of the other variable. Some other widely-used multivariate graphics include bar charts, bar plots, heat maps, bubble charts, run charts, multivariate charts, and scatter plots.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/JG8GRlMjp3c"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now let’s have a look at the Exploratory Data Analysis Tools:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python:&lt;/strong&gt; An interpreted, object-oriented programming language with dynamic semantics. Its high-level, built-in data structures, combined with dynamic typing and dynamic binding, make it very attractive for rapid application development, as well as for use as a scripting or glue language to connect existing components. Python and EDA can be used together to identify missing values in a data set, which is important so you can decide how to handle missing values for machine learning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;R:&lt;/strong&gt; An open-source programming language and free software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing. The R language is widely used among statisticians in data science in developing statistical observations and data analysis.&lt;/p&gt;

&lt;p&gt;Kindly take note that both Python and R are equally good for Exploratory Data Analysis, but each has its unique advantages over the other and it will depend on you to choose the most adequate one for you.&lt;/p&gt;

&lt;p&gt;I use Python because of its ease of use and readability and code written in Python is easier to maintain and more robust than that written in R. Python also has very many rich libraries for Exploratory Data Analysis.&lt;/p&gt;

&lt;p&gt;R on the other hand as compared to python is better in both visualization and statistics, one can opt for R for Exploratory Data Analysis because Exploratory Data Analysis is mostly performed with visualization and a part of it is focused on statistics.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4lcwTGA7MZw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  These are the steps of Exploratory Data Analysis (EDA)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Data Collection.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Required data can be collected from various sources through methods like surveys, social media, customer reviews, focus groups or secondary data collection methods like already existing data in books and the like. Without collecting sufficient and relevant data, further activities in Exploratory Data Analysis cannot proceed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identifying the Variables in the dataset&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will involve identifying the important variables present in the dataset and which affect the outcome and their possible impact. This is a very crucial step for the final result expected from any data analysis.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Cleaning the Dataset.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A dataset may contain null values and irrelevant information which needs to be removed so that data contains only those values that are relevant to the target variable.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For missing values in a numerical column:&lt;/em&gt;&lt;br&gt;
Replace it with a constant value. This can be a good approach when used in discussion with the domain expert for the data we are dealing with.&lt;/p&gt;

&lt;p&gt;Replace it with the mean or median. This is a decent approach when the data size is small—but it does add bias.&lt;/p&gt;

&lt;p&gt;Replace it with values by using information from other columns.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Predicting Missing Values Using an Algorithm.&lt;/em&gt;&lt;br&gt;
Create a simple regression model, and if there are missing values in the input columns, we must handle those conditions when creating the predictive model. You can manage this by choosing only the features that do not have missing values or taking the rows that do not have missing values in any of the cells.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Missing Values in a Categorical Column.&lt;/em&gt;&lt;br&gt;
You can take care of this by replacing the missing value with a constant value or the most popular category. This is a good approach when the data size is small but it has the disadvantage of adding bias.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identifying the correlated Variables.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is achieved by visualization in form of a heatmap(correlogram) and finding a correlation between variables helps to know how a particular variable is related to another variable in the dataset. The correlation matrix method gives a clear picture of how different variables correlate and helps in understanding the relationship.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Choosing the Right Statistical Methods to employ.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Different statistical tools are used depending on the data, categorical or numerical, the size, the type of variables, and the purpose of analysis. Statistical formulae applied for numerical outputs give fair information, but graphical visuals are more appealing and easier for an observer to interpret. This should help when choosing the right statistical method.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Visualizing and Analyzing the Results&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After completing the analysis, the findings are to be visualized so that proper interpretation can be made for the sake of analysis. The trends in the spread of data and correlation between variables give good insights for making suitable changes in the data parameters. The results obtained will be appropriate to the data of the particular domain that you will be working on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Data is very important and it has to be analyzed to gain useful insights that will help in making data-informed decisions, which would otherwise not be possible while the data is still in its raw form. Exploratory Data Analysis goes deep into the data and gives us results that can be accurate and which are used to make important decisions.&lt;/p&gt;

&lt;p&gt;Overall, the goal of Exploratory Data Analysis is to gain a deep understanding of your data and to identify patterns that you can investigate further by so doing you can identify potential problems or biases, and develop hypotheses about what might be the cause of these patterns.&lt;/p&gt;

&lt;p&gt;This article gave a detailed guide on exploratory data analysis, its importance, the tools that are used and the steps taken while conducting it.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>exploratorydataanalysis</category>
      <category>dataanalysis</category>
    </item>
    <item>
      <title>Python 101: Introduction to Python for Data Science</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Tue, 25 Apr 2023 10:30:00 +0000</pubDate>
      <link>https://dev.to/wainainapeter/python-101-introduction-to-python-for-data-science-379p</link>
      <guid>https://dev.to/wainainapeter/python-101-introduction-to-python-for-data-science-379p</guid>
      <description>&lt;p&gt;Data is the new oil. Not literally, but this means that data is really valuable in this era that we are currently living in. Raw data in itself is not as valuable, but the information extracted from the raw data is very valuable. This extraction of valuable information is done using the discipline of data science.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Data Science&lt;/strong&gt;&lt;/em&gt; is the study of data to extract meaningful insights from it. IBM defined data science in this way:&lt;/p&gt;

&lt;p&gt;Data science combines math and statistics, specialized programming, advanced analytics, artificial intelligence (AI), and machine learning with specific subject matter expertise to uncover actionable insights hidden in an organization’s data. These insights can be used to guide decision making and strategic planning.&lt;/p&gt;

&lt;p&gt;One of the powerful tools that data scientists use is the python programming language, which you are going to get an overview of in this article. There are other tools and languages like R which is used to handle, store and analyze data and for doing data analysis and statistical modeling. In simple terms, R is an environment for statistical analysis. There is also SAS (Statistical Analytical System.) which is a tool for advanced analytics and complex statistical operations.&lt;/p&gt;

&lt;p&gt;The big question is: why python? Below are a few reasons why data scientists prefer python:&lt;/p&gt;

&lt;p&gt;Python has powerful mathematical and statistical tools for data analysis and exploration. This is one of the primary reasons that data scientists prefer to use Python.&lt;/p&gt;

&lt;p&gt;Data scientists prefer Python because of its ability to handle large data sets, and also incorporate machine learning and modeling because of its rich machine learning libraries.&lt;/p&gt;

&lt;p&gt;Python is easy to learn and use, due to its focus on simplicity and readability.&lt;/p&gt;

&lt;p&gt;Python Libraries for Data Analysis.&lt;/p&gt;

&lt;p&gt;The following are examples of the top 20 python libraries that are essential for data analysis and are you need to import them to work with them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NumPy&lt;/li&gt;
&lt;li&gt;Pandas&lt;/li&gt;
&lt;li&gt;Matplotlib&lt;/li&gt;
&lt;li&gt;SciKit-Learn&lt;/li&gt;
&lt;li&gt;TensorFlow&lt;/li&gt;
&lt;li&gt;SciPy&lt;/li&gt;
&lt;li&gt;Keras&lt;/li&gt;
&lt;li&gt;PyTorch&lt;/li&gt;
&lt;li&gt;Scrappy&lt;/li&gt;
&lt;li&gt;BeautifulSoup&lt;/li&gt;
&lt;li&gt;LightGBM&lt;/li&gt;
&lt;li&gt;ELI5&lt;/li&gt;
&lt;li&gt;Theano&lt;/li&gt;
&lt;li&gt;NuPIC&lt;/li&gt;
&lt;li&gt;Ramp&lt;/li&gt;
&lt;li&gt;Pipenv&lt;/li&gt;
&lt;li&gt;Bob&lt;/li&gt;
&lt;li&gt;PyBrain&lt;/li&gt;
&lt;li&gt;Caffe2&lt;/li&gt;
&lt;li&gt;Chainer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s have a look at the first four libraries as they are very important in beginning to learn about data analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Numpy
&lt;/h2&gt;

&lt;p&gt;NumPy is the most fundamental library for scientific computing with Python and is mostly used for finding solutions to matrix problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pandas
&lt;/h2&gt;

&lt;p&gt;Pandas is used for data manipulation and analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Matplotlib
&lt;/h2&gt;

&lt;p&gt;Matplotlib is a powerful library for Data Visualization using histograms, pie charts, and bar graphs.&lt;/p&gt;

&lt;h2&gt;
  
  
  SciKit-Learn
&lt;/h2&gt;

&lt;p&gt;SciKit-Learn is a library that focuses on building machine learning models and provides a range of supervised and unsupervised Machine Learning Algorithms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seaborn
&lt;/h2&gt;

&lt;p&gt;Seaborn is a data visualization library based on matplotlib and it provides a high-level interface for drawing attractive and informative statistical graphics.&lt;/p&gt;

&lt;p&gt;The above libraries can be imported as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cjuXAi4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkgra69h8c88g7vziubx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cjuXAi4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkgra69h8c88g7vziubx.jpg" alt="code for the imports" width="604" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Essential SQL commands that are a must know for a data scientist.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Tue, 25 Apr 2023 09:27:00 +0000</pubDate>
      <link>https://dev.to/wainainapeter/essential-sql-commands-that-are-a-must-know-for-a-data-scientist-oll</link>
      <guid>https://dev.to/wainainapeter/essential-sql-commands-that-are-a-must-know-for-a-data-scientist-oll</guid>
      <description>&lt;p&gt;SQL, which in full is &lt;strong&gt;Structured Query Language&lt;/strong&gt; is one of the most important tools that a data scientist should be well versed with.&lt;/p&gt;

&lt;p&gt;There are several variations of SQL and they include &lt;em&gt;PostgreSQL, MySQL, Microsoft SQL Server, and Standard SQL&lt;/em&gt;. Here are some of the benefits data scientists enjoy when they have a good knowledge of SQL:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Data retrieval and filtering: SQL gives data scientists the power to retrieve and filter data from databases using powerful query language features. This makes it easy to extract specific data that is needed for analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data manipulation: data scientists can manipulate data by creating tables, adding and modifying data in the tables and deleting data from the tables and even entire databases if need be. This is useful when preparing data for analysis and also when performing data cleaning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data aggregation and summary: SQL also provides powerful aggregation and summary functions that make it easy to calculate summary statistics like counts, averages, and sums. This is helpful to data scientists when they are analyzing large datasets and when performing exploratory data analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Joining data: Most of the time data will exist in multiple tables or data sources, and SQL allows data scientists to join these tables together to have a single view of the data. This is useful when analyzing data from multiple sources or when performing complex data analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration with other tools: Many data analysis tools like Power BI which is a visualization tool and programming languages like Python and R can interact with SQL databases and this is a plus for a data scientist.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As a summary of the above points, SQL is an important tool for data scientists because it provides a powerful and flexible way for them to work with large or small datasets. SQL helps you extract, manipulate, and analyze data more efficiently and effectively.&lt;/p&gt;

&lt;p&gt;You should be familiar with several SQL commands as a data scientist so that you can seamlessly work with datasets in SQL. Below are eight of the most important commands a data scientist should know and I have used PostgreSQL to visualize the first five of these commands to show how they are written:&lt;/p&gt;

&lt;p&gt;SELECT: To obtain data from a database, use this command. It enables you to define the columns you want to retrieve as well as any data filtering requirements.&lt;/p&gt;

&lt;p&gt;The command displayed below selects all values of the columns in the table called customer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_b71JdHQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6deechjtfnr4ccs6rpb9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_b71JdHQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6deechjtfnr4ccs6rpb9.jpg" alt="displayed below selects all values of the columns in the table called customer." width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WHERE: Using this command, the material can be filtered according to predetermined standards. The WHERE command, for instance, can be used to only return entries with a certain column value.&lt;/p&gt;

&lt;p&gt;The command displayed below will display the names of all customers whose age is below 20 years.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wt2G3lvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1uaabhfh6ypg9itfhz6u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wt2G3lvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1uaabhfh6ypg9itfhz6u.jpg" alt="displayed below will display the names of all customers whose age is below 20 years." width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BETWEEN: This command is used to obtain values in a certain specified range.&lt;/p&gt;

&lt;p&gt;The command below has displayed the name, city and postal code of customers who are between the age of 20 and 40 years.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yL-WHB82--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mr1iiwsoicbsxb4bwdkq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yL-WHB82--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mr1iiwsoicbsxb4bwdkq.jpg" alt="below has displayed the name, city and postal code of customers who are between the age of 20 and 40 years." width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LIMIT: This command is used to restrict how many entries a query returns. For instance, you could retrieve only the best 10 records using the LIMIT command.&lt;/p&gt;

&lt;p&gt;The command below is similar to the one in number (3) above but this time instead of displaying all values(rows), there is a limit of only displaying 10 values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zAlTt35n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wsj4vec4lb8sot7yp7cq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zAlTt35n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wsj4vec4lb8sot7yp7cq.jpg" alt="instead of displaying all values(rows), there is a limit of only displaying 10 values." width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ORDER BY: This command is used to order the information a query has produced. You have the option to select the column or columns by which you want to order the data, ascending or descending.&lt;/p&gt;

&lt;p&gt;The command below displays the name, age and postal code of customers who reside in the state of California in the order of their age.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fA3Hy_q6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ro9lmxupefigd04lwp2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fA3Hy_q6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ro9lmxupefigd04lwp2.jpg" alt="below displays the name, age and postal code of customers who reside in the state of California in the order of their age." width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JOIN: Using a common column, this command combines data from two or more databases. There are various JOIN kinds, such as CROSS JOIN, OUTER JOIN, and INNER JOIN.&lt;/p&gt;

&lt;p&gt;GROUP BY: This command is used to arrange data into groups according to a particular column or collection of columns. To determine aggregate data, such as the average or sum of a particular column, you could use the GROUP BY command.&lt;/p&gt;

&lt;p&gt;HAVING: To filter groups based on overall data, use this command in conjunction with the GROUP BY command. For instance, you could use the HAVING command to only return groups where a particular column's average number exceeds a predetermined threshold.&lt;/p&gt;

&lt;p&gt;These are just a few of the SQL commands that are commonly used by data scientists. Depending on your specific needs and the structure of your database, you may also need to use other commands, such as INSERT, UPDATE, and DELETE.&lt;/p&gt;

&lt;p&gt;This is just an overview of what SQL can do and many resources provide in-depth resources on the same. My recommendation would be a site like &lt;a href="https://www.w3schools.com/sql/"&gt;w3schools&lt;/a&gt; which has well-curated SQL resources. After learning here, you can go to &lt;a href="https://www.hackerrank.com/domains/sql"&gt;HackerRank&lt;/a&gt; and practice what you have learned with fun exercises.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>postgres</category>
      <category>database</category>
      <category>mysql</category>
    </item>
    <item>
      <title>7 Ways of looping through an array in JavaScript.</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Wed, 28 Dec 2022 13:49:10 +0000</pubDate>
      <link>https://dev.to/wainainapeter/7-ways-of-looping-through-an-array-in-javascript-17ep</link>
      <guid>https://dev.to/wainainapeter/7-ways-of-looping-through-an-array-in-javascript-17ep</guid>
      <description>&lt;p&gt;Simply put, an array is a collection of same data type items stored in contiguous(consecutive; following each other) memory locations.&lt;/p&gt;

&lt;p&gt;More often than not, arrays are used during programming for a couple of reasons: storing user information, storing some identification attributes, just to mention but a few.&lt;/p&gt;

&lt;p&gt;It becomes necessary at some point in time for a programmer to access this stored data and I have highlighted 7 ways in which one can easily do so using some JavaScript code snippets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using for loop.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qIfvxmoF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9f3jprq8oab0rt72dnjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qIfvxmoF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9f3jprq8oab0rt72dnjg.png" alt="Image description" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using while loop.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V0V05EMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgcdzft9erwx3wg7r8b3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V0V05EMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cgcdzft9erwx3wg7r8b3.png" alt="Image description" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using do...while loop.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FQj3MzI0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hh6gnsx0p9coiakhow4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FQj3MzI0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hh6gnsx0p9coiakhow4.png" alt="Image description" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using map() method.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rN-Nq22f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lx7rdsekhwzho5hfk0y7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rN-Nq22f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lx7rdsekhwzho5hfk0y7.png" alt="Image description" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using for...of.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jD8utQXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ir1tjamnwgzubmbjfnp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jD8utQXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ir1tjamnwgzubmbjfnp.png" alt="Image description" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using for...in.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cwg7YpOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xq7irqenb5rxr7qesps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cwg7YpOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xq7irqenb5rxr7qesps.png" alt="Image description" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;Looping through an array using forEach() method.&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sSniXEDg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys73ep9bkh7iobt1qcg2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sSniXEDg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys73ep9bkh7iobt1qcg2.png" alt="Image description" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope the article was helpful. Happy coding!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Setting up and configuring the TypeScript Compiler(simplified).</title>
      <dc:creator>Peter Wainaina </dc:creator>
      <pubDate>Sun, 25 Dec 2022 13:59:02 +0000</pubDate>
      <link>https://dev.to/wainainapeter/setting-up-and-configuring-the-typescript-compilersimplified-1ce6</link>
      <guid>https://dev.to/wainainapeter/setting-up-and-configuring-the-typescript-compilersimplified-1ce6</guid>
      <description>&lt;p&gt;Typescript is essentially JavaScript with type checking. Web browsers don't 'recognize' TypeScript and this makes it necessary that TypeScript code has to be compiled and translated into JavaScript, a process called &lt;em&gt;&lt;strong&gt;Transpilation.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Setting up the typescript Compiler.&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
This is simply done by creating a configuration file for the TypeScript compiler.&lt;br&gt;
On a terminal(in the same directory as the typescript project), type &lt;em&gt;tsc --init&lt;/em&gt; and voila, a file with the name tsconfig.json appears in your project folder.&lt;br&gt;
&lt;u&gt;&lt;strong&gt;Configuring the typescript Compiler.&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
The typeScript compiler has quite a number of lines of code, if so to speak. This may be a bit scary for a novice, like it was for my case but fear not! You do not necessarily need to know what each and everyone of them does, well at least not for now. If you are curious to know anyway,each of them has an explanation on the right as to what their functions are, preety handy if you ask me.&lt;br&gt;
There are a few changes that you need to make on the tsconfig.json file so that your typescript code will be compiled efficiently:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;in the /&lt;em&gt;Module&lt;/em&gt;/ section, uncomment rootDir (ctrl + /) and include the path "./src". This means you have to create a folder named src as indicated in the path and then transfer your TypeScript file into this folder. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---7fDROj9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4pux4h0en2z6qjio8fv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---7fDROj9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4pux4h0en2z6qjio8fv.png" alt="Image description" width="650" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In /&lt;em&gt;Emit&lt;/em&gt;/ section, uncomment outDir (this specifies the directory that will contain the JavaScript file)and write the path as "/.dist" (distributable folder) and this will be where our JavaScript files are going to be stored after being compiled using the typescript Compiler.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AYrl6iNy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj6tcdk2znl8k8ckl2td.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AYrl6iNy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj6tcdk2znl8k8ckl2td.png" alt="Image description" width="604" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Still in the /&lt;em&gt;Emit&lt;/em&gt;/ section, uncomment "removeComments" which is just below outDir and this will make the TypeSript compiler remove all the comments added in the TypeScript code, making the JavaScript code generated shorter.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JBGQu5ab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2axh5ut20w5arvj9ojf4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JBGQu5ab--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2axh5ut20w5arvj9ojf4.png" alt="Image description" width="680" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Still in the /&lt;em&gt;Emit&lt;/em&gt;/ section, uncomment "noEmitOnError" and this makes the typescript compiler not generate any JavaScript code if there is any error in the TypeScript code. This is very helpful as your compiled code will almost always be 'clean code'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FHjMApKw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktzsp2xzild4bskp7c6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FHjMApKw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktzsp2xzild4bskp7c6a.png" alt="Image description" width="664" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These few tweaks will get you started in writing and compiling your TypeScript code. I hope it will be of help, happy coding!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
