<?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: Samuel Mwaura Ndungu</title>
    <description>The latest articles on DEV Community by Samuel Mwaura Ndungu (@samuelmwaurandungu).</description>
    <link>https://dev.to/samuelmwaurandungu</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4071845%2F613cfa3f-32a0-4a5d-8e6d-9bd33073ce16.jpg</url>
      <title>DEV Community: Samuel Mwaura Ndungu</title>
      <link>https://dev.to/samuelmwaurandungu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samuelmwaurandungu"/>
    <language>en</language>
    <item>
      <title>Power BI Data Modelling, Relationships and Joins: A Practical Guide to Building Effective BI Models</title>
      <dc:creator>Samuel Mwaura Ndungu</dc:creator>
      <pubDate>Sun, 27 Sep 2026 21:18:17 +0000</pubDate>
      <link>https://dev.to/samuelmwaurandungu/power-bi-data-modelling-relationships-and-joins-a-practical-guide-to-building-effective-bi-models-5g9</link>
      <guid>https://dev.to/samuelmwaurandungu/power-bi-data-modelling-relationships-and-joins-a-practical-guide-to-building-effective-bi-models-5g9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Businesses and organisations collect large volumes of data in their day to day operations. Many a times, these data in itself does not answer management questions or rather help in decision making. It is therefore important for the data to be analyzed.&lt;br&gt;
The data collected is analysed, cleaned, structured, connected and thereafter analysis made from the data.&lt;br&gt;
Powerbi is a microsoft office software solutions that allows data analyst to transform data into interactive dashboard and reports and behind the interactive dashboard is a well thought out data model that determine how tables interact.&lt;br&gt;
Consider an institution like an hospital that stores patient data, doctors data, sickness data, visits data, ward data, lab data, pharmacist data etc. Data from various departments will be stored in tables/spreadsheets. It therefore becomes imperative for one to align/model the tables in a way they can interact with each other so as to answer business questions in a seamless manner. For this to be possible, one would need to understand data modeling, relationships and joins.&lt;br&gt;
Data Modeling is the Process of organising your table and defining relationship between your tables so that tables can work together effectively within Powerbi. A well thought out model helps Powerbi understand how the tables are related.&lt;br&gt;
There are two distinct concept when building up a model. These are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relationships - connects tables in Powerbi&lt;/li&gt;
&lt;li&gt;Joins - Is performed in power query during the data preparation stage where columns from two different tables can be combined to a query.
This article will delve into principles behind Powerbi modeling, discuss concepts such as fact table, dimension table, star schemas, snowflake schemas, cardinality, Primary Key and Foreign Key among others.
I will use a practical example of Hospital records in this article so that I can be able to demonstrate the concepts clearly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding Data Modelling in Power Bi
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Data Modelling&lt;/strong&gt;&lt;br&gt;
Data Modelling is the process of organising your table and defining relationship between your tables so that you may use Power Bi to summarise/use your data correctly. &lt;br&gt;
A Power Bi Model will contain several tables containing different aspects of business records. For a example, an institution like a hospital may have records of patients in one table, doctors records in another table, another table containing sickness records, another table containing Lab records, another with Pharmacy records, another with Finance records etc. Data modelling will thus eatblish a relation how this records/tables will interact to form meaningful data presentation.&lt;br&gt;
A Power Bi model will likely to contain a fact table connected to several dimensional tables.&lt;br&gt;
Its important therefore to clearly understand the differences between a fact table and a dimensional table.&lt;br&gt;
Facts table - is the table that holds specific events/transactions that you are looking forward to making analysis. It is characterised with the following features. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It contains numerical records or events&lt;/li&gt;
&lt;li&gt;Holds data metrics&lt;/li&gt;
&lt;li&gt;Holds data in quantities&lt;/li&gt;
&lt;li&gt;Helps to get a grain about the data. Grain refers to a description of what each record in a table consists of.&lt;/li&gt;
&lt;li&gt;Contains primary keys and foreign keys &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dimension table - A table that gives a description of specific events held in the fact table. It is characterised with the following features;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They have descriptive contents&lt;/li&gt;
&lt;li&gt;Mainly you will see texts that describe events&lt;/li&gt;
&lt;li&gt;Every dimensional table has a primary key &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model will basically look as follows;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu065xwr8vni256sxrrlv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu065xwr8vni256sxrrlv.png" alt=" " width="800" height="599"&gt;&lt;/a&gt;&lt;br&gt;
Above is an example of a star schema.&lt;/p&gt;

