<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by daniel kakai on Medium]]></title>
        <description><![CDATA[Stories by daniel kakai on Medium]]></description>
        <link>https://medium.com/@daniel.kimassai?source=rss-371ce0091e4f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DYK8eDEYlAloJzADXrsTRA.jpeg</url>
            <title>Stories by daniel kakai on Medium</title>
            <link>https://medium.com/@daniel.kimassai?source=rss-371ce0091e4f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:38:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniel.kimassai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to Data Version Control]]></title>
            <link>https://medium.com/@daniel.kimassai/introduction-to-data-version-control-a2410be4b627?source=rss-371ce0091e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2410be4b627</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-version-control]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[daniel kakai]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 18:38:16 GMT</pubDate>
            <atom:updated>2023-09-09T10:49:28.401Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ge2QQ13zIC9xaOnnqEw_Vw.png" /></figure><p>Data science is a rapidly evolving field that has brought significant advancements to various industries. However, data science projects require a different approach to version control compared to software development projects. Data Version Control (DVC) is an open-source tool designed to meet the unique version control needs of data science teams.</p><p>In this article, we will introduce you to Data Version Control and its key features, benefits, and use cases.</p><h3>What is Data Version Control?</h3><p>Data Version Control (DVC) is a Git-like version control tool specifically designed for data science projects. It helps data science teams to version and manage data, models, and code in a reproducible manner. DVC works by tracking changes made to data files, model artifacts, and code and provides an interface to version them. DVC also integrates with Git, allowing data science teams to use Git to version code and DVC to version data and models.</p><h3>Key Features of Data Version Control</h3><p>The following are some of the key features of Data Version Control:</p><h3>1. Data versioning</h3><p>DVC tracks changes made to data files, allowing data science teams to version data just like code. This feature helps teams to keep track of changes made to data, which can be essential for reproducing results and debugging issues.</p><p>To version data files with DVC, you can use the dvc add command:</p><pre>$ dvc add data/train.csv</pre><p>This command will create a .dvc file in the project directory, which tracks the changes made to the data file.</p><h3>2. Model versioning</h3><p>DVC allows teams to version machine learning models and their artifacts. This feature enables teams to track changes made to models and their performance metrics, allowing for model reproducibility and performance comparison.</p><p>To version machine learning models and their artifacts, you can use the dvc run command:</p><pre>$ dvc run -d train.py -d data/train.csv -o model.pkl python train.py</pre><p>This command will run the train.py script using the train.csv data file and create a model.pkl artifact. DVC will track the changes made to the data, code, and model artifacts.</p><h3>3. Reproducibility</h3><p>DVC helps teams to ensure that their experiments and results are reproducible by tracking all the dependencies and parameters used in the experiment.</p><p>For example:</p><pre>$ dvc run -d train.py -d data/train.csv -p batch_size=32 -o model.pkl python train.py --batch-size ${batch_size}</pre><p>This command will run the train.py script using the train.csv data file and a batch size of 32. The batch_size parameter is tracked by DVC, ensuring that the experiment can be reproduced with the same parameters.</p><h3>4. Collaboration</h3><p>DVC allows teams to collaborate on data science projects by enabling multiple users to work on the same project simultaneously. DVC also provides an interface for sharing and syncing data and models between team members.</p><p>For example, to share a data file with a team member, you can use the dvc push command:</p><pre>$ dvc push data/train.csv</pre><p>This command will upload the train.csv data file to the remote storage service (e.g., Amazon S3) and make it available to other team members.</p><h3>5. Cloud support</h3><p>DVC supports popular cloud storage services like Amazon S3, Google Cloud Storage, and Microsoft Azure Blob Storage. This feature allows teams to store large datasets and models in the cloud, reducing the storage and maintenance costs.</p><p>To use DVC with a cloud storage service, you can configure the storage URL and credentials in the DVC configuration file:</p><pre>$ dvc remote add my_remote s3://my-bucket/path --access-key &lt;access_key&gt; --secret-key &lt;secret_key&gt;</pre><p>This command will add a remote storage service (e.g., Amazon S3) with the specified access and secret keys to the DVC configuration file. You can then use the my_remote remote to push and pull data and models to/from the cloud storage service.</p><p><strong>Official Documentation:</strong></p><p>For more information regarding DVC check the following docs:</p><p><a href="https://dvc.org/doc">https://dvc.org/doc</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2410be4b627" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with sentimental analysis]]></title>
            <link>https://medium.com/@daniel.kimassai/getting-started-with-sentimental-analysis-f0cbe5616ee5?source=rss-371ce0091e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0cbe5616ee5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[daniel kakai]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 12:14:30 GMT</pubDate>
            <atom:updated>2023-09-09T10:47:40.689Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QD-jWB66ob8sZXXbbB2bnw.png" /></figure><p>Sentiment analysis is the process of analysing text to determine the emotional tone, attitude, or sentiment expressed within it. In today’s data-driven world, sentiment analysis is becoming increasingly important, as it allows businesses to gain valuable insights into the opinions and attitudes of their customers. In this article, we’ll walk you through the process of getting started with sentiment analysis using Python.</p><p>Step 1: Install Required Libraries</p><p>Python has a number of libraries that make it easy to perform sentiment analysis. The two most popular libraries for this purpose are Natural Language Toolkit (NLTK) and TextBlob. To install these libraries, open your terminal or command prompt and type the following commands:</p><pre>pip install textblob</pre><p>Step 2: Perform Sentiment Analysis</p><p>Now that our data is preprocessed, we can perform sentiment analysis on it using TextBlob. TextBlob is a Python library that makes it easy to perform sentiment analysis on text. It uses a machine learning algorithm to classify text as positive, negative, or neutral.</p><pre>from textblob import TextBlob<br><br>def get_sentiment(text):<br>    blob = TextBlob(text)<br>    sentiment = blob.sentiment.polarity<br>    if sentiment &gt; 0:<br>        return &#39;positive&#39;<br>    elif sentiment &lt; 0:<br>        return &#39;negative&#39;<br>    else:<br>        return &#39;neutral&#39;</pre><pre>get_sentiment(&#39;hate&#39;)<br>#returns &#39;negative&#39;<br><br>get_sentiment(&#39;I love you&#39;)<br>#returns &#39;positive&#39;<br><br>get_sentiment(&#39;Eating&#39;)<br>#returns &#39;neutral&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0cbe5616ee5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential SQL Commands for Data Science]]></title>
            <link>https://medium.com/@daniel.kimassai/essential-sql-commands-for-data-science-695ce975b95f?source=rss-371ce0091e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/695ce975b95f</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[daniel kakai]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 18:20:25 GMT</pubDate>
            <atom:updated>2023-09-09T10:46:16.274Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGmCzvU-wUNI9Z2fcYeL3g.jpeg" /></figure><p>As a data scientist or data analyst, data is naturally at the heart of the job. There are many sources from which you might gather your data. Often the data lives in a SQL database, in which case an understanding of SQL query<strong> </strong>commands can be essential in order to perform this role successfully. This article will introduce you to some of the more basic commands, right up to more advanced operations that will serve you well when working as a data analyst or data scientist.</p><ol><li>SELECT</li></ol><p>SELECT is the most commonly used SQL command, and it is used to retrieve data from one or more tables. The basic syntax of the SELECT command is:</p><pre>SELECT column1, column2, ..., columnN<br>FROM table_name;</pre><p>This command selects all columns from the table, but you can also select specific columns by specifying their names. For example:</p><pre>SELECT first_name, last_name, email<br>FROM customers;</pre><p>This command will retrieve the first name, last name, and email of all customers from the customers table.</p><p>2. WHERE</p><p>The WHERE command is used to filter data based on specific conditions. The basic syntax of the WHERE command is:</p><pre>SELECT column1, column2, ..., columnN<br>FROM table_name<br>WHERE condition;</pre><p>For example, if you want to retrieve all customers who live in the United States, you can use the following command:</p><pre>SELECT first_name, last_name, email<br>FROM customers<br>WHERE country = &#39;United States&#39;;</pre><p>This command will retrieve the first name, last name, and email of all customers from the customers table who live in the United States.</p><p>3. ORDER BY</p><p>The ORDER BY command is used to sort the retrieved data in ascending or descending order. The basic syntax of the ORDER BY command is:</p><pre>SELECT column1, column2, ..., columnN<br>FROM table_name<br>ORDER BY column_name ASC/DESC;</pre><p>For example, if you want to retrieve all customers from the customers table and sort them by their last name in descending order, you can use the following command:</p><pre>SELECT first_name, last_name, email<br>FROM customers<br>ORDER BY last_name DESC;=</pre><p>This command will retrieve the first name, last name, and email of all customers from the customers table and sort them by their last name in descending order.</p><p>4. GROUP BY</p><p>The GROUP BY command is used to group data based on one or more columns. The basic syntax of the GROUP BY command is:</p><pre>SELECT column1, column2, ..., columnN, aggregate_function(column_name)<br>FROM table_name<br>GROUP BY column1, column2, ..., columnN;</pre><p>For example, if you want to retrieve the total number of orders for each customer from the orders table, you can use the following command:</p><pre>SELECT customer_id, COUNT(*) AS total_orders<br>FROM orders<br>GROUP BY customer_id;</pre><p>This command will retrieve the customer ID and the total number of orders for each customer from the orders table.</p><p>5. JOIN</p><p>The JOIN command is used to combine data from two or more tables based on a common column. The basic syntax of the JOIN command is:</p><pre>SELECT column1, column2, ..., columnN<br>FROM table1<br>JOIN table2<br>ON table1.column_name = table2.column_name;</pre><p>For example, if you want to retrieve the order details for each customer from the orders and customers tables, you can use the following command:</p><pre>SELECT customers.first_name, customers.last_name, orders.order_date, orders.total_amount<br>FROM customers<br>JOIN orders<br>ON customers.customer_id = orders.customer_id;</pre><p>This command will retrieve the first name, last name, order date, and total amount for each customer from the orders and customers tables.</p><p>In conclusion, SQL is a powerful tool for data scientists to extract and manipulate data from relational databases.</p><p>Check out the following article for full list of all SQL commands: <a href="https://www.dataquest.io/blog/sql-commands/">https://www.dataquest.io/blog/sql-commands/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=695ce975b95f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploratory Data Analysis Ultimate Guide]]></title>
            <link>https://medium.com/@daniel.kimassai/exploratory-data-analysis-ultimate-guide-59a035da1b7?source=rss-371ce0091e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/59a035da1b7</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[daniel kakai]]></dc:creator>
            <pubDate>Tue, 14 Mar 2023 19:25:22 GMT</pubDate>
            <atom:updated>2023-09-09T10:43:58.687Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sCzLFlvaKaovxHa-I_QXTw.jpeg" /></figure><p>Exploratory Data Analysis (EDA) is the first and foremost step in any data analysis process. It is a way of getting an overview of the data you are working with, and understanding its characteristics, patterns, and relationships. Python is one of the most popular programming languages for data analysis, and in this article, we will explore how to perform EDA using Python.</p><p><strong>Data Loading and Cleaning:</strong></p><p>The first step in EDA is to load the data into Python. Python provides several libraries for reading different types of data files such as CSV, Excel, and SQL databases. Once the data is loaded, the next step is to clean the data, which involves removing missing values, correcting errors, and removing duplicates.</p><p><strong>Data Visualization:</strong></p><p>Data visualization is an essential part of EDA as it helps in understanding the data by visualizing its patterns, relationships, and distributions. Python provides several visualization libraries, including Matplotlib, Seaborn, and Plotly, which can be used to create different types of visualizations such as scatter plots, histograms, box plots, and heat maps.</p><p><strong>Descriptive Statistics:</strong></p><p>Descriptive statistics is another important aspect of EDA as it provides a summary of the data, including measures of central tendency, variability, and skewness. Python provides several libraries for performing descriptive statistics, including NumPy and Pandas.</p><p><strong>Data Transformation:</strong></p><p>Data transformation involves converting the data into a suitable format for analysis. This may involve scaling the data, transforming the variables, or creating new variables. Python provides several libraries for data transformation, including Scikit-learn, which provides various preprocessing techniques such as scaling, normalization, and encoding.</p><p><strong>Correlation Analysis:</strong></p><p>Correlation analysis is a method of measuring the strength and direction of the relationship between two variables. Python provides several libraries for performing correlation analysis, including NumPy and Pandas. Correlation analysis can help in identifying the most significant variables for further analysis.</p><p><strong>Feature Selection:</strong></p><p>Feature selection is a method of selecting the most relevant features from a dataset. Python provides several libraries for feature selection, including Scikit-learn, which provides various techniques such as mutual information, recursive feature elimination, and principal component analysis.</p><p><strong>Example code using Python:</strong></p><pre># Importing necessary libraries<br>import pandas as pd<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import seaborn as sns<br><br># Loading the dataset<br>df = pd.read_csv(&#39;dataset.csv&#39;)<br><br># Checking for missing values<br>print(df.isnull().sum())<br><br># Removing duplicates<br>df.drop_duplicates(inplace=True)<br><br># Visualizing data<br>sns.pairplot(df)<br>plt.show()<br><br># Descriptive statistics<br>print(df.describe())<br><br># Data transformation<br>df[&#39;new_variable&#39;] = df[&#39;variable_1&#39;] + df[&#39;variable_2&#39;]<br>df[&#39;scaled_variable&#39;] = (df[&#39;variable_3&#39;] - df[&#39;variable_3&#39;].mean()) / df[&#39;variable_3&#39;].std()<br><br># Correlation analysis<br>correlation_matrix = df.corr()<br>sns.heatmap(correlation_matrix, annot=True)<br>plt.show()<br><br># Feature selection<br>X = df.drop(&#39;target_variable&#39;, axis=1)<br>y = df[&#39;target_variable&#39;]<br><br>from sklearn.feature_selection import mutual_info_classif<br>scores = mutual_info_classif(X, y)<br>feature_scores = pd.Series(scores, index=X.columns)<br>selected_features = feature_scores.nlargest(5).index<br><br>print(selected_features)</pre><p><strong>Conclusion:</strong></p><p>EDA is an essential step in any data analysis process, and Python provides several libraries for performing EDA. In this article, we explored the different steps involved in EDA, including data loading and cleaning, data visualization, descriptive statistics, data transformation, correlation analysis, and feature selection. By following these steps, we can gain a better understanding of the data we are working with and make more informed decisions in our analysis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59a035da1b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Python for Data Science: Exploratory data analysis using Python]]></title>
            <link>https://medium.com/@daniel.kimassai/explanatory-data-analysis-using-python-7663587cd4bd?source=rss-371ce0091e4f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7663587cd4bd</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[daniel kakai]]></dc:creator>
            <pubDate>Mon, 13 Feb 2023 21:33:58 GMT</pubDate>
            <atom:updated>2023-02-17T10:27:37.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6bq5dOXUSCzhfcrE.jpg" /></figure><p>Imagine you have been given a data set that you know nothing about yet you need to work with it. The initial approach is to do an exploratory data analysis to give you some guidance.</p><p><strong>What is exploratory data analysis ?</strong></p><p>Exploratory data analysis (EDA) is used by data scientists to analyse and investigate data sets and summarise their main characteristics, often employing data visualisation methods.</p><p><strong>Exploratory data analysis using Python Pandas package</strong></p><ol><li>Install pandas</li></ol><p>Assuming you have Python already installed on your device, install Pandas using Pip or any package manager of your choice.</p><pre>pip install pandas</pre><p>2. Download sample data set</p><p>Download sample data set from the following link: <a href="https://github.com/DANIELKAKAI/data-engineer-lux-academy/blob/master/archive/IT-Salary-Survey-EU-2020.csv">https://github.com/DANIELKAKAI/data-engineer-lux-academy/blob/master/archive/IT-Salary-Survey-EU-2020.csv</a></p><p>Note: You can use any CSV format data set for this example.</p><p>3. The code</p><p>I recommend use of Jupyter notebook to run the following code for better visualisation.</p><pre>import pandas as pd<br><br># read csv and show some records<br>df = pd.read_csv(&#39;IT-Salary-Survey-EU-2020.csv&#39;,sep=&quot;,&quot;)<br>df.head()<br><br># check column values<br>df.columns.values <br><br># show number of rows and columns <br>df.shape<br><br># check column data types and whether they&#39;re nullable or not<br>df.info()<br><br># summary statistics i.e count, mean, standard deviation, minimum and maximum values and the quantiles of the data.<br>df.describe()</pre><p>You can find my Jupyter notebook here : <a href="https://github.com/DANIELKAKAI/data-engineer-lux-academy/blob/master/Explanatory%20data%20analysis.ipynb">https://github.com/DANIELKAKAI/data-engineer-lux-academy/blob/master/Explanatory%20data%20analysis.ipynb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7663587cd4bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>