<?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 Zehida Thabit on Medium]]></title>
        <description><![CDATA[Stories by Zehida Thabit on Medium]]></description>
        <link>https://medium.com/@zehidata?source=rss-950f5d94c0f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MO7uPNd9DNpoZXMjgVyucg.jpeg</url>
            <title>Stories by Zehida Thabit on Medium</title>
            <link>https://medium.com/@zehidata?source=rss-950f5d94c0f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:58:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zehidata/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[Malaria Prediction (Part three)]]></title>
            <link>https://medium.com/@zehidata/malaria-prediction-part-three-4132970741be?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4132970741be</guid>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Fri, 19 Sep 2025 08:08:04 GMT</pubDate>
            <atom:updated>2025-09-19T08:30:52.516Z</atom:updated>
            <content:encoded><![CDATA[<p>Earlier, we created new features like <strong>age group</strong>, <strong>symptom count</strong>, and <strong>severity score</strong>.<br> Next, we will extend this by creating additional features:</p><ul><li><strong>GI symptoms</strong> → combines vomiting, diarrhea, and bitter tongue.</li><li><strong>Neurological symptoms</strong> → combines convulsion and headache.</li><li><strong>Age–symptom interaction</strong> → multiplies age group by symptom count, to capture how symptom burden affects different age categories.</li><li><strong>Fever severity</strong> → combines fever and hyperpyrexia to capture whether the fever is mild or dangerously high.</li></ul><p>Finally, we save our features into X and severe_malaria column into y. These two will be used very soon in our train-test</p><h3>Train–Test Split and Data Preprocessing</h3><p>Now that we have finished creating new features, the next step is to prepare our data for training. The first thing we do is to divide the dataset into two parts:</p><ul><li><strong>Training data (80%)</strong> → this is what the computer will “study” from.</li><li><strong>Test data (20%)</strong> → this is what we keep aside to check how well the computer has learned, using patients it has never seen before.</li></ul><p>We also make sure that both groups (training and test) keep the same balance of patients: about <strong>70% non-severe</strong> cases and <strong>30% severe</strong> cases, just like in our original dataset.</p><pre># TRAIN-TEST SPLIT AND DATA PREPROCESSING<br># Stratified split to maintain class balance<br>X_train, X_test, y_train, y_test = train_test_split(<br>    X, y, test_size=0.2, random_state=RANDOM_STATE, stratify=y<br>)</pre><h3>Feature Scaling</h3><p>After splitting our dataset into training and testing sets, the next important step is <strong>feature scaling</strong>.</p><p>Why?<br>Some of our features (like age or symptom_count) are numbers and can have values to 70+, while others (like fever or jaundice) are just 0s and 1s.</p><p>If we feed these raw numbers to a model like <strong>Logistic Regression</strong>, it might give more importance to age (just because the numbers are larger) even though fever could be a stronger signal. To to avoid this, we will bring all features onto the same scale using StandardScaler.</p><p>StandardScaler transforms each feature so that:</p><ul><li>The mean = 0</li><li>The standard deviation = 1</li></ul><p>This way, no single feature dominates just because of its scale. If you’re very farmiliar with statistics, this is the z score normalization.</p><h3>SMOTE</h3><p>Remember that the data we splitted for training still carries <strong>70% non-severe</strong> and <strong>30% severe</strong>.</p><p>Now there’s a problem with this : If we train the model directly on this, it will see way more non-severe cases.</p><p>Recall that we set aside 80% of our dataset (269 patients) for <strong>training</strong> . This means we have 81 severe malaria cases and 188 non-severe cases in the training set. To balance the classes, we generate <strong>81 synthetic severe malaria cases</strong>, so that both severe and non-severe classes have 188 samples each.</p><pre># Handle class imbalance with SMOTE<br>smote = SMOTE(random_state=RANDOM_STATE)<br>X_train_balanced, y_train_balanced = smote.fit_resample(X_train_scaled, y_train)</pre><pre>After SMOTE balancing:<br>  Training samples: 376<br>  Balanced target distribution: {0: np.int64(188), 1: np.int64(188)}</pre><h3>Models Training</h3><p>We trained 5 models with our now balanced dataset.</p><p>Logistic regression, Decision Tree, Random Forest, Gradient Boosting and XG Boost and these are their results.</p><p>Immediately after training each, we test with that test_data we had earlier. The test data then gives us results. We compare each result side by side and choose best performing model based on ROC-AUC (ROC-AUC mean how good a model is at distinguishing between two classes) severe and non severe malaria in our own case.</p><pre>Model Ranking Based on ROC-AUC:<br>                     accuracy  precision    recall  f1_score   roc_auc<br>Random Forest        0.897059   0.818182  0.857143  0.837209  0.936170<br>Logistic Regression  0.867647   0.750000  0.857143  0.800000  0.930091<br>XGBoost              0.882353   0.782609  0.857143  0.818182  0.927052<br>Gradient Boosting    0.882353   0.809524  0.809524  0.809524  0.916920<br>Decision Tree        0.838235   0.708333  0.809524  0.755556  0.882472<br><br>Best Performing Model: Random Forest<br>ROC-AUC: 0.9362<br>Other metrics: Accuracy=0.8971, Precision=0.8182, Recall=0.8571, F1-Score=0.8372<br><br>Best model and scaler saved for deployment.</pre><p>Next is to save the best model and a scaler to normalize our input features</p><h3>App creation and Deployment</h3><p>App was developed with prompt given to ChatGPT and deployed using streamlit.</p><p><a href="https://healthinformatics-ayvtdexyukdkztjv84twhj.streamlit.app/">view app here</a></p><p>This project is mainly for educational purpose. Don’t rely on it to find out if you have severe malaria or not</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4132970741be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Malaria Prediction (Part two)]]></title>
            <link>https://medium.com/@zehidata/malaria-prediction-part-two-027a75ffae1a?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/027a75ffae1a</guid>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 21:14:23 GMT</pubDate>
            <atom:updated>2025-09-19T08:35:21.783Z</atom:updated>
            <content:encoded><![CDATA[<pre>from sklearn.model_selection import train_test_split, cross_val_score, GridSearchCV, StratifiedKFold<br>from sklearn.linear_model import LogisticRegression<br>from sklearn.tree import DecisionTreeClassifier, plot_tree<br>from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier<br>from sklearn.metrics import (classification_report, confusion_matrix, roc_auc_score, <br>                           roc_curve, precision_recall_curve, accuracy_score,<br>                           precision_score, recall_score, f1_score)<br>from sklearn.preprocessing import StandardScaler<br>from sklearn.feature_selection import SelectKBest, f_classif<br>from imblearn.over_sampling import SMOTE<br>import joblib<br>import warnings<br>warnings.filterwarnings(&#39;ignore&#39;)</pre><p>These are the libraries we would be using to run our machine learning models, so we imported everything before starting.</p><p>Remember our dataset is small, the 35% of severe cases for exampe may not all show strong or consistent severity symptoms. For example, some severe patients in the real data might not have had fever, fatigue, or other key symptoms, just by chance. To address this, we will create a synthetic dataset where we can <strong>control symptom probabilities</strong>, to ensure severe patients consistently show meaningful severity patterns.</p><p>To create our synthetic dataset, we firstly set a seed so anytime we re run this code, we get the same synthetic dataset</p><pre># Set random state for reproducibility<br>RANDOM_STATE = 42<br>np.random.seed(RANDOM_STATE)</pre><p>We will list all the symptoms we have in our original dataset so they can be the same for our synthetic dataset.</p><pre>    # Base symptoms and their probabilities for different scenarios<br>    symptoms = [&#39;fever&#39;, &#39;cold&#39;, &#39;rigor&#39;, &#39;fatigue&#39;, &#39;headache&#39;, &#39;bitter_tongue&#39;, <br>                &#39;vomiting&#39;, &#39;diarrhea&#39;, &#39;Convulsion&#39;, &#39;Anemia&#39;, &#39;jaundice&#39;, <br>                &#39;cocacola_urine&#39;, &#39;hypoglycemia&#39;, &#39;prostration&#39;, &#39;hyperpyrexia&#39;]</pre><p>we crete an empty list to store all patient records.</p><pre>data = []</pre><p>We loop over 337 times, each time, a new patient is created. Since our original dataset has ages between 3 and 77, we randomly give each patient an age within that range, and we also randomly assign their sex. 0 stands for Female and 1, for male</p><pre>for i in range(n_samples):<br>    age = np.random.randint(3, 78)<br>    sex = np.random.randint(0, 2)</pre><p>In our synthetic dataset, we mark 30% of patients as having severe malaria and the remaining 70% as non-severe. For each symptom, we assign a probability. Common symptoms like fever, fatigue, and headache get high probabilities because almost everyone with malaria experiences them.</p><p>On the other hand, serious complications like hypoglycemia, convulsions, or prostration have lower probabilities. Non-severe patients also show symptoms, but at lower probabilities.</p><pre># Severe malaria cases (30% of data)<br>        if i &lt; n_samples * 0.3:<br>            severe_malaria = 1<br>            # Higher probability of severe symptoms<br>            symptoms_prob = [0.95, 0.8, 0.7, 0.9, 0.8, 0.4, 0.3, 0.4, 0.2, 0.5, 0.3, 0.2, 0.3, 0.4, 0.15]<br>        else:<br>            severe_malaria = 0<br>            # Lower probability of severe symptoms<br>            symptoms_prob = [0.8, 0.6, 0.5, 0.7, 0.6, 0.2, 0.15, 0.2, 0.05, 0.2, 0.05, 0.03, 0.1, 0.15, 0.02</pre><p>For each patient, we decide whether they actually show each symptom by rolling a random chance based on the probabilities we set earlier . If the random number is less than the probability , the patient is marked as having it (1) otherwise, they don’t have it (0).</p><pre># Generate symptoms based on probabilities<br>        patient_symptoms = [1 if np.random.random() &lt; prob else 0 for prob in symptoms_prob]</pre><p>After generating all the symptoms for a patient, we combine them with the patient’s age, sex, and whether they have severe malaria in the data[] we created earlier.</p><pre> # Create patient record<br>        patient = [age, sex] + patient_symptoms + [severe_malaria]<br>        data.append(patient)</pre><p>Finally, we name the columns: age, sex, all the symptoms, and severe_malaria and return as a DataFrame.</p><pre># Create DataFrame<br>    columns = [&#39;age&#39;, &#39;sex&#39;] + symptoms + [&#39;severe_malaria&#39;]<br>    df = pd.DataFrame(data, columns=columns)<br>    <br>    return df</pre><p>We then print a quick summary showing the number of patients (rows) and the number of features (columns) in the dataset.</p><pre># Generate dataset<br>df = create_extended_malaria_dataset(337)<br>print(f&quot; Dataset created: {df.shape[0]} patients, {df.shape[1]} features&quot;)</pre><pre>Dataset created: 337 patients, 18 features</pre><p>Now we have the same number of rows and columns as our original dataset.</p><h3>Feature Engineering</h3><p>Now that we have our synthetic dataset, the next step is feature engineering. Feature engineering simply means improving or creating features (columns) from the data we already have, so the models we will be creating in the future can learn patterns more effectively. However, you don’t use just any columns/variables for feature engineering. feature engineering is applied to independent variables. Whether a patient has severe malaria or not <strong>depends</strong> on the symtoms they show. So in our case, our dependent variable is the severe_malaria column while our independent variables are the symptoms column.</p><p>The reason we don’t use the dependent variable to for feature engineering is because that would mean showing the models the answer it is supposed to predict. We want our models to learn the relationship between symptoms and malaria severity on its own. Here’s a simple ideology. If you have an exam and you’ve been provided the marking scheme before you enter, you memorized the answers correctly and went to write the exam and you later passed. T<strong>hat success isn’t real. you didn’t actually learn the subject, you just copied the answers.</strong></p><p>In the same way, if we use the dependent variable (severe_malaria) during feature engineering, the models will look like they’re performing very well, but only because they were “shown the answers”. When faced with new, unseen patients, they fail because they never truly learned how symptoms relate to severe malaria.</p><p>Now let’s begin with feature engineering</p><p>Before that, let’s list out the features we want to create from our dataet</p><ol><li>Age group</li><li>Total number of symptoms or symptoms count</li><li>severity score (to be calculated from <strong>WHO </strong>recognized severe malaria symptoms)</li><li>gi_symptoms (<strong>Gastrointestinal symptoms</strong>.)</li><li>neuro sumptoms (neurological symptoms)</li><li>age symptoms interaction</li><li>Fever severity</li></ol><p>Age group</p><p>In our dataset, we have the age column as a continuous variable. Instead of using the raw age values, we can create an <strong>engineered feature</strong> called age group to classify patients into three categories:</p><ul><li><strong>Child (0–12 years)</strong> → encoded as 0</li><li><strong>Youth (13–30 years)</strong> → encoded as 1</li><li><strong>Adult (31+ years)</strong> → encoded as 2</li></ul><p>This transformation will allow the models to detect group-level patterns that might not necessarily be obvious from raw age numbers. For example, severe malaria symptoms might be more common in children and less frequent in adults. If we group the age column, we give models a clearer signal to learn from.</p><pre># Age groups<br>def categorize_age(age):<br>    if age &lt;= 12:<br>        return 0  # Child<br>    elif age &lt;= 30:<br>        return 1  # Youth<br>    else:<br>        return 2  # Adult<br><br>df_engineered[&#39;age_group&#39;] = df_engineered[&#39;age&#39;].apply(categorize_age)</pre><p>2. Total number of symptoms or symptoms count</p><p>In our dataset, we have several binary symptom columns (fever, cold, rigor, fatigue, etc.), that indicated whether a patient has a particular symptom or not.</p><p>Instead of treating them only individually, we create a <strong>symptom_count</strong> feature from the symptoms column, to tell us how many symptoms a patient is experiencing in total.</p><pre># Symptom counts and scores<br>symptom_cols = [&#39;fever&#39;, &#39;cold&#39;, &#39;rigor&#39;, &#39;fatigue&#39;, &#39;headache&#39;, &#39;bitter_tongue&#39;,<br>                &#39;vomiting&#39;, &#39;diarrhea&#39;, &#39;Convulsion&#39;, &#39;Anemia&#39;, &#39;jaundice&#39;,<br>                &#39;cocacola_urine&#39;, &#39;hypoglycemia&#39;, &#39;prostration&#39;, &#39;hyperpyrexia&#39;]<br><br>df_engineered[&#39;symptom_count&#39;] = df_engineered[symptom_cols].sum(axis=1)</pre><p>3. To calculate our severity score, we have to identify symptoms that actually count as severe. According to the WHO article published on December 11, 2024, the real world symptoms for actual severe malaria are</p><ul><li>impaired consciousness</li><li>multiple convulsions</li><li>difficulty breathing</li><li>dark or bloody urine</li><li>jaundice (yellowing of the eyes and skin)</li><li>abnormal bleeding.</li><li>extreme tiredness and fatigue</li></ul><p>were listed as severe malaria symptoms. The columns that correspond to these in our datasets are the <strong>fatigue, jaundice, prostration, Convulsion, cocacola_urine</strong> columns. Putting them in a list and calculating the sum of the list will now give us what we call severity_score.</p><pre># Severity score (severe symptoms)<br>severe_symptoms = [&#39;fatigue&#39;,&#39;jaundice&#39;, &#39;prostration&#39;, &#39;Convulsion&#39;, &#39;cocacola_urine&#39;]<br>df_engineered[&#39;severity_score&#39;] = df_engineered[severe_symptoms].sum(axis=1)</pre><p>Read part 3<a href="https://medium.com/@zehidata/malaria-prediction-part-three-4132970741be"> here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=027a75ffae1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Malaria Prediction (Part one)]]></title>
            <link>https://medium.com/@zehidata/malaria-prediction-1f3df5b6e447?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f3df5b6e447</guid>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 20:05:41 GMT</pubDate>
            <atom:updated>2025-09-19T08:13:26.146Z</atom:updated>
            <content:encoded><![CDATA[<p>Let me tell you what we’re here to do today. We’re here to build an application, but this time, not as an app developer but as a data scientist.</p><p>We’re not going to build that out of a thin air, obviously. There’s a dataset for it. So here is it: We will look at our dataset, study the various symptoms patients observe whenever they have malaria, and use that to predict if a new patient has severe malaria or not</p><p>Now let’s get started.</p><p><strong>Installing Python and Jupyter Lab</strong></p><p>For this project, we will be writing the code using python, and the code editor we will be using is Jupyter lab. The dataset was given in xls format. So when you open the file, save it as csv on your local storage, then proceed to open command prompt on your computer. Command prompt automatically comes with your computer BTW.</p><p>In your command prompt, type ‘python — version’ mine returned Python 3.13.5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*pwYvSMkd3-M75yYsyxs1jg.png" /></figure><p>If yours returns something else, or you’re getting an error, download Python 3.13.5 <a href="https://www.python.org/downloads/release/python-3135/">here</a>. We want to use Python 3.13.5 to avoid getting errors when deploying our app.</p><p>When your’e done downloading it, open as administrator and click on ‘Add python.exe to PATH’ before proceeding to install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*jfc6RGeDSPtMAqFj7QNyMw.png" /></figure><p>Now you have Python installed on your computer.</p><p>Go back to command prompt and type ‘py -3.13 -m pip install jupyterlab’ to install jupyter lab. After installalation, type ‘py -3.13 -m jupyter lab’ to use Python 3.13 to run the Jupyter Lab program.</p><p>Now you’re in Jupyter lab</p><p><strong>Setting up Jupyter Lab</strong></p><p>Proceed to upload the csv file you saved in your local storage earlier. You can do that using the ‘upload file’ icon in the top left side of jupyter lab. When you’re done, upload the malaria prediction app.ipynb file you downloaded in the github repository.</p><p>To confirm we’re using Python 3.13, I imported python’s system module and printed the python version Jupyter lab was running on. Now we go back to command prompt to run this <strong>‘pip install streamlit numpy pandas scikit-learn imbalanced-learn xgboost matplotlib seaborn joblib’. </strong>Dont add the quotation when copying. That command will install the all the libraries we would be using.</p><p><strong>Code Explanation</strong></p><p>The main part of the code started with reading the csv file we imported earlier. Next is changing ‘severe_maleria’ into ‘severe_malaria’. After that the result was saved back and we viewed the first five rows of our data set using the df.head() code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*om_6zihHbeeoeC-N2K3ugw.png" /><figcaption>first 5 rows of our malaria dataset</figcaption></figure><p>Shape i.e the number of rows and columns in our dataset was also checked and our dataset had 337 rows and 19 columns. We checked for null values, thankfully there was none and we used summary statistics to look at the mean, median, mode, etc of the dataset. This is called descrbing the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OITb2a1sxBYERwLWmpa1wg.png" /><figcaption>checking for number of rows &amp; columns and if there are null values in our dataset</figcaption></figure><h3>Dividing Columns into Dependent and Independent Variables</h3><p>Now it’s time to tell our python <strong>what we want to predict</strong> and <strong>what columns it can use to make that prediction</strong>.</p><p>The <strong>target variable</strong> we asked python to print is the answer we want i.e whether a patient has <strong>severe malaria</strong> or not (i.e the column named ‘severe_malaria’).</p><p>The <strong>feature variables</strong> are all the clues we have . the symptoms, age, and everything else in the dataset.</p><p>Now that we’ve defined <strong>what we want to predict </strong>and our <strong>features</strong>, we will take a good look at our target data. We want to see <strong>how many patients have severe malaria vs. those who don’t</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbiuUpKnRt_JbQlxxOm-rw.png" /></figure><p>Before we do that, we will import matplotlib, count the number of 0s and 1s in our target_col (i.e the severe malaria column) and save it in a variable named target_counts.</p><p>Then, we calculate the percentage of the 1s and 0s and save it in a variable named target_props. The parameter we passed in the value_counts function helped to calculate the proportion/percentage.</p><p>The next step is to print the result and we found out that 65.6% of patients have non severe malaria while 34% have severe malaria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KBRiJGmQpUk8d-x2kDahiQ.png" /></figure><p>Creating Visualization for our target variable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OBqQqkhcOxs2OqaLqeNEkA.png" /></figure><p>221 patients (representing 65.6%) of all patients have non severe malaria, while the remaining 116 patients (representing 34.4%) have severe malaria.</p><p><strong>Gender and Age Analysis</strong></p><p><em>Age</em></p><p>We did the same thing for gender and age, by calculating the proportion of their categories, but this time we added an extra step by comparing the age and gender by malaria severity</p><p>We created 2 rows and 2 columns to visualize our distribution. The first row accommodated the age distribution which was visualized using a histogram, and beside it was the age distribution by malaria severity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymJtkAy12n5At_milgnaJA.png" /></figure><p>From the histogram on the left, we can see that the data contains some outliers judging from the skewed shape. We confirmed by the box plot on the right. For patients with non-severe malaria, a few outliers are present .These are individuals whose ages lie far outside the typical range of the group. The case is same with patients with severe malaria, but with just one data point falling into the outlier category.</p><p><em>Gender</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sF8Q-5LuoSihM_9zEVjcNA.png" /></figure><p>SYMPTOMS</p><p>Next, we counted the number of symptoms recorded. The symptoms are everything in the dataset except for the age, age group and the sex columns. The total number of symptoms in our dataset is 15.</p><p>Out of the 15 symptoms analyzed, hypoglycemia, fever, headache, and jaundice turned out to be the leading symptoms observed by patients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tlkBOFFBozQgqUdtOkYZfw.png" /></figure><p><strong>Correlation betweeen severe malaria and symptoms</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gesZZlSU7uJcZDM2HRalPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUKRlsKnPCEK-39XGEA_XQ.png" /></figure><p>Now let’s see how the symptoms line up with severe malaria. Those with positive numbers have a stronger link to severe malaria. for example, headache, hypoglycemia, and diarrhea are the top ones. Smaller positive numbers like cold, coca-cola urine, and fatigue mean the link is weaker. Symptoms near zero (like fever and jaundice) don’t really tell us much. And those with negative numbers (such as prostration and convulsions) are actually more linked with non-severe malaria in this data.</p><p>Machine Learning Models</p><p>Now that we’ve gone through the dataset and seen which symptoms are connected to severe malaria, the next step is to move from just observing patterns to making predictions like we said in the beginning. To do that, we’ll bring in machine learning models. These models will study our dataset and then help us predict if a new patient is likely to have severe malaria or not.</p><p>Read part two <a href="https://medium.com/@zehidata/malaria-prediction-part-two-027a75ffae1a">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f3df5b6e447" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I secured a Data Analyst job with no prior experience (Part 2)]]></title>
            <link>https://medium.com/@zehidata/how-i-secured-a-data-analyst-job-with-no-prior-experience-and-without-any-connections-part-2-d90faa9eb394?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d90faa9eb394</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[roadmaps]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 18:54:21 GMT</pubDate>
            <atom:updated>2024-12-28T21:25:37.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*x-sl6fezUKn3f-ws.jpg" /></figure><p>This is part 2 of how i secured my first role as a Data Analyst.</p><p>There’s a high chance you’re here because you read Part 1. If this is the first one you’re seeing, hello, reader! Check out the first part <a href="https://medium.com/@zehidata/how-i-secured-a-data-analyst-job-with-no-prior-experience-and-without-any-connections-part-1-b59f04b9a3ca"><strong>here</strong></a>☺️.</p><p>Alright, now that we’ve welcomed the newcomers, let’s continue from where an author’s post completely changed my approach.</p><p><strong>The Bookmarked post!</strong></p><p>One random day in 2023, while going through my bookmarked posts on Twitter, I came across one of Jessica Ayodele’s posts that I had saved since 2022.</p><p>The post was titled <em>“My Data Analytics Roadmap,”</em> and this time, I decided to take a closer look. I thought to myself, <em>“If this is what she did to land her first role, I can replicate it.”</em> And that was the moment everything changed. This is Jessica’s Roadmap; what I used to restart my Data Analytics Journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dpULi-IJRGXZzXh2BFoiZQ.jpeg" /></figure><p><strong>Learning</strong></p><p>I started using this roadmap, and here’s how I went about it:</p><ul><li>I learned <strong>Statistics</strong> using Organic Tutor on YouTube.</li><li>I learned <strong>Microsoft Excel</strong> using YouTube and Instagram 😐 (yes, you heard that right).</li><li>I learned <strong>SQL</strong> through DataCamp.</li><li>I learned <strong>Power BI</strong> using YouTube tutorials.</li></ul><p>Whenever I started learning a new tool, I made sure to practice consistently. Once I felt I had learned enough, I built projects using that tool. The key thing I realized was that you can’t learn everything at once, there will always be more to discover as you grow .</p><p><strong>The main Secret</strong></p><p>I won’t lie, what truly helped me land my first role was <strong>building in public</strong> and tagging big accounts in Data Analytics to help my posts gain visibility.</p><p>Whenever I completed a project, I posted about it and tagged Jessica Ayodele and Ezekiel Aleke. At first, Jessica didn’t notice me, but I kept tagging her until she eventually started engaging with my posts.</p><p>Then one day, Ezekiel reposted one of my Power BI dashboards on his page and tagged me. That post led to a game-changing moment — I received a DM from my employer.</p><p>Ladies and gentlemen, that’s how I got my first role as a Data Analyst!</p><p><strong>Salary Expectation</strong></p><p>I’m not going to tell you how much i earn, but remuneration often depends on the budget allocated for the role or how well you can negotiate. Ask your employer about the budget for the position, and if it aligns with your experience, go for it! ☺️</p><p>THE END</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d90faa9eb394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I secured a Data Analyst job with no prior experience]]></title>
            <link>https://medium.com/@zehidata/how-i-secured-a-data-analyst-job-with-no-prior-experience-and-without-any-connections-part-1-b59f04b9a3ca?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b59f04b9a3ca</guid>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 18:14:17 GMT</pubDate>
            <atom:updated>2024-12-28T19:03:55.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*azjxRhbAG7Y_FOVw.jpg" /></figure><p>I’ll just go with the flow because I’m not sure how to start. My name is Zehida, an undergraduate studying Computer Science at a Nigerian university. By the way, Zehida is a female name, and I’m Yoruba, not Hausa. Looks like I’m already getting sidetracked 😅let’s dive into the main story.</p><p>I’ll share what works best when you have zero experience but want to land an entry-level role in Data Analytics, including what to learn and the salary range you should aim for (that part is coming in Part 2, lol).</p><p>My journey began on February 25, 2022. Yes, I’m good with dates — just in case you’re wondering how I remember it so clearly. No one suggested Data Analytics to me. One day, I Googled “Tech niches that are not saturated,” and I came across Machine Learning/AI and Data Science. I chose Data Science without really understanding what it was or whether I’d enjoy it. I also checked if the field had many females in it and found out it didn’t.</p><p>As a complete newbie, I didn’t know where to start. So, I reached out to Tahiru Mateen, the GDSC Lead at my school at the time. He advised me to apply for the 2022 DataCamp Scholarship. I followed his instructions, sent him a WhatsApp message, applied, and started with “Python for Data Science.”</p><p>However, by April, I began having second thoughts. Data Science didn’t feel like the right fit for me, but I still wanted to stay in the data field. After more research, I discovered other data career paths and felt more drawn to Data Analytics.</p><p>I continued learning on DataCamp, but my perspective shifted after coming across a post on Twitter. The author shared how they secured a role in Data Analytics with zero experience. That post inspired me to start fresh in 2023, and my approach changed completely.</p><p>Follow me for Part 2, where I’ll share more details about my journey and don’t forget to follow me!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b59f04b9a3ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retail Performance Analysis (PART 1)]]></title>
            <link>https://medium.com/@zehidata/retail-performance-analysis-c5f5af6a102a?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5f5af6a102a</guid>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[sales]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 13:41:33 GMT</pubDate>
            <atom:updated>2024-09-24T15:59:17.510Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Overview</em></p><p>SoneyMart, a retail store in Myanmar (formerly Burma), a country situated <strong>southwest of China</strong>, began operations at its first branch (Branch A) in Yangon on Saturday, January 5, 2019. The store has since expanded, opening Branch B in Mandalay on January 14, and Branch C in Naypyidaw on January 6, collectively serving a total of 1,000 customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*5RHQyx8gdvNSuJf7Vya-Tg.gif" /></figure><p>The customer base of this store consisted of two groups: <strong>Normal</strong> customers, who were regular shoppers, and <strong>Members</strong>, who were dedicated customers, each group making up 50% of the total population.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*gTCb-cYZziNmWt-lts78eg.png" /></figure><p>Similar to the distribution of customer type, the gender category (Male and Female) also accounted for 50% each of the total customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*_uTBsPIEkF_jbWqZ0qB7xA.png" /></figure><p>At SoneyMart, 6 unique products, including Fashion accessories, Electronic accessories, Health &amp;beauty, Sports &amp; travel, and Home &amp; Lifestyle products were being sold to different categories of customers in all branches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*9Ap5tSql_SVJfO0JRyMHiA.png" /></figure><h3>QUANTITY ANALYSIS</h3><p>So far, the store had sold a total of 5,510 products across all categories. Branch <strong>A</strong> had the highest sales volume in the Branch category, followed by <strong>C</strong> and then<strong> B</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*OaYF4xFnIPSKuBVB-ZtglQ.png" /></figure><p>In Branch A, Home &amp; Lifestyle products were the top seller, while Sports &amp; Travel led in Branch B, and Food &amp; Beverages topped sales in Branch C.</p><p>Each product also had a preferred location: Electronic accessories were most popular in<strong> C</strong> (Naypyidaw), as were Fashion accessories and Food &amp; Beverages. Health and Beauty products excelled in <strong>B</strong> (Mandalay), while Home &amp; Lifestyle and Sports &amp; Travel items performed best in <strong>A</strong> (Yangon).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*n3YO0qeJMFyaonNzyPjCRQ.png" /></figure><p>In the customer type category, members purchased only 2% more than Regular customers, indicating similar sales volume across both groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*BL3whMAiRKdD7OJ_mot3PQ.png" /></figure><p>They preferred Food &amp; Beverages, Sports &amp; Travel, and Home &amp; Lifestyle products, while Regular customers favored Electronic and Fashion accessories, along with Food &amp; Beverages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*Xc4jP68K34taYsDkGLpNrA.png" /></figure><p>In the gender category, females emerged as the primary customers, purchasing higher quantities across all categories, except in Health and Beauty category, where males lead in purchases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*6ccSsJggvVj0KeIKJdmckw.png" /></figure><p>In general, customers bought Electronic accessories, Food &amp; beverages, and Sports &amp; travel equipment in larger quantities compared to the remaining 3 product categories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*2VrPEvaBZ9hSM0y_WuTS1g.png" /></figure><h3>PRODUCT PERFORMANCE ANALYSIS</h3><p>Over two years, total sales across all product categories reached $323k, averaging $323.</p><p>Food &amp; Beverages was the best-selling category, generating $56k, followed closely by Sports &amp; Travel at $55k. Electronic Accessories, Fashion Accessories, and Home &amp; Lifestyle each generated $54k. Health &amp; Beauty had the lowest sales, a total $49k.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdgNB1eFoSLagxRItpY5mw.png" /></figure><p><strong>Best Selling Products in terms of sales generated</strong></p><p><em>Branch</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*RgXg5dzjGxvMUnAxTa8tHg.gif" /></figure><p><em>Customer type</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*k5ob69V7JkZpcl2xhAq1wg.gif" /></figure><p><em>Gender</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*cF4lg6p52htUEBtu7obgwg.gif" /></figure><p><em>year</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*WRf__74tkr91dDOBYBywXg.gif" /></figure><h3>SALES ANALYSIS (Quarter)</h3><p><strong>2019</strong></p><p>In the first quarter of 2019 (Jan-March), when it started operations, SoneyMart generated <strong>$32K</strong> in total sales. In the 2nd quarter, i.e (April-June), sales surged to <strong>$37K</strong>,<strong> </strong>a 14% increase compared to the 1st quarter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*oEAgHr-lwt6VCzQQbeZ2Aw.png" /></figure><p>By Quarter 3, it took a downturn witnessing a decrease of 39%</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*chRjcbyqSpdGc8zynjK0bQ.png" /></figure><p>Q4 (Oct-Dec) helped the store recover slightly, generating $28K with a modest 4% increase compared to the third quarter, pushing SoneyMart back into positive growth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*R-K4GE-ri65FfIUui4qH5g.png" /></figure><p>Overall, a total of $124K was made in 2019 with a decline occurring only in Q3.</p><p><strong>2020</strong></p><p>Compared to the last quarter of 2019, quarter 1 in 2020 started with a decrease in sales. A total of $26k was made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*z6zzgdo4Pl-o4aVBPpnhaQ.png" /></figure><p>Q2 saw a slight increase of 4%. A total of $27K was generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*6mSia7RytZTwSnWcfsY_fQ.png" /></figure><p>In contrast to 2019’s Q3 decline, 2020 Q3 showed better performance, generating $29K in sales and reflecting an 8% increase from Q2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*9exu5_lS34RyY8cuQkqMqQ.png" /></figure><p>When the 4th quarter came, a slight deflection of 2% was experienced by the total sales of SoneyMart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*aKvIwip3LjkMZ353GI8y3A.png" /></figure><p>Overall, SoneyMart generated total sales of $111,000 in 2020 with a decline occurring in 1st and 4th Quarter. The store incurred a loss compared to 2019, when total sales reached $124,000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*vhlSd-FTqGm5bx1Q6Y_AoQ.png" /></figure><p><strong>2021 </strong>(Present year) January-September</p><p>2020 began with a decrease in sales compared to Q4 2019. In 2021, however, sales improved, with a 6% increase compared to Q4 2020, totaling $33k in the first quarter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*uNSFYxPojdUCphlZdTNl1w.png" /></figure><p>Quarter 2 took an unfavourable turn, accummulating a loss of 15%, after generating a total of $27k in sales compared to the $37k generated in Q1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*hdvwCSiUSzzLSfzuSvCtXQ.png" /></figure><p>Sales picked up back in the 3rd Quarter. A total of $30K was generated. This translated to an increase of 11% in percentage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*PwVU7unrdatFuuPAoRWXcA.png" /></figure><p>Overall, a total of $88k was generated in 2021, with a drop occurring only in Q2.</p><p>When comparing the period from January to September of last year with the same period this year, there’s an increase in sales compared to 2020.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*QZ7PHp2SeH5KNIGKP8qV2A.png" /></figure><p>Part 2….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5f5af6a102a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketing Analytics Report]]></title>
            <link>https://medium.com/@zehidata/marketing-analytics-report-44ad9bdc7b96?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/44ad9bdc7b96</guid>
            <category><![CDATA[digital-marketing]]></category>
            <category><![CDATA[marketing-analytics]]></category>
            <category><![CDATA[analysis]]></category>
            <category><![CDATA[devices]]></category>
            <category><![CDATA[conversion-rate]]></category>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Thu, 16 May 2024 18:16:57 GMT</pubDate>
            <atom:updated>2024-05-17T13:17:43.395Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y4pMjYxxdsi442HYWeQojw.jpeg" /><figcaption>image from Google</figcaption></figure><p><em>This Analysis is based on a real life dataset. No account for methodology-(yet)</em></p><p><strong>INTRODUCTION</strong></p><p>NewCo, a UK-based organization venturing into digital marketing, seeks to improve their marketing performance. They utilize a mix of digital marketing channels, including Paid Search, email campaigns, etc. to engage customers across desktops, mobile devices, and tablets. Their aim is to improve the channels’ conversion rate and identify optimal time frames to guide their growth strategies. Additionally, they plan to use Key Performance Indicators (KPIs) to gain better insights from their analysis.</p><p>Before you proceed with reading this report, let’s introduce some key terms related to this report.</p><p><strong>1.</strong> <strong>Digital Marketing:</strong> A form of advertising that uses the internet and digital technologies to connect with customers.</p><p><strong>2.</strong> <strong>KPIs (Key Performance Indicator):</strong> measurable values that demonstrate how effectively a business is achieving its key objectives. The measurable values to be considered include:</p><p>a. Conversion rate: percentage of users who make a successful transaction.</p><p>b. Monthly revenue trend</p><p>c. Yearly revenue trend</p><p>d. Device category performance</p><p>e. Channel category performance</p><p>f. Day of week Revenue Distribution</p><p>g. Return on investment (ROI): Profit or loss gotten from an investment relative to its cost.</p><p><strong>Analysis of Advertising Channels</strong></p><p><strong>Paid Search:</strong> This is the only advertising channel currently being invested in. Newco paid search engines to place their ads higher on relevant search engines with the goal of driving traffic to their site so customers could make transactions. Since 2022, a total of £5M has been spent on this advertisement, resulting in £3M in revenue. Here’s a breakdown of the spending and returns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*TFIhfIWsAS9fMdHWMMprxg.png" /></figure><p>· In 2022, £1.5M was spent, yielding a return of £944K.</p><p>· In 2023, £2.1M was spent, yielding a return of £1.3M</p><p>· In 2024, £896K was spent, yielding a return of £389K.</p><p>This total investment resulted into a -41% ROI which did not yield the high returns that NewCo might have anticipated.</p><p>Given this low ROI, it appeared that Paid Search advertisement may have a low conversion rate. Let’s explore the conversion rates of Paid Search and those of other channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*vKfZiBNZ2S43Tk5cjN3FPw.png" /><figcaption>Fig 2. Chart showing conversion rate accross various advertising channels.</figcaption></figure><p>As expected, the conversion rate for Paid Search was underperforming (10%). Email, Affiliate, Direct, and Referral showed higher conversion rates of 26%, 21%, and 17%, and 16% respectively. Other channels including Organic Search, Social, and Display did not generate high conversions.</p><p><strong>Channels Rating in terms of Conversion Rate</strong></p><p><strong>Email:</strong> Best</p><p>Affiliate: Better</p><p>Direct and Referral: Good</p><p><em>Given that Paid Search advertisement did not yield a high conversion rate, what potential benefits did it offer after spending so much on it? Maybe higher website sessions?</em></p><p><strong>CHANNELS SESSIONS</strong></p><p>Website sessions is the number of times any user visits your website. We want to find out the number of visits NewCo’s Website gets from each marketing Channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kARVBEqaHxOWQQBjpEODZQ.png" /><figcaption>Fig3. Chart showing different channels sessions</figcaption></figure><p>Out of a total of 2.8 million sessions on Newco’s website, 1 million sessions originated from Paid Search advertisements, accounting for 36% of the overall sessions. This indicated that although investing in this advertisement may not yield a higher conversion rate, it did help NewCo attract a significant number of potential customers to their website. Organic Search contributed 19% of the sessions, while Email campaigns accounted for 16%. The remaining 30% came from various other channels.</p><p><strong>Channels Rating in terms of Sessions.</strong></p><p><strong>Paid Search</strong>: Best</p><p>Organic Search: Better</p><p>Email: Good</p><p><em>Did a higher session translate to a higher revenue?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*j0Q01M-lALyqnDnnSAk5sQ.png" /><figcaption>Fig 4. Chart showing Channels Revenue in descending order</figcaption></figure><p>From 2022 to 2024, NewCo generated a total revenue of £6 million. Paid Search contributed to 50% of this amount, likely due to higher investment in this channel compared to others and its high number of sessions. Email was the second-highest revenue generator, contributing to 33% of the overall revenue generated.</p><p>It’s important to note that a higher number of sessions doesn’t always translate to higher revenue. For instance, Organic Search had more sessions than Email, yet Email generated more revenue. Some factors that have the potential to contribute to higher revenue include an increase in sessions or a higher conversion rate. However, other factors, such as higher transaction, could also play a significant role.</p><p>A transaction involves customers purchasing a product or service online through a website or app. The transactions of these channels are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*f0jB_OUelxPogxEyjMLEMA.png" /><figcaption>Chart showing Channels transactions in descending order</figcaption></figure><p>Indeed, a higher number of transactions can significantly boost revenue. Email had 137k successful transactions, thereby generating more revenue than Organic Search which had 115k. Generally, for all channels, an increase in transactions led to an increase in revenue.</p><p>The following list presents nine channels used by NeWCo ranked by their revenue generation effectiveness, from <strong>highest to lowest.</strong></p><p>1 Paid Search<br>2 Email<br>3 Organic Search<br>4 Affiliate<br>5 Direct<br>6 Other<br>7 Referral<br>8 Social<br>9 Display</p><p><em>It’s noteworthy that Email ranked in the top 3 for conversion rate, website sessions, transactions, and revenue, a feat no other channel had achieved.</em></p><p><strong>Device Category Performance</strong></p><p>Now let’s look at various devices used by customers with these channels.</p><p>There are 3 categories of Devices in question. They include Desktop, mobile, and tablet. One might assume that since people use mobile devices more frequently than desktops and tablets, mobile would rank first in terms of conversion rate. However, this is not the case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*b1LakzgK-yiNbJDC153M0Q.png" /><figcaption>Chart showing devices conversion rates</figcaption></figure><p>While mobile performed well, it did not achieve the highest conversion rate as anticipated. Desktops ranked first in terms of conversion rate, potentially due to their wider screens, which may enhance the user experience for transactions (though this assumption is not supported by the data in this report). Mobile devices came in second with a 12% conversion rate, while tablets had the lowest conversion rate.</p><p>Since desktop ranked 1st at conversion rate in device category and Email ranked first in channels category, therefore:</p><p><em>Desktop device + Email= HIGH CONVERSION RATE</em></p><p><strong>DEVICES SESSION</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*RIBvLxBCCnolKL6pLMlOLw.png" /><figcaption>Chart showing devices sessions</figcaption></figure><p>Regarding the number of sessions on Newco’s website, mobile had 1.5M surpassing desktop with 300k sessions, while tablet had the least sessions with only 61k sessions. However, it’s important to remember that higher sessions do not necessarily translate to higher revenue. In fact, desktop generated a slightly higher revenue than mobile (this will be discussed next)</p><p>Since Paid Search ranked 1st at sessions in channels category, and mobile ranked 1st in the device category, therefore:</p><p><em>Mobile Device+ Paid Search advertisement = HIGH SESSIONS</em></p><p>Desktop also performed greatly in terms of higher sessions; a combination of Paid Search and Desktop will likewise generate higher session.</p><p><strong>Devices Revenue</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*sK95rH5-A-RKJ8ls7ZQrLw.png" /></figure><p>Desktop and mobile had a combined revenue of £6M, each generating £3M. Tablet on the other hand generated £125K.</p><p>Since Paid Search ranked 1st in total revenue in channels category and Desktop device ranked 1st in device category, therefore:</p><p><em>Desktop device + Paid Search advertisement = HIGH REVENUE</em></p><p><em>Mobile also performed greatly in terms of revenue generation; a combination of Paid Search and mobile device will also generate higher revenue.</em></p><p>We’ve examined three potential factors contributing to increased revenue generation: higher conversion rates, increased sessions, and more transactions. Another significant factor is the average revenue per session, which represents the average amount customers spend during each session. For Desktop, mobile, and tablet, the average revenue per session was £3, £2, and £2 respectively. This variance could be a contributing factor to Desktop generating slightly higher revenue than mobile.</p><p><strong>GENERAL REVENUE ANALYSIS</strong></p><p>It was previously mentioned that NewCo generated a total of £6M from 2022–2024. However, a general analysis has not yet been conducted to identify specific time frames that stood out. In this general revenue analysis, we will examine trends based on the days of the week, monthly, and yearly revenue patterns.</p><p><strong>Days of the week</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_qkFD16Lpp18n2ABKGp5yQ.png" /><figcaption>Chart showing days of the week revenue</figcaption></figure><p>Mondays were highly profitable for NewCo, with revenue peaking on this day each week. From 2022 to 2024, a total of £1M was generated on Mondays. However, revenue slightly decreased by 7% on Tuesdays. It rebounded on Wednesdays, and for the rest of the week, there was no significant variation until Saturday, which saw a notable drop in revenue. Saturday ended up being the day with the lowest revenue. Weekends, in general, were not strong revenue days for NewCo.</p><p>The following list presents days of the week ranked by their revenue generation effectiveness, from <strong>highest to lowest.</strong></p><p>Monday<br>Wednesday<br>Thursday<br>Tuesday<br>Friday<br>Sunday<br>Saturday</p><p><em>Why did Saturday generate the least revenue?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FyCf-66aWIktLA4RRTsmmg.png" /><figcaption>chart showing days of the week transactions</figcaption></figure><p>These are the transactions for each day of the week. Monday recorded the highest number of transactions, with 66k, and generated the most revenue (£1M). In contrast, Saturday had the fewest transactions, with 34k, and generated the least revenue (£613k). The low revenue on Saturday was due to the minimal number of transactions.</p><p>A higher transaction translated directly to a higher revenue as far as the days of the week was concerned.</p><p><strong>Monthly Revenue Analysis</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SML48QcvOsn0QPYRsLUxaw.png" /></figure><p>In January, revenue was at its lowest, totaling £1.4 million. However, October saw a significant surge with a 14% increase. November became the highest-revenue month, generating £1.7 million. In December, the total revenue dropped to £1.5 million.</p><p><strong>Yearly Revenue Analysis</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fwb2C55fBhSnSpyBa4B2Zw.png" /><figcaption>Chart showing yearly revenue</figcaption></figure><p>2023 was the best performing year with a revenue of £3M, compared to £2M in 2022. However, we cannot definitively conclude which year was the best overall since we only have revenue data for January 2024.</p><p><strong>KEY FINDINGS</strong></p><p><strong>Revenue Performance:</strong></p><p><strong>2023:</strong> Highest revenue year at £3M.</p><p><strong>2022:</strong> Revenue was £2M.</p><p><strong>2024:</strong> Only January data is available, making it difficult to compare yearly performance.</p><p><strong>Advertising Channels:</strong></p><p><strong>Paid Search:</strong> Largest expenditure but poor ROI, with a total spend of £5M resulting in £3M revenue, indicating a -41% loss. It drove high website sessions but had a low conversion rate (10%).</p><p><strong>Email:</strong> High conversion rate (26%) and substantial sessions, making it a top performer in both conversion rate and revenue.</p><p><strong>Other Channels: </strong>Affiliate (21% conversion), Direct (17% conversion), and Referral performed well in conversion rates. Social media and display ads were less effective.</p><p><strong>Channel Performance Rankings</strong></p><ol><li><strong>Conversion Rate:</strong> Email &gt; Affiliate &gt; Direct &gt; Referral &gt; Paid Search.</li><li><strong>Sessions:</strong> Paid Search &gt; Organic Search &gt; Email.</li><li><strong>Revenue Generation:</strong> Paid Search &gt; Email &gt; Organic Search &gt; Affiliate.</li></ol><p><strong>Device Categories</strong></p><ol><li><strong>Conversion Rate:</strong> Desktop (highest), Mobile (high), and Tablet (lowest).</li><li><strong>Sessions:</strong> Mobile had the most sessions, followed by Desktop, then Tablet.</li><li><strong>Revenue:</strong> Desktop and Mobile each generated £3M, while Tablet generated £125K.</li></ol><p><strong>Time-Based Revenue Trends:</strong></p><ol><li>Day of the Week: Monday generated the most revenue, while Saturday generated the least.</li><li>Monthly Trends: January had the lowest revenue at £1.4M. Revenue peaked in</li><li>November at £1.7M, with October and December also performing well.</li></ol><p><strong>RECOMMENDATIONS</strong></p><p>1. <strong>Channel Investments:</strong> While Paid Search drives significant website sessions, its low conversion rate and negative ROI indicate inefficiency. NewCo should consider reallocating a portion of the budget from Paid Search to channels with higher conversion rates for better ROI, such as Email, Affiliate, and Direct.</p><p>2. <strong>Device-Specific Campaigns:</strong> To maximize the effectiveness of email marketing, NewCo should tailor email campaigns to users across all device categories — mobile, desktop, and tablet. By optimizing email content for each device, NewCo can ensure a seamless user experience. Furthermore, encouraging users to make transactions on their desktops, which have the highest conversion rates, could enhance overall revenue.</p><p>3. <strong>Enhance Mobile Experience:</strong> Despite mobile devices accounting for the highest number of sessions, conversion rates on mobiles are lower than desktops. NewCo should focus on optimizing the mobile user experience, to ensure seamless navigation, faster loading times, and mobile-responsive designs to improve conversion rates.</p><p>4. <strong>Strategic Timing of Campaigns:</strong> Analyzing revenue trends by day of the week and month reveals insights into peak sales periods. NewCo should schedule promotional campaigns and offers during high-revenue days, such as Mondays and peak months like November, to maximize sales opportunities and revenue generation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44ad9bdc7b96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CHURN RISK ANALYSIS WITH RFM]]></title>
            <link>https://medium.com/@zehidata/churn-risk-analysis-with-rfm-a0e13a61ec38?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0e13a61ec38</guid>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Sun, 01 Oct 2023 23:03:07 GMT</pubDate>
            <atom:updated>2023-10-01T23:23:58.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrVOAAwAo1q8nHeufCKsEA.jpeg" /><figcaption><a href="https://app.powerbi.com/view?r=eyJrIjoiZDUwMWE0ZjktZTcxOS00ZWE4LTljMGQtM2M3NThkYTM3NGJhIiwidCI6IjA2NmM4OTg0LWZmOTgtNDM1NC04YTdhLWZhY2I1NGE0YjUyOSJ9">View Dashbaord in Power BI</a></figcaption></figure><p><em>This is the analysis of the GitHub documentation on Churn risk Analysis with RFM</em></p><p>Note: If you’re a non technical person reading this, Customers at risk of churn are those who are likely to stop using a company’s products or services in the near future, and RFM stands for</p><p><strong>Recency : </strong>Number of days since the last purchase.</p><p><strong>Frequency : </strong>Total number of orders.</p><p><strong>Monetary : </strong>Refers to the total amount of money spent by a customer.</p><h3>INTRODUCTION</h3><p>Often times, when business proprietors fail to identify customers who might churn, their enterprises experience financial losses, resulting in reduced profitability and overall sales performance. This negative impact on their financial health can even lead to bankruptcy in some cases.</p><p>In order to avoid this scenario, businesses must detect these customers at an early stage and implement preventative measures to retain their loyalty.</p><p>One of the many ways to prevent this from happening is through customer <strong>churn risk Analysis</strong> and this method will be used to help solve a similar problem faced by a retail store.</p><p><strong>Business Problem</strong></p><p>Shopsub Limited is an American Retail store that operates both in a physical setting and online. They are finding it difficult to segment their customers to assess their loyalty levels. They have the dataset that can be used to solve this problem, but don’t know how so an analyst aid was sought.</p><p>The proposed methodology to address this issue involves the following steps:</p><ol><li>Assigning RFM scores to each customer based on certain metrics.</li><li>Categorizing customers into 4 distinct groups from the results of the RFM.</li><li>Identifying customer segments that are at risk of churn.</li><li>Providing recommendations to help retain customers loyalty.</li></ol><p><strong>Dataset</strong></p><p>This project utilized a dataset sourced from <a href="https://www.kaggle.com/"><strong>KAGGLE</strong></a>, consisting of 2240 rows and 27 columns. Each row in the dataset corresponds to a distinct customer, while the columns provide various details about each customer, including a unique customer ID. The columns include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*WrW6ipCBrjxl9Cpr.jpeg" /></figure><h3>Cleaning and Transformation</h3><p>Here are some of the data cleaning and transformation procedures:</p><p><strong>Blank columns check:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*p8An4qH8Gp0VYUgv.png" /></figure><p>screenshot from local storage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/0*-N_GTk_wJ5cDFkuQ.png" /></figure><p>screenshot from local storage</p><p><strong>2. Outliers Check with Plotly</strong></p><p>Income column</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EOlapejuid%2F16.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EOlapejuid%2F16%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5b8eab743326307f1c98f22702a9810/href">https://medium.com/media/d5b8eab743326307f1c98f22702a9810/href</a></iframe><p>The 7 outliers found in the income column were replaced with the median value of the income column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/0*ToWmnbLCCWKlAm8d.png" /></figure><p>84% of all customers earn between $21k to $60k.</p><p><strong>marital status column</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EOlapejuid%2F14.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EOlapejuid%2F14%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/44707a28e4e5baa9136bb9137dd90987/href">https://medium.com/media/44707a28e4e5baa9136bb9137dd90987/href</a></iframe><p>Out of the outlier values, “The widow” will not be removed since it appears 76 times, while the others (“Alone,” “Absurd,” and “Yolo”) occur only 3, 2, and 3 times, respectively.</p><p><strong>Analysis of the marital_status column</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*s50nSgUKDaA_UJ-c.png" /></figure><p>Most customers are married, making up 39% of the total.</p><p><strong>Determining the ages of customers:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/0*HWuS_OEODmzFwXJy.png" /></figure><p>The next step is to check for outliers in the age column</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7EOlapejuid%2F16.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7EOlapejuid%2F16%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d5b8eab743326307f1c98f22702a9810/href">https://medium.com/media/d5b8eab743326307f1c98f22702a9810/href</a></iframe><p>129, 130, and 136 are outliers so they were removed.</p><p><strong>Introducing age_distribution column using IF() formula</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*rFpxaBtrOISGRrZ4.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*cg3cgFzrigbfQ8yT.png" /></figure><p>Majority of the customers are between the age of 55–66</p><p><strong>Calculating the number of children for each customer</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/0*kznjmzzvgdFLbwz3.png" /></figure><p>screenshot from local storage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*CCcMBuUBP3AsQdgM.png" /></figure><p>Other transformations done were:</p><ol><li>Calculating the number of years as customer and the month each customer joined using the dt_customer column.</li><li>Total spent by each customer</li><li>Assigning scores based on recency, frequency, response to campaign, and how high a customer spends.</li></ol><h3>ANALYSIS OF RFM</h3><p><strong>Recency (Number of days since last Purchase) :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*40wk0-O_4PsKqlrS.png" /></figure><p>If a customer’s recency is less than or equal to 10 days, they receive the highest score of 10 out of 10, indicating that they are very recent customers. As the recency value increases, the score decreases, with the lowest score being 1 for customers who haven’t interacted in a long time (more than 80 days in this case).</p><p><strong>Frequency : (Total number of purchases from all channels)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*FHevm9Ivo4Bk5S15.png" /></figure><p>The frequency of each customer was calculated by adding the total number of purchases made through all platform, in this case web purchases, deal purchases, store purchases and catalog purchases.</p><p>If a customer’s frequency is less than or equal to 5, they receive a score of 1 out of 10. This indicates that they are infrequent buyers. As the number of purchases increases, the score goes up. So, customers who have made more purchases receive higher scores. The highest score in this system is 10. Customers who have made a large number of purchases, such as more than 40, receive this top score, indicating that they are very frequent buyers and highly engaged the business.</p><p><strong>Monetary value</strong></p><p>Using the same step as before, customers who spent more receive higher scores than those that spend average or lesser than that.</p><p><strong>Assigning Loyalty name</strong></p><p>The RFM scores were added and this was used to segment customers into 4 distinct groups. The groups are</p><p><strong>Champions : </strong>Customers that have scores greater than 13.</p><p>17% of customers fall into this category.</p><p><strong>Loyal Customers : </strong>Customers that have RFM score between 9 and 13.</p><p>38% of customers fall into this category.</p><p><strong>Potential Loyalists : </strong>Customers that have RFM score between 6 and 8.</p><p>26% of customers fall into this category.</p><p><strong>Need Attention : </strong>Customers that score less than or equal to 5</p><p>19% of customers fall into this category.</p><p><strong>Key Finding</strong></p><p>There is a significant percentage of customers who are showing warning signs or characteristics that suggest they might leave the business in the future.</p><p><strong>RECOMMENDATIONS</strong></p><p><strong>Separate Database for Monitoring:</strong></p><p>Create a separate database or segment for at-risk customers. It allows you to focus your attention and efforts on monitoring and engaging with this specific group.</p><p><strong>Monitoring Purchase History for Discounts:</strong></p><p>Monitor what at-risk customers normally buy. This can help you identify their preferred products or services. Using this information, you can provide targeted discounts or special offers on the products they frequently purchase.</p><p><strong>Contacting Customers with Greater Recency:</strong></p><p>Contact customers with recency greater than the average. This is an excellent retention strategy. It shows that you value their continued engagement. When reaching out to these customers, you can inform them about new initiatives, product updates, or loyalty programs that are designed to enhance their experience and encourage them to stay loyal to your brand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0e13a61ec38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOTEL BOOKING DEMAND IN LISBON]]></title>
            <link>https://medium.com/@zehidata/hotel-booking-demand-in-lisbon-439463b203a1?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/439463b203a1</guid>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Tue, 12 Sep 2023 13:36:48 GMT</pubDate>
            <atom:updated>2023-09-12T18:20:57.711Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the full analysis of the GitHub documentation on hotel bookings in Lisbon, Portugal.</p><p><em>Note: This project is based on Analysis and Research.</em></p><p>All visualizations were done with Power BI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*wZth8HRBG9qM8asN0uUTNw.gif" /></figure><p>Have you ever wondered when is the best time of year to book a hotel room in Portugal? Or the optimal length of stay in order to get the best daily rate? This project aims to assist people in making informed decisions based on these specific factors.</p><p><strong>Project Scenario</strong> (<em>Please note that this scenario is fictional)</em></p><p>Jon Doe is planning to go on a vacation in Lisbon, Portugal. However, he lacks essential information about the most favorable month for his visit and the ideal duration of his stay to secure the best daily hotel rates.</p><p>His aim is to guarantee booking a hotel during the month when he can fully enjoy the weather and engage in activities like tourism, all while minimizing his expenses.</p><p><strong>Facts Check</strong> : <em>LISBON — Portugal was named “Best Tourist Destination in Europe” in the European edition of the World Travel Awards 2022, marking the fifth time in the last seven years.</em></p><h4><strong>DATASET</strong></h4><p>The dataset used for this project was sourced from <a href="https://www.kaggle.com/datasets/jessemostipak/hotel-booking-demand">Kaggle</a>, originally from the article <a href="https://www.sciencedirect.com/science/article/pii/S2352340918315191"><strong>Hotel Booking Demand Datasets</strong></a>, written by Nuno Antonio, Ana Almeida, and Luis Nunes for Data in Brief, Volume 22, February 2019.</p><p>It contains the hotel bookings of a resort and a city hotel in Lisbon, Portugal. Each observation in the dataset represents a hotel booking between the 1st of July 2015 and the 31st of August 2017, including bookings that effectively arrived and bookings that were canceled.</p><h4><strong>CLEANING</strong></h4><p>The dataset was clean for this purpose of analysis.</p><h4><strong>ANALYSIS</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KZpOOl5C3x3SpKtBU4Ta2w.png" /></figure><p>The months of August, July, and May consistently witnessed the most significant number of bookings over the past 2 years. Research conducted within Lisbon has confirmed that these months (August and July) coincide with the city’s summer season while in May, summer feels just around the corner and temperatures begin to climb.</p><p>Nevertheless, it’s worth considering that these periods may not be the most ideal choice to choose to go on a vacation, given that the city tends to be excessively crowded with tourists during this time, as per information obtained from the <a href="https://lisbonlisboaportugal.com/lisbon-tour/lisbon-weather-when-to-go-visit.html">Lisbon Portal</a>. This is also evidently shown in the bar chart considering the high bookings in these periods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*ig-oejBdpMTk9Cw7oZn4gQ.gif" /><figcaption>gif from Google</figcaption></figure><p>The summer season in Lisbon extends beyond just August and July. It includes the months of June and (September beginning to the middle). However, bookings during this timeframe are lower compared to other summer months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5yoTZVljMBag5hO_tV8gg.png" /><figcaption>image from Weather Spark</figcaption></figure><p>Further research was done on <a href="https://weatherspark.com/m/32022/6/Average-Weather-in-June-in-Lisbon-Portugal">Weather Spark</a> to study the temperature pattern of these periods. The picture above is the average hourly temperature in June in Lisbon. Usually from June 4, the country starts to experience warm hours. The length of the warm hours increases as the number of days increases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*N2cc9nuHjTd5hTI95L90Lg.png" /></figure><p>However, in September, the length of warm hours decreases as the number of days increases.</p><p><em>The Festas Santos Populares festival commences on June 3rd and extends through to June 14th in Lisbon.</em></p><h4><strong>BEST DAILY RATE</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*BHquwHGNSsn0BMIlQd_YLg.png" /></figure><p>Planning the best month for a vacation is not the only consideration; another significant factor is the expenses associated with accommodation. An analysis of the average daily rate in relation to the number of weekend nights can help uncover patterns that lead to a more meaningful final recommendation. The scatter plot reveals a resemblance to a sine wave. The sine wave indicates that there is a recurring pricing pattern depending on the number of weekends used.</p><p>To be able to get the best daily rate, the minimum value or trough will be considered, but further analysis revealed that few data points fall into that point. This can be considered an outlier and it’s not sufficient to make a reliable decision. Adding data points closer to the trough value and then taking the mean (average) of those points can be used to get around this.</p><p>The best average rate reached was <strong>$25 </strong>which coincides with 12 weekend nights (42 days).</p><p>Another suitable daily rate is the one that falls just below the average line. This corresponds to 17 days and an average daily rate of $68.5</p><p><strong>Recommendations to John Doe and other tourists</strong></p><ol><li>June and September offer an ideal time to visit Lisbon if you prefer a tranquil experience with a higher chance of securing hotel accommodations without overcrowding. On the other hand, if you don’t mind bustling crowds, July and August are also suitable months to explore the city.</li><li>The optimal length of days to stay to get the best daily rate if you&#39;re having an extended vacation is 42 days. On the other hand, if you&#39;re just around for a not-so-long vacation, you can get the best daily rate if you stay for 17 days.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=439463b203a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Microsoft Excel for Effective Payroll Management System]]></title>
            <link>https://medium.com/@zehidata/using-microsoft-excel-for-effective-payroll-management-system-22af11c92952?source=rss-950f5d94c0f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/22af11c92952</guid>
            <dc:creator><![CDATA[Zehida Thabit]]></dc:creator>
            <pubDate>Thu, 13 Jul 2023 19:19:59 GMT</pubDate>
            <atom:updated>2023-07-16T07:48:39.153Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*J2S2auKwVpSoCyBTlRJQhQ.jpeg" /><figcaption>image from Google</figcaption></figure><p>Grab your coffee, it’s going to be a long ride! 😁</p><p><strong>Please note that this scenario is entirely fictional and should not be used for any deceptive purposes.</strong></p><p>It all started on a Monday when I woke up from a nap to check my LinkedIn notifications, and a message popped up from John Doe. What does John Doe have for me? Well, John Doe is a representative from a tech start-up. According to him, the start-up grew from 0 to 60+ employees in just a month, and they’ve been struggling to manage the payroll of their employees for the month of March. Fortunately, he came across my LinkedIn profile and thought I would be a great fit for the job. We had a brief discussion that went like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*cNxJ1NFYEwiy94nH2Jio_w.png" /><figcaption>Image made with fake LinkedIn chat generator</figcaption></figure><p>Fast forward to Monday, we had a call to discuss everything about the project in detail, and we reached an agreement that I would deliver the project in 48 hours. On the second day, around 6:45 am, I received an email from John Doe that read, “Find attached the dataset for our company. It includes the necessary details for each employee.”</p><p>Alright, let’s get started. Remember, I now have less than 48 hours to complete this task. 😅</p><p><strong>Main Objectives of the Project:</strong></p><ol><li>Tracking employees’ overtime accurately: Any employee working between 31 to 40 hours per week is considered to be working overtime, and they should be given 1/4 of their hourly wage.</li><li>Getting the statistics of the number of people in each department.</li><li>Finding the top 10 net pay for March.</li><li>Identifying the top 3 earners.</li></ol><p><strong>Overview of My Dataset:</strong></p><p>The dataset was provided in an xlsx format, which made things easier from the start. I opened it on my system and found that it contained just one sheet named “Sheet 1.” My first step was to rename the sheet to “Employees Details” for clarity.</p><p>Next, I wanted to get an overview of what the dataset looked like. However, the columns appeared to be disorganized. To fix this, I used the shortcut <strong>CTRL+A </strong>and then pressed <strong>ALT+H+O+I</strong>, which automatically adjusted the columns to fit the data.</p><p><strong>Before adjustment:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*tpOuwqsiJWQT9bLqj1QTsQ.png" /><figcaption>screenshot from local storage</figcaption></figure><p><strong>After adjustment:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RwGoaYexu-ybQTFFUng3MQ.png" /><figcaption>screenshot from local storage</figcaption></figure><p>Now that the dataset is looking better, let’s examine its contents. The dataset has 10 columns: first_name, last_name, gender, department, amount, hours_worked (1st week), hours_worked (2nd week), hours_worked (3rd week), and hours_worked (4th week).</p><p><strong>Validating the Data Type of Each Column:</strong></p><p>I checked each column and noticed that they were all in the ‘General’ format, but there was more to it than meets the eye. I needed to change the data type of certain columns to ensure accurate calculations. Specifically, I changed the data type of first_name, last_name, gender, and department to ‘Text,’ and employee_id and all the working hours to ‘General.’ Additionally, I formatted the amount column as currency in USD. With these adjustments, the dataset was ready for further processing.</p><p><strong>1st Week of March</strong>: To provide a detailed overview, I decided to calculate the necessary values for each week individually, rather than summing up the weekly_hours_worked and getting gross pay and net pay. To do this, I first created five new columns after the ‘hours_worked (1st week)’ column. But don’t worry, I didn’t create these columns manually; Excel has a shortcut for that too! 😉</p><p>I selected the four columns next to the ‘hours_worked (1st week)’ and used the shortcut <strong>CTRL+SHIFT++</strong>. This automatically added four new columns to the sheet.</p><p>Voilà, there we have it! 😊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LVmJiPfntf3cc26f0_vqeA.png" /><figcaption>screenshot from local storage</figcaption></figure><p>Ah, I see you’ve caught me!👀 I apologize for neglecting to mention the source of my dataset.</p><p>In reality, I utilized a <a href="http://random-name-generator.info/">random generator</a> to create the names and genders of the employees. Now, you might be curious about how I generated the weekly hours worked and the corresponding wages. Well, that’s where the <strong>RANDBETWEEN()</strong> function came into play.</p><p>I established a range between 19 and 40 hours as the minimum and maximum limits for hours worked, respectively. For instance, I used the formula =RANDBETWEEN(19, 40) to generate the values. Similarly, I employed the same approach for the weekly wages, but this time I set the range between $15 and $26 using the formula RANDBETWEEN(15, 26). This ensured that the wages fell within the desired minimum and maximum thresholds.</p><p>Click <a href="https://github.com/mademoixcel/Payroll/blob/main/dataset%20for%20practice.xlsx">here</a> to download the dataset.</p><p><strong>Please note that I copied the randomly generated numbers and pasted them as values to prevent the system from regenerating new random numbers whenever specific actions, such as sorting, are performed.</strong></p><p>Let’s get back to our calculations. Now, I’m required to calculate the following for each week:</p><ul><li>Weekly wage</li><li>Overtime</li><li>Overtime payment</li><li>Total payment (gross)</li></ul><p><strong>Weekly Wage:</strong></p><p>To calculate the weekly wage, I multiplied the amount earned per hour by the number of hours worked and then double-clicked to fill down the formula for all rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTkKkSVxu08PsauQL8BvWQ.png" /><figcaption>screenshot from local storage</figcaption></figure><p><strong>Overtime, Overtime Payment, and Total Weekly Payment (Gross):</strong></p><p>To determine the overtime payment for employees who worked between 31 to 40 hours, I used the IF formula: =IF(hours_worked_per_week &gt; 30, weekly_hours_worked — 30, 0). This formula subtracts 30 from the weekly_hours_worked only if it exceeds 30; otherwise, it returns 0 for employees who didn’t work between 31 to 40 hours.</p><p>For calculating the overtime payment, I used the formula =(0.25 * weekly_wage * overtime). This calculates 1/4th of the weekly wage for employees who worked overtime. Next, I calculated the weekly gross payment by adding the overtime payment to the weekly wage. Finally, I gave color to all the columns for the 1st week of March, added a title, and ended up with this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUtopRZXbH_7E7wJUAUPRw.png" /><figcaption>screenshot from local storage</figcaption></figure><p>I repeated the same calculations for the rest of the weeks in March, including weekly_wage, overtime, overtime_payment, and total_payment (gross), then converted my spreadsheet into a table using <strong>CTRL+T</strong> and specifying that my table had headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NcajVd3S5R8G1pq0DG86cQ.png" /><figcaption>screenshot from local storage</figcaption></figure><p>Tip: You can use relative and absolute referencing to quickly navigate through this process. 😎 Read about relative and absolute referencing <a href="https://edu.gcfglobal.org/en/excel/relative-and-absolute-cell-references/1/">here</a>.</p><p><strong>Total Gross Pay, Tax, and Net Pay</strong>: To calculate the total gross pay, I summed up all the gross payments for each week. The next step was to apply a 10% tax to the gross payments, which was instructed. I achieved this by using the formula =(0.1 * gross_payment). Finally, I calculated the net pay by subtracting the tax from the gross pay.</p><p>Alright, It’s 10 PM already. Let me refill my coffee. Take a break to refill yours as well before I continue😁.</p><p>Hold up…. I just received another email from John Doe!</p><p>It read:</p><p>“ Hi Zehida,</p><p>I apologize for not including this earlier, but would it be possible for you to incorporate a VLOOKUP function that specifically displays the employee ID, first name, last name, department, and gender? We would greatly appreciate it if you could handle this task.</p><p>Sincerely,</p><p>John Doe”</p><p>Quickly refilling my coffee to ensure I stayed focused, I acknowledged the email and shifted my attention back to the calculations at hand.</p><p>Now, onto the questions!</p><p><strong>QUESTIONS</strong></p><ol><li><strong>How many males and females do we have in total?</strong></li></ol><p>To answer this question, I created a pivot table. The result showed that there were 52 males and 35 females. Overall, there are 87 people in the organization. Alternatively, you can use the <strong>COUNTIF()</strong> function, using ‘Male’ and ‘Female’ as criteria for each COUNTIF().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DC4T452F7MHlxT0hy_baCQ.png" /></figure><p><strong>2.</strong> <strong>How many people are in each department?</strong></p><p>Similarly, I created a pivot table to obtain the statistics of the number of people in each department. I then used Figma to visualize the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wq8AzbLtydxEeCAxRkSdwA.png" /></figure><p>The marketing department has the highest number of employees (15), while sales and business development have the least (9).</p><p><strong>3. What are the top 10 net pay amounts for March?</strong></p><p>There are two ways you can achieve this. You can create a pivot table or directly sort the net pay column in descending order within the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*fsmZOYIiZUhprRwKt_gSuw.png" /></figure><p><strong>4. Who are the top 3 earners?</strong></p><p>The top 3 earners for March are as follows:</p><ol><li><strong>Bobby Robinson</strong> from the Sales and Business Development Department, with a monthly net pay of $3,510.00.</li><li><strong>Christina Jackson</strong> from the Sales and Business Development Department, with a monthly net pay of $3,369.90.</li><li><strong>Donna Diaz </strong>from the Product Development Department, with a monthly net pay of $3,287.70.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zmUbalviT9ClBk9OiUudw.png" /><figcaption>image created with Figma</figcaption></figure><p><strong>4. VLOOKUP INCORPORATION:</strong></p><p>To successfully create a VLOOKUP, you need to consider four essential arguments. Firstly, there is the “lookup value,” which represents the value you wish to search for. Next, the “table array” is typically the entire spreadsheet, although exceptions exist. The “col_index_num” refers to the index number of the lookup value, while the “range_lookup” is set to 0 for an exact match or 1 for an approximate match.</p><p>Now, in order to streamline the process, I decided to implement a dropdown list, allowing for easy selection of the employee ID. And of course, I utilized my trusty shortcuts to expedite the task. To create the dropdown list in Excel, I used the <strong>ALT+D+L</strong> shortcut. For the validation criteria, I selected “list” and used the employee ID as the source. Once the list was created, I proceeded to construct the VLOOKUP. Click <a href="https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1">here</a> to read more about the VLOOKUP function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*mpFfSmF5tmupkvG5X35Vww.png" /></figure><p><strong>Additional Information:</strong></p><p>I provided summary statistics such as AVERAGE, MINIMUM, MAXIMUM, and SUM for each column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8lVt9oJqoTbC8BE2woO7w.png" /><figcaption>screenshot from local storage</figcaption></figure><p>Find the link to the GitHub repository of this project <a href="https://github.com/mademoixcel/Payroll">here</a>.</p><p>Alright, It’s 48 hours already….Guys, it’s John Doe again. 😅</p><p>To be continued….</p><p>If you found it helpful, please give it a clap. 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22af11c92952" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>