&lt;p&gt;The model may also be presented in the following manner as a snowflake schema.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwfcyuqcl93rxf24z30c0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwfcyuqcl93rxf24z30c0.png" alt=" " width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main difference is that a star schema has one fact table surrounded by dimensional tables while snow flake schema is like a star schema, however, the dimensional tables have been broken down to smaller tables.&lt;/p&gt;

&lt;p&gt;The fact table and dimensional table will be developed from the flat table. A flat table is one table containing all information and you will find a lot of duplication. &lt;/p&gt;

&lt;p&gt;The advantages of a star schema are; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to understand&lt;/li&gt;
&lt;li&gt;Simple DAX calculations&lt;/li&gt;
&lt;li&gt;Less data repetition&lt;/li&gt;
&lt;li&gt;Easy reporting&lt;/li&gt;
&lt;li&gt;Easy to maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Disadvantages are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It may necessitate one to have many tables&lt;/li&gt;
&lt;li&gt;It requires relationship as wrong keys or table may result in misleading results&lt;/li&gt;
&lt;li&gt;Some repetition may still remain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Star schema is frequently applicable in the following cases;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When the data contains clear business figures and descriptive values&lt;/li&gt;
&lt;li&gt;Where users need to evaluate the same figures from different scenarios.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The advantage of Snow Flake Schema is as follows&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It reduces redundancies&lt;/li&gt;
&lt;li&gt;Shared information can be stores at a glance&lt;/li&gt;
&lt;li&gt;Useful for complex structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The disadvantages are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Potentially more complex DAX calculations&lt;/li&gt;
&lt;li&gt;There may be need to have many relationships to manage&lt;/li&gt;
&lt;li&gt;May make the model complex rather than simplyfying it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Snow flake schema is applicable in the following scenarios;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complex or highly structured dimensions&lt;/li&gt;
&lt;li&gt;Business with high level of hierachy&lt;/li&gt;
&lt;li&gt;When you have different entities that need to be handled independently&lt;/li&gt;
&lt;li&gt;Where reducing duplication is very important.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NB - Grain referes to level of information represented by each row in a fact table. It will answer the question what does each row in the fact table represent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relatiosnhip in Power Bi
&lt;/h2&gt;

&lt;p&gt;Relationship refers to relationship between two tables therefore making it possible for Power Bi to analyse two tables without having to combine them. It is very important especially where data are stored in fact table and several dimensional table.&lt;br&gt;
The relatiosnhip is established by matching the foreign key in the facts table to the primary key in the dimensional table.&lt;br&gt;
A primary key is a column that uniquely identifies each record in a table while a foreign key is a column in another table that refers to a primary key in another table usually in a dimensional table. Therefore we establish relationships by matching primary key on the dimensional table to the foreign key in the facts table. &lt;/p&gt;

&lt;h3&gt;
  
  
  Relationship cardinality
&lt;/h3&gt;

&lt;p&gt;Refers to how data in one table relates to data in another based on the numerical count of matching rows. &lt;br&gt;
The types of cardinality are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relationship cardinaility&lt;/li&gt;
&lt;li&gt;Column cardinality&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Relationship cardinality
&lt;/h4&gt;

&lt;p&gt;These shows how tables are connected.&lt;br&gt;&lt;br&gt;
In Power Bi, the main relationship cardinality are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;One to Many cardinality - one row matching to many rows in another table. This is the most common type of cardinality and most applicable in a star schema. Mainly used when one record in a dimensional table is associated with many records in the fact table. For example one doctor in dim table can attend to many patients in the fact table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Many to One cardinality - Many rows in a table matching one unique row in another table.&lt;br&gt;
A good example in our case is when many visits can occur in one ward.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One to One - A row in a table that can only match/link to one row in another table.&lt;br&gt;
For example Patient dim to Patient details dim. One patient has one patient records and one patient records belongs to one patient and therefore the relationship is one to one. It is applicable when each record in one table corresponds exactly to another table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Many to many - Multiple rows that can link into multiple rows in another table. This is when many items in one table can be associated with other many items in another table. For example one patient can have various diagnosis and at the same time various one diagnosis can relate to many patients.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0no1b93f3mdavpth8706.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0no1b93f3mdavpth8706.png" alt=" " width="800" height="638"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Column cardinality
&lt;/h4&gt;

&lt;p&gt;Show the uniqueness of data inside a single column.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb2darm9y68o95u42vpf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb2darm9y68o95u42vpf8.png" alt=" " width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Filtering
&lt;/h3&gt;

