<?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 Joseph Jacobs on Medium]]></title>
        <description><![CDATA[Stories by Joseph Jacobs on Medium]]></description>
        <link>https://medium.com/@joejacobs_?source=rss-339719b15c91------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xqaBKzMg-aK4X6XPwGeQsw.jpeg</url>
            <title>Stories by Joseph Jacobs on Medium</title>
            <link>https://medium.com/@joejacobs_?source=rss-339719b15c91------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:38:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joejacobs_/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[MARVEL VS DC: A MOVIE PERFORMANCE ANALYSIS]]></title>
            <link>https://medium.com/@joejacobs_/marvel-vs-dc-a-movie-performance-analysis-d07626ad056b?source=rss-339719b15c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/d07626ad056b</guid>
            <category><![CDATA[movie-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Joseph Jacobs]]></dc:creator>
            <pubDate>Sat, 06 Jul 2024 18:34:53 GMT</pubDate>
            <atom:updated>2024-07-06T18:34:53.985Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Two distinct movie universes, each with studios producing blockbuster hits and iconic characters, are perpetually debated by fans over which is superior. In this analysis, we will explore how both franchises have fared and determine the best based on the data provided.</p><h3><strong>Data Dictionary</strong></h3><p>The dataset comprises a total of 226 rows and 23 columns. The columns contained in the dataset are:</p><p><strong>Film:</strong> Name of Movie.</p><p><strong>U.S release date:</strong> Date movie was released in the US.</p><p><strong>Box office gross:</strong> Domestic (U.S and Canada) earnings</p><p><strong>Box office gross Other territories:</strong> Earnings in countries outside North America.</p><p><strong>Box office gross Worldwide:</strong> Worldwide Earnings.</p><p><strong>Budget:</strong> Movie budget amount.</p><p><strong>MCU:</strong> True/False, identifying if the movie is a MCU (Marvel Cinematic Universe) movie.</p><p><strong>Phase:</strong> MCU phases.</p><p><strong>Distributor:</strong> Movie Distributors.</p><p><strong>MPAA Rating:</strong> Viewers Rating.</p><p><strong>Length:</strong> Movie length in hours.</p><p><strong>Minutes:</strong> Movie length in minutes.</p><p><strong>Franchise:</strong> Either Marvel or DC.</p><p><strong>Character Family:</strong> Movie characters.</p><p><strong>Domestic %:</strong> Percentage of movie performance domestically.</p><p><strong>Gross to Budget:</strong> Ratio of total earning to budgets.</p><p><strong>Rotten Tomatoes Critic Score:</strong> Rotten Tomatoes Movie Score.</p><p><strong>Male/Female-led:</strong> Gender of lead character.</p><p><strong>Year:</strong> Movie release year.</p><p><strong>Inflation Adjusted Worldwide Gross:</strong> Amount of Gross inflation.</p><p><strong>Inflation Adjusted Budget:</strong> Inflation Budget Amount.</p><p><strong>2.5x prod:</strong> amount of double grossing against budget.</p><p><strong>Break Even:</strong> Measure of success rate (Flop, Success).</p><ol><li><strong>Data Cleaning</strong></li></ol><ul><li>I used Microsoft Excel for cleaning the data. I checked for and removed duplicates and null values.</li><li>I also formatted the Release Date column to date format as some of the dates were in text format.</li></ul><p>2. <strong>Insights</strong></p><ul><li>Total number of movies from both franchises = 113 movies</li><li>Marvel has the highest number of movies = 72, with DC having a total number of 41 movies.</li><li>Box Office Gross Worldwide from both franchises totaled $59,888,437,830. Marvel and DC grossed $44,752,644,897 and $15,135,792,933, respectively. It can be deduced that Marvel grossed the highest worldwide.</li><li>Character Lead: The Men had more movies in both franchise and grossed more than the women.</li><li>Marvel had a higher Rotten Tomatoes Critic Score than DC. Their Average Rotten Tomatoes Critic Score was 65 and 58, respectively.</li><li>In terms of Top 10 grossing movies worldwide, Marvel occupied 9 positions with only 1 DC movie, Aquaman, making the list.</li><li>Box Office Trends: The trend of box office gross over the years shows a significant increase for both franchises, with Marvel consistently outperforming DC.</li><li>MPAA Rating: DC had more family oriented movies than Marvel. While Marvel had more R-rated and PG-13 movies than DC.</li></ul><h3><strong>Visualization</strong></h3><p>Visualization of data was performed using Microsoft Excel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-hAb5jgCZJhFAH03EaJJwA.png" /><figcaption>Movie Performance Analysis Dashboard</figcaption></figure><h3><strong>Conclusion</strong></h3><p>The data unequivocally shows that Marvel movies have done better than DC movies in terms of box office receipts and the quantity of profitable releases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d07626ad056b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Heart Attack Analysis using SQL]]></title>
            <link>https://medium.com/@joejacobs_/heart-attack-analysis-using-sql-aaf767394610?source=rss-339719b15c91------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaf767394610</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-exploration]]></category>
            <dc:creator><![CDATA[Joseph Jacobs]]></dc:creator>
            <pubDate>Sun, 18 Jun 2023 00:03:22 GMT</pubDate>
            <atom:updated>2023-06-18T21:38:45.319Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*jzmI9SBzQeTo79AZz_-C3A.jpeg" /><figcaption>Source: <a href="https://www.mountsinai.org/health-library/injury/heart-attack-first-aid">Mount Sinai</a></figcaption></figure><p>A heart attack is an urgent medical situation. It usually occurs when a blood clot obstructs the heart’s blood supply. Without blood, tissue dehydrates and deteriorates. Treatment may involve medications, medical procedures such as angioplasty or stent placement to open the blocked artery, and lifestyle changes to reduce the risk of future heart problems.</p><h4>Approach to the Project</h4><p>In this article, I assume the role of a Healthcare Data Analyst and carry out exploratory data analysis of Heart Attack dataset of a hospital. From this analysis, insights on the causes of heart diseases is gotten. The dataset used in this analysis was gotten from <a href="https://www.kaggle.com/datasets/rashikrahmanpritom/heart-attack-analysis-prediction-dataset">Kaggle</a>, and it contains information such as: age, sex, resting blood pressure, exercise induced angina, number of major vessels, chest pain type, cholesterol, fasting blood sugar, resting electrocardiographic result, maximum heart rate, ST depression, thallium stress test, slope peak exercise and output.</p><p>I used MS SQL Server to clean the dataset and carry out the data exploration on the dataset.</p><p>This article is divided into several stages: data cleaning, data exploration, insights and recommendation stage.</p><h4>Data Cleaning</h4><p>To gain insights from a dataset, it is important to ensure the dataset is clean enough for doing that. The data cleaning process involves handling missing values, correcting inconsistencies, and formatting the data for analysis. In this project, I ensured the dataset was thoroughly cleaned to ensure the accuracy and integrity of our findings.</p><ol><li>Checking if there are duplicate rows</li></ol><pre>SELECT age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output<br>FROM PersonalProject..HeartAttack <br>GROUP BY age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output<br>HAVING COUNT(*) &gt; 1;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*rs2-gf2hGjtbF_cA4QHQGg.png" /><figcaption>The query returns a duplicate row</figcaption></figure><p>The duplicate row has to be removed to ensure accuracy</p><pre>-- Dropping the duplicate row<br>WITH CTE AS (<br>  SELECT age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output,<br>         ROW_NUMBER() OVER (PARTITION BY age, sex, cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall, output ORDER BY (SELECT 0)) AS RowNumber<br>  FROM PersonalProject..HeartAttack<br>)<br>DELETE FROM CTE WHERE RowNumber &gt; 1;</pre><p>2. Checking for null values</p><pre>SELECT *<br>FROM PersonalProject..HeartAttack<br>WHERE age IS NULL <br> OR sex IS NULL <br> OR cp IS NULL <br> OR trtbps IS NULL <br> OR chol IS NULL <br> OR fbs IS NULL <br> OR restecg IS NULL <br> OR thalachh IS NULL <br> OR exng IS NULL <br> OR oldpeak IS NULL <br> OR slp IS NULL <br> OR caa IS NULL <br> OR thall IS NULL <br> OR output IS NULL;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*YNKq2PL8k1lRWl7fdk49Kg.png" /><figcaption>The query returns an empty table, showing there are no null values.</figcaption></figure><p>3. Next step in the data cleaning stage is renaming of columns for better readability and understanding.</p><p>The columns to be renamed are : cp, trtbps, chol, fbs, restecg, thalachh, exng, oldpeak, slp, caa, thall</p><pre>BEGIN TRANSACTION;<br><br>EXEC sp_rename &#39;PersonalProject..HeartAttack.cp&#39;, &#39;chest_pain_type&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.trtbps&#39;, &#39;resting_blood_pressure&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.chol&#39;, &#39;cholestoral&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.fbs&#39;, &#39;fasting_blood_sugar&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.restecg&#39;, &#39;resting_electrocardiographic&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.thalachh&#39;, &#39;maximum_heart_rate&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.exng&#39;, &#39;exercise_induced_angina&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.oldpeak&#39;, &#39;ST_depression&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.slp&#39;, &#39;slope_peak_exercise&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.caa&#39;, &#39;number_of_major_vessels&#39;, &#39;COLUMN&#39;;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.thall&#39;, &#39;thalium_stress_test&#39;, &#39;COLUMN&#39;;<br><br>COMMIT;</pre><p>Viewing renamed columns:</p><pre>SELECT *<br>FROM PersonalProject..HeartAttack</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NfZ4JoJrzdsd3PBDaAaow.png" /><figcaption>a section of renamed columns</figcaption></figure><p>4. Adding feature values to the columns. This will aid better understanding of the dataset. For the other columns where feature values will be added, new columns has to be created for them and then the feature values added</p><pre>--Adding feature values for sex<br><br>ALTER TABLE PersonalProject..HeartAttack<br>ADD sex_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET sex_new = CASE<br>    WHEN sex = 0 THEN &#39;Female&#39;<br>    WHEN sex = 1 THEN &#39;Male&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN sex;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.sex_new&#39;, &#39;sex&#39;, &#39;COLUMN&#39;;</pre><pre>--Adding feature values for chest_pain_type<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD chest_pain_type_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET chest_pain_type_new = CASE<br>    WHEN chest_pain_type = 0 THEN &#39;typical angina&#39;<br>    WHEN chest_pain_type = 1 THEN &#39;atypical angina&#39;<br>    WHEN chest_pain_type = 2 THEN &#39;non-anginal pain&#39;<br> WHEN chest_pain_type = 3 THEN &#39;asymptomatic&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN chest_pain_type;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.chest_pain_type_new&#39;, &#39;chest_pain_type&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for fasting_blood_sugar<br><br>ALTER TABLE PersonalProject..HeartAttack<br>ADD fasting_blood_sugar_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET fasting_blood_sugar_new = CASE<br>    WHEN fasting_blood_sugar = 0 THEN &#39;&lt;120 mg/dl&#39;<br>    WHEN fasting_blood_sugar = 1 THEN &#39;&gt;120 mg/dl&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN fasting_blood_sugar;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.fasting_blood_sugar_new&#39;, &#39;fasting_blood_sugar&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for  resting_electrocardiographic<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD resting_electrocardiographic_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET resting_electrocardiographic_new = CASE<br>    WHEN resting_electrocardiographic = 0 THEN &#39;normal&#39;<br>    WHEN resting_electrocardiographic = 1 THEN &#39;ST-T wave abnormality&#39;<br>    WHEN resting_electrocardiographic = 2 THEN &#39;ventricular hypertrophy&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN resting_electrocardiographic;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.resting_electrocardiographic_new&#39;, &#39;resting_electrocardiographic&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for exercise_induced_angina<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD exercise_induced_angina_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET exercise_induced_angina_new = CASE<br>    WHEN exercise_induced_angina = 0 THEN &#39;no&#39;<br>    WHEN exercise_induced_angina = 1 THEN &#39;yes&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN exercise_induced_angina;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.exercise_induced_angina_new&#39;, &#39;exercise_induced_angina&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for slope_peak_exercise<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD slope_peak_exercise_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET slope_peak_exercise_new = CASE<br>    WHEN slope_peak_exercise = 0 THEN &#39;upsloping&#39;<br>    WHEN slope_peak_exercise = 1 THEN &#39;flat&#39;<br>    WHEN slope_peak_exercise = 2 THEN &#39;downsloping&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN slope_peak_exercise;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.slope_peak_exercise_new&#39;, &#39;slope_peak_exercise&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for thalium_stress_test<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD thalium_stress_test_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET thalium_stress_test_new = CASE<br>    WHEN thalium_stress_test = 0 THEN &#39;normal 0&#39;<br>    WHEN thalium_stress_test = 1 THEN &#39;normal 1&#39;<br>    WHEN thalium_stress_test = 2 THEN &#39;fixed defect&#39;<br> WHEN thalium_stress_test = 3 THEN &#39;reversible defect&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN thalium_stress_test;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.thalium_stress_test_new&#39;, &#39;thalium_stress_test&#39;, &#39;COLUMN&#39;;<br><br><br>-- Adding feature values for output<br>ALTER TABLE PersonalProject..HeartAttack<br>ADD output_new VARCHAR(50);<br><br>UPDATE PersonalProject..HeartAttack<br>SET output_new = CASE<br>    WHEN output = 0 THEN &#39;no disease&#39;<br>    WHEN output = 1 THEN &#39;disease&#39;<br>    END;<br><br>-- Dropping the old column<br>ALTER TABLE PersonalProject..HeartAttack<br>DROP COLUMN output;<br><br>-- Rename the new column<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.output_new&#39;, &#39;output&#39;, &#39;COLUMN&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*wIt4WRYY6wRhN1vMUQRWyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*Um2IAhgqDeyp6FEOx9I8yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/66/1*rs7g9uwD6GEH_mu81Mq6rg.png" /><figcaption>Feature values added to renamed columns</figcaption></figure><p>5. I noticed that the name I gave to some columns were wrong, so I had to rename it to the right name.</p><pre>EXEC sp_rename &#39;PersonalProject..HeartAttack.cholestoral&#39;, &#39;cholesterol&#39;, &#39;COLUMN&#39;<br>EXEC sp_rename &#39;PersonalProject..HeartAttack.thalium_stress_test&#39;, &#39;thallium_stress_test&#39;, &#39;COLUMN&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*8j-8-PydU1zvGfnDZOTcYQ.png" /></figure><h4>Data Exploration</h4><p>Answering business questions.</p><ol><li>What is the average age of patients?</li></ol><pre>SELECT CAST(AVG(age) AS INTEGER) as AverageAge<br>FROM PersonalProject..HeartAttack</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/1*JBFTELbhATWL6TuHZmxM8w.png" /></figure><p>The average age of patients in this dataset is 54.</p><p>2. What is the number of male and female patients?</p><pre>SELECT sex, COUNT(*) AS TotalNumberOfPatients<br>FROM PersonalProject..HeartAttack<br>GROUP BY sex</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*mjoqJTCiBQvD4XVAg1531w.png" /></figure><p>The number of male and female patients is 206 and 96, respectively. This shows that more male patients were recorded than females for this analysis.</p><p>3. What is the result of the thallium_stress_test for each sex?</p><pre>SELECT sex, thallium_stress_test, COUNT(thallium_stress_test) AS TotalThalliumStressTest<br>FROM PersonalProject..HeartAttack<br>GROUP BY sex, thallium_stress_test<br>ORDER BY sex</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*j3NR6trDWxjy04Ci-traBg.png" /></figure><p>The result suggests that there are more male patients that have reduced blood flow during exercise (and at rest) compared to the female patients.</p><p>4. Which sex had the most patients with heart diseases?</p><pre>SELECT sex, COUNT(*) AS CountDisease<br>FROM PersonalProject..HeartAttack<br>WHERE output = &#39;disease&#39;<br>GROUP BY sex<br>ORDER BY CountDisease DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*TkJMo6GlAxX3BdF59TueiA.png" /></figure><p>From the results, it shows that there are more male patients with heart diseases than there are female patients.</p><p>5. Which sex has the highest cholesterol level?</p><pre>SELECT sex, CAST(AVG(cholesterol) AS INTEGER) AS AverageCholesterol<br>FROM PersonalProject..HeartAttack<br>GROUP BY sex<br>ORDER BY AverageCholesterol DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*vRoo0yG38W7tx9YiOmnM6w.png" /></figure><p>Female patients were found to have the highest cholesterol level among both sexes.</p><p>6. What Chest pain type resulted more in no heart disease?</p><pre>SELECT chest_pain_type, COUNT(*) AS CountofNoDisease<br>FROM PersonalProject..HeartAttack<br>WHERE output = &#39;no disease&#39;<br>GROUP BY chest_pain_type</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*hq0YNxH8mFSn-sCL131U1A.png" /></figure><p>Amongst the four types of chest pain the patients had, typical angina chest pain mostly resulted to no heart disease.</p><p>7. Which thallium stress test led to higher incidence of heart disease?</p><pre>SELECT thallium_stress_test, COUNT(*) AS DiseaseCount<br>FROM PersonalProject..HeartAttack<br>WHERE output = &#39;disease&#39;<br>GROUP BY thallium_stress_test<br>ORDER BY DiseaseCount DESC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/209/1*dkDQtTvQjt4NOSpKx4gnbA.png" /></figure><p>Patients with fixed defect were diagnosed with a heart disease.</p><p>8. Is there a relationship between the number of major vessels healthy and the occurrence of heart disease?</p><pre>SELECT number_of_major_vessels, COUNT(*) AS DiseaseCount<br>FROM PersonalProject..HeartAttack<br>WHERE output = &#39;disease&#39;<br>GROUP BY number_of_major_vessels<br>ORDER BY number_of_major_vessels;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*5Y1U64z07cmzmzJH_Tty3A.png" /></figure><p>There is a negative correlation between number of major vessels healthy and the occurrence of heart disease. The higher the number of healthy major vessels, the lesser the occurrence of heart disease.</p><h4>Insights</h4><ul><li>The average age of patients is 54</li><li>The number of male and female patients are 206 and 96, respectively.</li><li>There are more male patients that have reduced blood flow during exercise (and at rest) compared to the females.</li><li>There are more male patients with heart disease than there are female patients.</li><li>Female patients have higher cholesterol level compared to the male patients.</li><li>Most patients that had the typical angina chest pain did not have an heart disease.</li><li>Fixed defect — a reduced or absent thallium both during exercise and at rest- resulted to the most incidence of heart diseases</li><li>The higher the number of healthy major vessels, the lesser the occurrence of heart disease and vice-versa</li><li>Patients with lower or no healthy major vessels were more likely to have a heart disease.</li></ul><h4>Recommendations</h4><ol><li>Females should be advice to reduce their cholesterol consumption to no more than 300mg per day. They should also be adviced to focus on maintaining a heart-healthy diet that includes a variety of fruits, vegetables, whole grains, lean proteins, and healthy fats.</li><li>Medications, improved lifestyle, revascularization — which is done to restore normal blood flow to affected areas of the body and cardiac rehabilitation programs that involve exercise, education, and support can help improve heart health and manage the condition.</li><li>More attention should be placed on the male patients to help improve their heart health and prevent occurences that could lead to heart diseases/attack.</li></ol><p>By implementing these recommendations, the hospital can help improve the heart health of her patients and manage the condition of patients already diagnosed with a heart disease.</p><p><strong>Thank you for reading this article.</strong></p><h4>Relevant links</h4><p><a href="https://github.com/thejoejacobs/Heart-Attack-Analysis/blob/main/HeartAttack%20Analysis.sql">SQL Query</a></p><p><a href="http://www.linkedin.com/in/joseph-c-jacobs/">LinkedIn</a></p><p><a href="https://github.com/thejoejacobs">Github</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaf767394610" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>