&lt;p&gt;This determines how filtering travels between two relatable tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Joins
&lt;/h2&gt;

&lt;p&gt;Joins allows one to combine two tables using matching columns. In the current case of hospital records, joins allows us to join patients visits records with doctors dim, ward dim etc&lt;/p&gt;

&lt;p&gt;The type of joins are; &lt;br&gt;
Types of Joins&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inner Join - Used when you want to retain records that match (keeps only the records that match on both tables)&lt;/li&gt;
&lt;li&gt;Left outer join - Used when used want to retain/keep all rows from the left cable (first table) and matching rows from the second table&lt;/li&gt;
&lt;li&gt;Right outer join - Used when you want to keep all the rows from the second table and the matching rows from the first table.&lt;/li&gt;
&lt;li&gt;Full outer join - used when you want to keep all the rows from all the tables whether they match or not&lt;/li&gt;
&lt;li&gt;Left Anti join - used when you want to keep only the rows in the first table that have no match in the second table&lt;/li&gt;
&lt;li&gt;Right Anti join - used when you want to keep only the rows from the second table that have no match in the first table.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0pux0g14nv2ek48bret.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0pux0g14nv2ek48bret.png" alt=" " width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Behind every dash board sits a well outlined data model with well structured fact and dimensional table whose relationship have been clearly set. The primary keys and foreign keys relate well across the table. At the centre we have patient visits facts table surrounded by dimensional tables such as Doctors_dim, ward_dim, department_dim, Procedure_dim, Diagnsosis_dim and thus forming a star schema. Having a clear understanding of fact table, dimensional table, primary keys, foreign keys, grain, relationship, cardinality, filter directions and joins helps one to develop a good model.  &lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>database</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Getting Started with Excel for Data Analytics: From Basics to Data Cleaning</title>
      <dc:creator>Samuel Mwaura Ndungu</dc:creator>
      <pubDate>Tue, 01 Sep 2026 13:06:44 +0000</pubDate>
      <link>https://dev.to/samuelmwaurandungu/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-2f90</link>
      <guid>https://dev.to/samuelmwaurandungu/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-2f90</guid>
      <description>&lt;h2&gt;
  
  
  What is Excel
&lt;/h2&gt;

&lt;p&gt;Excel uses columns and rows to store data. The data is entered in cells by way of texts, numbers or formulas. Excel allows one to store data, correct/clean data and also transform the same data to useful information and present the same by way of charts and graphs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overview of Excel
&lt;/h3&gt;

&lt;p&gt;Excel is arranged around a ribbon. The ribbon contains toolbar section which is found at the top of the window. The ribbon contains the following tabs where each tab has further array of commands; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Home&lt;/li&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;li&gt;Page Layout&lt;/li&gt;
&lt;li&gt;Formulas &lt;/li&gt;
&lt;li&gt;Data &lt;/li&gt;
&lt;li&gt;Review &lt;/li&gt;
&lt;li&gt;View&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcgrqgw0lf7kwocycszr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcgrqgw0lf7kwocycszr6.png" alt=" " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Excel Navigation
&lt;/h3&gt;

&lt;p&gt;Now lets understand how to move around excel.&lt;br&gt;
Excel is structured as a workbook. It is the entire excel file. In the workbook, you will find worksheet. The worksheet is a single sheet within the workbook &lt;em&gt;take it as a page within a book&lt;/em&gt;. The sheets are accessible at the bottom of excel. In each sheet, the data is arranged in columns and rows. The columns are named alphabetically from A,B, C, D, and so on. The rows are titled by numbers from 1,2,3 and so on. Where the column and row meet, they form a small box which we refer to as the cell, and therefore each cell will have an address of its column and the row position.&lt;br&gt;
The cell address will be displayed just below the ribbon and next to the cell address you will find the formula bar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvsj3mph8y4ezjuj2tsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvsj3mph8y4ezjuj2tsd.png" alt=" " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Entering data and formatting data
&lt;/h3&gt;

&lt;p&gt;To work on the excel work sheet, one simply needs to click on a particular cell and input data. Data can be numbers or texts. Excel is able to clearly understand the type of data being given. At a glance, you will notice that texts are usually aligned on the left while numbers are aligned on the right. &lt;br&gt;
Formatting data refers to altering the way data appears to make it easier to understand and analyse. Formatting of data is usually done from the Home tab on the ribbon section. &lt;br&gt;
As a general rule, its very important to enter data correctly and format the same appropriately because it will ease excel interprets information and analyse.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Femvgausip5n4rp1vrzuc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Femvgausip5n4rp1vrzuc.jpg" alt=" " width="800" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Cleaning
&lt;/h3&gt;

&lt;p&gt;Once the data is entered and formatted, the next important step is to clean your data before you can process and analyse it. Just as the name suggests, data cleaning is correcting anomalies in your data so that your records are consistent and accurate. Some of the functions to clean data are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identifying duplicates and deleting them&lt;/li&gt;
&lt;li&gt;Identifying blank cells and providing them with relevant values&lt;/li&gt;
&lt;li&gt;Trim data to identify dashes&lt;/li&gt;
&lt;li&gt;Replace (Ctrl+H)&lt;/li&gt;
&lt;li&gt;Upper and Lower functions to standardise tests&lt;/li&gt;
&lt;li&gt;Check length of texts using (LEN). Its useful for spotting inconsistencies. &lt;/li&gt;
&lt;li&gt;Sort&lt;/li&gt;
&lt;li&gt;Filter&lt;/li&gt;
&lt;li&gt;Capitalise first letter of your data using (PROPER) function&lt;/li&gt;
&lt;li&gt;Join texts from different cells using (CONCAT) function&lt;/li&gt;
&lt;li&gt;Extract characters from the start of a cell using (LEFT) function&lt;/li&gt;
&lt;li&gt;Extract characters from end of a cell using (RIGHT) function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8tdkha9fsoc3tu6xxq8d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8tdkha9fsoc3tu6xxq8d.jpg" alt=" " width="799" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Based on above knowledge, I am able to manoeuvre through excel, input data and check correctness of my data. This will come in handy when am working on my data to come up with accurate presentation of the data. &lt;br&gt;
For those interested in learning more about excel, the following youtube video provides additional resource.&lt;br&gt;
&lt;a href="https://youtu.be/0tdlR1rBwkM?list=PLmHVyfmcRKyx1KSoobwukzf1Nf-Y97Rw0" rel="noopener noreferrer"&gt;https://youtu.be/0tdlR1rBwkM?list=PLmHVyfmcRKyx1KSoobwukzf1Nf-Y97Rw0&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My First GitHub Project: From a Local Folder To GitHub Using Git and SSH</title>
      <dc:creator>Samuel Mwaura Ndungu</dc:creator>
      <pubDate>Sun, 23 Aug 2026 06:59:23 +0000</pubDate>
      <link>https://dev.to/samuelmwaurandungu/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-1dh6</link>
      <guid>https://dev.to/samuelmwaurandungu/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-1dh6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Data is captured in almost every aspects of our lives and it is recorded somewhere. It is important to analyse this data and transform the same to useful information which will be used for decision making. For this reason, I have realized it is important to have the right knowledge and tools to transform data into useful information and also present the same in a manner decision makers can understand. &lt;br&gt;
This article will explain step by step my first git hub project by creating a local folder, transferring the same to Github and sharing the same. The tools i will employ in my work include Git, Gitbash/template, Github among others.&lt;br&gt;
Git helps me track changes made in projects while Github helps one to share the project online.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Git
&lt;/h3&gt;

&lt;p&gt;Its very important to understand what is git and its importance in coming up with my project.&lt;br&gt;
Git will be able to help me track changes i make in my process of coming up with the project. It will clearly show me what i did and at what particular stage of my processes. This will be able to help me correct or make better the various version i have in my project. It keeps a history of all the changes i will have made in the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Github
&lt;/h3&gt;

&lt;p&gt;Just as the name suggest, Git and Github seems to be relates but they entirely do different functions in my project. Github is an online platform that allows one to store projects and share the same online. It allows one to have a public option and a private option when it comes to storing and sharing your project. &lt;br&gt;
For example; when I am working on my project in my computer, I will be able to push it to my Github account and from there, I can be able to work on it and also share with others.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Creating a Local Folder
&lt;/h4&gt;

&lt;p&gt;Here I will clearly explain the tools I will employ to create and access my local project folder. &lt;br&gt;
Below are some important codes I will use to create and access folders;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mkdir&lt;/code&gt; This will make directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd&lt;/code&gt; This means change directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cd ..&lt;/code&gt; This takes you back to previous directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls&lt;/code&gt; This lists down whats in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm&lt;/code&gt; This deletes document in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm -r&lt;/code&gt; This deletes the folder in the directory&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;touch&lt;/code&gt; This creates a document&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my computer, i will create a local folder using the command &lt;code&gt;mkdir my-first-github-project&lt;/code&gt;&lt;br&gt;
NB: We are using  hyphen when naming our folder to avoid spaces in between names and make the item easier to read and also follows common project naming convention. Though even without the hyphens the folder will still work.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Creating Folder and a README Document in my Local Folder
&lt;/h4&gt;

&lt;p&gt;The next step is to create a folder with the title date and also create a &lt;strong&gt;README&lt;/strong&gt; document.&lt;br&gt;
Why is it important to create a data file seperately from a &lt;strong&gt;README&lt;/strong&gt; document?&lt;br&gt;
It makes your project organized. Instead of puting everything in one folder, its important to seperate things according to their purpose.&lt;br&gt;
The Data file is used to store the actual data files while &lt;strong&gt;README&lt;/strong&gt; document is a well detailed explanation and manual instruction of your project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You will use the command &lt;code&gt;mkdir data&lt;/code&gt; to create a new folder called data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use command &lt;code&gt;ls&lt;/code&gt; to list whats is inside my-first-github-project. &lt;br&gt;
Since you have created a folder by the name &lt;strong&gt;data&lt;/strong&gt;, you will only see the folder when you list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use the command &lt;code&gt;touch README.md&lt;/code&gt; to create a &lt;strong&gt;REAMDE&lt;/strong&gt; document. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then use command &lt;code&gt;ls&lt;/code&gt; to list whats inside my-first-github-project folder. Now you will be able to see that you have the folder by the name &lt;strong&gt;data&lt;/strong&gt; and a &lt;strong&gt;README&lt;/strong&gt; document.&lt;br&gt;
NB. Its important to name your &lt;strong&gt;README.md&lt;/strong&gt; document with capital letters. This is a widely acceptable and conventional way of naming a &lt;strong&gt;README&lt;/strong&gt; file. It makes the file easily recognizable and Github recognizes it automatically.&lt;br&gt;
The extension &lt;strong&gt;md&lt;/strong&gt; in your &lt;strong&gt;REAMDE.md&lt;/strong&gt; file means that it uses Markdown language.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Adding content in your &lt;strong&gt;README.md&lt;/strong&gt; file
&lt;/h4&gt;

&lt;p&gt;Its important to clearly explain or give instruction for your project. This will be clearly documented in your &lt;strong&gt;README.md&lt;/strong&gt; file.&lt;br&gt;
This can be done using VS Code or Terminal/Gitbash.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using bash or terminal, access the folder &lt;code&gt;cd My-first-github-project&lt;/code&gt;
To write content in your README.md file, we shall use the command &lt;code&gt;echo "My-first-Github-Project" &amp;gt;README.md&lt;/code&gt;
To check what you wrote, use the command &lt;code&gt;cat README.md&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We can also use &lt;strong&gt;Nano&lt;/strong&gt; to simplify our writing task. We shall run the command &lt;code&gt;nano README.md&lt;/code&gt;. A text editor will appear wherein we shall type our content.&lt;br&gt;
To Save our content, we shall press &lt;strong&gt;Control + O&lt;/strong&gt; to save, Press &lt;strong&gt;Enter&lt;/strong&gt; Key to confirm the file, then press &lt;strong&gt;Control + X&lt;/strong&gt; to exit.&lt;br&gt;
NB: To check what you have written, use the command &lt;code&gt;cat README.md&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Create a Git Repository
&lt;/h4&gt;

&lt;p&gt;We need to convert the ordinary file we are working in to a Git Project. We shall use the coomand &lt;code&gt;git init&lt;/code&gt;. This creates a hidden &lt;strong&gt;.Git&lt;/strong&gt; directory which contains information that our Git uses to track the developments.&lt;br&gt;
After running &lt;code&gt;git init&lt;/code&gt; command, our folder becomes a Git Repository.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Copying the Document With the Data to our &lt;strong&gt;Data folder&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Since we need to work on some data, we shall transfer the data to our &lt;strong&gt;Data Folder&lt;/strong&gt;.&lt;br&gt;
Assume we have downloaded an excel from internet and thus is lying in our local machine download folder, I shall copy the document from the Downloads file and copy to my data file.&lt;br&gt;
Alternatively, I can use the following command to copy the document to my data folder.&lt;br&gt;
&lt;code&gt;cp ~/Downloads/Kenyan-Health-Records-Analysis-File.xlx data/&lt;/code&gt;. Assume that the file was an excel file having the name Kenyan-Health-Records-Analysis.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Check the Status of the File
&lt;/h4&gt;

&lt;p&gt;It is important to check the status of the file. You will run &lt;code&gt;Git status&lt;/code&gt; to check the status of the file. &lt;br&gt;
You will be able to see that Git has found the project file but is not tracking them.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Allow Git to Track the File
&lt;/h4&gt;

&lt;p&gt;The next action is to let Git to track the file. This is possible by running the command &lt;code&gt;Git add .&lt;/code&gt;&lt;br&gt;
This means that Git will start tracking everything in the folder.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Commit Your Work
&lt;/h4&gt;

&lt;p&gt;This creates a saved version of your project. Its a very important step of the project as it saves the version of the project and can allow one to track changes made in the project.&lt;br&gt;
The command used to commit your work is &lt;code&gt;git commit -m "Version 1 Add Kenyan Health records"&lt;/code&gt;&lt;br&gt;
NB The wordings &lt;em&gt;&lt;strong&gt;Version 1 Add Kenyan Health Records&lt;/strong&gt;&lt;/em&gt; is tailored to your own understanding to help you know what exactly u saved at that particular stage. You can message anything provided it will help you understand what you did at that particular stage.&lt;/p&gt;

&lt;h4&gt;
  
  
  9. Connecting to Github
&lt;/h4&gt;

&lt;p&gt;Now that we have saved our project, we now connect to Github. &lt;br&gt;
Its important to run comman &lt;code&gt;Git status&lt;/code&gt; to confirm everything is clean. You will get a message &lt;strong&gt;&lt;em&gt;nothing to commit, working tree clean&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
After confirming everything is okay&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to Your Github Account&lt;/li&gt;
&lt;li&gt;Create a repository&lt;/li&gt;
&lt;li&gt;Give the repository a name&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  10. Creating an SSH key
&lt;/h4&gt;

&lt;p&gt;An SSH key is important as it gives your computer as safer way to connect to your Github account without the need to inputting password everytime when you need to work on your project.&lt;br&gt;
I can check in my computer whether there it has an existing SSH Key. I will use the following command to check &lt;code&gt;ls -al ~/.ssh&lt;/code&gt;. If you see in your computer file such as &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;id_ed25519&lt;/li&gt;
&lt;li&gt;id_ed25519.pub
It means your computer already has a key. 
But in cases where you dont have a key, You will be required to create one. I will describe in details what is required when generating an SSH Key.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Generating an SSH Key
Open your Git bash/terminal and key in the following command &lt;code&gt;ssh-keygen -t ed25519 -C "your-email@example.com"&lt;/code&gt;
Put your email and replace with the wordings &lt;a href="mailto:your-email@example.com"&gt;your-email@example.com&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Enter the File in which you want to save the key&lt;/li&gt;
&lt;li&gt;Copy your public Key&lt;/li&gt;
&lt;li&gt;Add the public key in Github&lt;/li&gt;
&lt;li&gt;Under Key, paste the Public key you just created&lt;/li&gt;
&lt;li&gt;Add the SSH Key&lt;/li&gt;
&lt;li&gt;Test the connection&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  11. Connecting Your Local Project to Github
&lt;/h4&gt;

&lt;p&gt;After successfully creating my Github repository and setting up SSH key, I will now tey connect my local Project to Github.&lt;br&gt;
I will run the following command &lt;code&gt;git remote add origin git@github.com:YOUR-USERNAME/kenya-hospital-records-analysis.git&lt;/code&gt;&lt;br&gt;
NB: Replace your **YOUR-USERNAME with your user name appearing in Github.&lt;br&gt;
Use the command 'git remote -v' to check the connection.&lt;/p&gt;

&lt;p&gt;Once you confirm the connection was successful, I will now push my project to Github. &lt;br&gt;
Use the command &lt;code&gt;git push -u origin main&lt;/code&gt;. &lt;br&gt;
Afterwards, refresh the page in github and you will be able to see your project.&lt;/p&gt;

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

&lt;p&gt;The entire process has helped me understand the tools used and commands to adopt in order to push my project from a local folder to Github using SSH. The process might be lengthy at first but when you clearly understand the reason and importance of the codes being used, the process becomes clear well organized. There are sections your Gitbash/Terminal will give you errors and when you successfully correct the errors, you learn why the system behaved in such a manner and it becomes an additional learning point.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>github</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
