<?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 Victoria Akintomide on Medium]]></title>
        <description><![CDATA[Stories by Victoria Akintomide on Medium]]></description>
        <link>https://medium.com/@oluwabamise44?source=rss-4c4026d76ce1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zpmxdVUstt8rmgAw.jpg</url>
            <title>Stories by Victoria Akintomide on Medium</title>
            <link>https://medium.com/@oluwabamise44?source=rss-4c4026d76ce1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 05:57:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oluwabamise44/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[My SCAMP Final Project — A Simple Movie Recommender System with Python]]></title>
            <link>https://oluwabamise44.medium.com/my-scamp-final-project-a-simple-movie-recommender-system-with-python-ea08d9bf3417?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea08d9bf3417</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning-python]]></category>
            <category><![CDATA[movie-recommendation]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Thu, 20 May 2021 16:30:54 GMT</pubDate>
            <atom:updated>2021-05-22T00:24:27.053Z</atom:updated>
            <content:encoded><![CDATA[<h3>My SCAMP Final Project — A Simple Movie Recommender System with Python</h3><p>SCAMP — She Code Africa Mentoring Program</p><p>Three months ago, I enrolled in the Data Science Track of the SCAMP. As a data enthusiast, I was looking forward to the network and mentorship. I was particularly excited about the cool projects I could work on as a data science mentee. For my final project, I decided on a simple movie recommender system as I was fascinated with the content recommendation systems on YouTube and Netflix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*kg4XYpeuy4Ua9ntRRVl9zQ.jpeg" /></figure><p><strong>Contents</strong></p><ul><li>Introduction</li><li>Dataset</li><li>Methodology</li><li>Results</li><li>Conclusion</li><li>References</li></ul><p><strong>Introduction</strong></p><p>A popular application of data science is a recommender system. Recommender systems are used to predict the “rating” or “preference” that a user would give to an item. They are applied by tech companies in different forms. Amazon uses it to suggest products to customers and YouTube uses it to decide which video to play next on autoplay.</p><p>A recommender system is a filtration program with the primary objective of predicting a user’s preference for a domain-specific object or item. The domain-specific item in this project is a movie, so the main goal of this recommendation system is to filter and predict only those movies that a user would prefer based on some information about the user.</p><p>There are two major types of filtration; Content-based Filtering and the Collaborative Filtering.</p><ul><li>Content-based filtering is based on provided about the items. The algorithm recommends products that are<strong> </strong>similar to the ones that a user has liked in the past. This similarity is computed from the data we have about the items as well as the user’s past preferences. The disadvantage of this type is that the user is not exposed to a wide of range of products.</li><li>Collaborative Filtering is a filtration strategy that is based on the combination of the user’s behavior and comparing and contrasting that with other users’ behavior in the database. The history of all users<strong> </strong>plays an important role in this algorithm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*iWIpcL83Bhm-gvnkvrlQ0Q.png" /></figure><p>The main difference between content-based filtering and collaborative filtering that in the latter, the interaction of all users with the items influences the recommendation algorithm while for content-based filtering only the concerned user’s data is taken into account.</p><p><strong>Dataset</strong></p><p>The dataset in this project is the MovieLens Latest Datasets. The dataset consists of movies released on or before August 2018. This dataset captures 100,000 ratings and 3,600 tag applications applied to 9,000 movies by 600 users.</p><p>This dataset consists of the following files:</p><ul><li><em>movies.csv</em>: This file contains information on ~9,000 movies featured in the Full MovieLens dataset. Each line of this file after the header row represents one movie, and has the following format: movieId, title, genres. Movie titles include the year of release in parentheses. Genres are a pipe-separated list.</li><li><em>tags.csv</em>: Each line of this file after the header row represents one tag applied to one movie by one user, and has the following format: userId, movieId, tag, timestamp. Tags are user-generated metadata about movies. Each tag is typically a single word or short phrase.</li><li><em>links.csv</em>: This file contains the TMDB and IMDB IDs of all the movies featured in the dataset. Each line of this file after the header row represents one movie, and has the following format: movieId, imdbId, tmdbId.</li><li><em>ratings.csv</em>: Each line of this file after the header row represents one rating of one movie by one user, and has the following format: userId, movieId, rating, timestamp. Ratings are made on a 5-star scale, with half-star increments (0.5 stars — 5.0 stars).</li><li><em>READ_ME.txt</em>: This file contains the data summary, citations, usage licenses and data descriptions for each csv file.</li></ul><p>The Full MovieLens Dataset comprises of 27 million ratings and 1,100,000 tag applications, applied to 58,000 movies by 280,000 users in this dataset. It also contains tag genome data with 14 million relevance scores across 1,100 tags. It can be accessed from the official <a href="https://grouplens.org/datasets/movielens/latest/">GroupLens website</a> and was last updated September 2018.</p><p><strong>Methodology</strong></p><p>In this project, I utilized Python libraries, Pandas, Numpy, Scikit Learn, SciPy. Google Colab which allows me to write and execute Python in my browser was used for code execution. I used the ratings.csv and movies.csv for this project. The first step was data importation into my Colab notebook.</p><pre>#importing required libraries<br>import pandas as pd</pre><pre>import numpy as np</pre><pre>import matplotlib.pyplot as plt</pre><pre>import seaborn as sns</pre><pre>#importing datasets<br>movies = pd.read_csv(&quot;movies.csv&quot;)</pre><pre>ratings = pd.read_csv(&quot;ratings.csv&quot;)</pre><p>The .head() command is then used to print the first 5 rows of each of the datasets.</p><pre>movies.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*LTa6EuBwAvWmtD3PKBrGFA.png" /></figure><pre>ratings.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*RetdQNYnQVO-asAsm-w51g.png" /></figure><p>From the above picture, it can be seen that user with userId 1 has watched movies with movieId 1, 3, 6, 47 and 50 and rated them 4.0, 4.0, 4.0, 5.0 and 5.0 respectively. But the user did not rate some movies like movieId 2, 4, 7 etc. To make this dataframe easier to interpret, I applied a pivot method on the ratings dataset, where columns represents the unique userId and the row represents each unique movieId.</p><pre>dataset = ratings.pivot(index=&#39;movieId&#39;,columns=&#39;userId&#39;,values=&#39;rating&#39;)</pre><pre>dataset.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*rxP93joz5CRqH5PRiCGebQ.png" /></figure><p>I impute the NaN values with zero values as they could create problems when feeding the machine learning algorithm. It is also easier to interpret for instance userId 1 has rated movieId 1 and 3, 4.0 respectively but has not rated movieId 2,4,5 at all.</p><pre>dataset.fillna(0,inplace=True)</pre><pre>dataset.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*czHaExdPcV4q9KdOQlhNcw.png" /></figure><p>Ratings are thinly distributed in the real world. To improve credibility of the system, I decided to reduce noise by filtering the dataset for movies that have been rated by a minimum of 10 users and users that have rated a minimum of 50 movies. Hence data points collected would be from very popular movies and highly engaged users. Aggregating the number of users who voted and the number of movies that were voted.</p><pre>no_user_voted = ratings.groupby(&#39;movieId&#39;)[&#39;rating&#39;].agg(&#39;count&#39;)<br>no_movies_voted = ratings.groupby(&#39;userId&#39;)[&#39;rating&#39;].agg(&#39;count&#39;)</pre><p>Filtering the dataset based on the threshold values; the number of votes by each user with our threshold of 50 and the number of votes by each user with our threshold of 50.</p><pre>dataset = dataset.loc[no_user_voted[no_user_voted &gt; 10].index,:]<br>dataset= dataset.loc[:,no_movies_voted[no_movies_voted &gt; 50].index]</pre><p>The final dataset has dimensions of 2121 rows by 378 columns with most of the values being sparse that is it contains mostly zero values. Sparsity is a problem for recommender system as it is very CPU- and memory-inefficient. I reduced the sparsity by using the csr_matrix function from the Scipy library.</p><pre>from scipy.sparse import csr_matrix</pre><pre>csr_data = csr_matrix(dataset.values)</pre><pre>dataset.reset_index(inplace=True)</pre><p>I used the KNN algorithm to compute similarity with cosine distance metric which is very fast and performs better than other metrics. The K-Nearest Neighbors is a widely used machine learning algorithm for both supervised and unsupervised machine learning problems. It is highly preferred because of easier interpretation of output and low calculation time. The unsupervised nearest neighbors algorithm which implements unsupervised nearest neighbors learning is used in this project. It acts as a uniform interface to three different nearest neighbors algorithms: <a href="https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.BallTree.html#sklearn.neighbors.BallTree"><strong>BallTree</strong></a>, <a href="https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KDTree.html#sklearn.neighbors.KDTree"><strong>KDTree</strong></a>, and a brute-force algorithm . KNN works by calculating the distance of 1 test observation from all the observation of the training dataset and then finding K nearest neighbors of it. This happens for each and every test observation and that is how it finds similarities in the data.</p><p>For calculating distances KNN uses a distance metric from the list of available metrics. The algorithm works best on a particular dataset if the most appropriate distance metric is chosen accordingly. The cosine distance metric is used mainly to calculate similarity between two vectors. It is measured by the cosine of the angle between two vectors and determines whether two vectors are pointing in the same direction. When used with KNN this distance gives a new perspective to a business problem and discovers some hidden information in the data which might not been seen using the Euclidean or Manhattan distances.</p><p>Formula for cosine distance is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/0*mD5w0qkB6D6m4F-M.png" /></figure><p>Using the formula we get a value which tells us about the similarity between the two vectors and 1-cosθ will give us their cosine distance.</p><p>Using this distance we get values between 0 and 1, where 0 means the vectors are 100% similar to each other and 1 means they are not similar at all.</p><pre>from sklearn.neighbors import NearestNeighbors</pre><pre>knn = NearestNeighbors(metric=&#39;cosine&#39;, algorithm=&#39;brute&#39;, n_neighbors=20, n_jobs=-1)</pre><pre>knn.fit(csr_data)</pre><p>I next implement a python function to retrieve the top 10 similar movies to the input movie. The function first checks if the movie name supplied as input is available in the database. If it is the recommendation system is used to find similar movies. The function then sorts them based on their similarity distance and outputs only the top 10<strong> </strong>movies with their distances from the input movie.</p><pre>def get_movie_recommendation(movie_name):<br>    n_movies_to_reccomend = 10<br>    movie_list = movies[movies[&#39;title&#39;].str.contains(movie_name)]  <br>    if len(movie_list):        <br>        movie_idx= movie_list.iloc[0][&#39;movieId&#39;]<br>        movie_idx = dataset[dataset[&#39;movieId&#39;] == movie_idx].index[0]<br>        distances , indices = knn.kneighbors(csr_data[movie_idx],n_neighbors=n_movies_to_reccomend+1)    <br>        rec_movie_indices = sorted(list(zip(indices.squeeze().tolist(),distances.squeeze().tolist())),key=lambda x: x[1])[:0:-1]<br>        recommend_frame = []<br>        for val in rec_movie_indices:<br>            movie_idx = dataset.iloc[val[0]][&#39;movieId&#39;]<br>            idx = movies[movies[&#39;movieId&#39;] == movie_idx].index<br>            recommend_frame.append({&#39;Title&#39;:movies.iloc[idx][&#39;title&#39;].values[0],&#39;Distance&#39;:val[1]})<br>        df = pd.DataFrame(recommend_frame,index=range(1,n_movies_to_reccomend+1))<br>        return df<br>    else:<br>        return &quot;No movies found. Please check your input&quot;</pre><p><strong>Results</strong></p><p>With my model ready, I recommend some movies. As a superhero fan, I input my favorite superhero movie, “Iron Man”. The movies returned are <strong>s</strong>uperhero or animation<strong> </strong>movies which are ideal for the superhero genre of movies.</p><pre>get_movie_recommendation(&#39;Iron Man&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*xjMRGlNS41Zw7afprojayQ.png" /></figure><p><strong>Conclusion</strong></p><p>In this article, I studied what a simple recommender system and created one using the KNN algorithm in Python. This model works well enough as it is a movie recommendation system based on users behavior. This simple recommender is a basic system that recommends the top items based on a certain metric or score in this case cosine distance.</p><p>The Github link for this project can be found <a href="https://github.com/VictoriaAkintomide/movie-recommender--system">here</a>.</p><p>The deployed model link can be found <a href="https://victoria-final.herokuapp.com/">here</a>.</p><p>You can connect with me on <a href="https://www.linkedin.com/in/victoriaakintomide/">LinkedIn</a> and <a href="https://twitter.com/Vikkibambam">Twitter</a> <em>in case of any questions or interesting ideas to share with me. Happy Reading!!!.</em></p><p><strong>References</strong></p><ol><li>F. Maxwell Harper and Joseph A. Konstan. 2015. The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4: 19:1–19:19. &lt;<a href="https://doi.org/10.1145/2827872">https://doi.org/10.1145/2827872</a>&gt;</li><li>So_ham. “Build A Movie Recommendation System on Your Own.” <em>Analytics Vidhya</em>. 24 Nov. 2020. Web. 20 May 2021.</li><li>“Most Popular Distance Metrics Used in KNN and When to Use Them.” <em>KDnuggets</em>. Web. 20 May 2021.</li><li>“(Tutorial) Recommender Systems in Python.” <em>DataCamp Community</em>. Web. 20 May 2021.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea08d9bf3417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Simple Introduction to Pipelines in Machine Learning]]></title>
            <link>https://oluwabamise44.medium.com/a-simple-introduction-to-pipelines-in-machine-learning-4fe5b95ab56d?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fe5b95ab56d</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sat, 15 May 2021 11:36:12 GMT</pubDate>
            <atom:updated>2021-05-15T11:37:05.825Z</atom:updated>
            <content:encoded><![CDATA[<p>A pipeline is a simple way of automating the machine learning workflow. The pipeline consists of sequential steps combining data extraction, preprocessing, modeling and even deployment. The machine learning workflow is split into into independent, reusable, modular parts that can then be pipelined together to create models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*qChaFXIwRSiGfcIwhmhhlQ.jpeg" /></figure><p>Pipelines have some important benefits when building machine learning models.</p><ol><li><strong>Cleaner Code:</strong> With a pipeline, It is not needed to manually keep track of training and validation data.</li><li><strong>Fewer Bugs:</strong> The pipeline provides few opportunities to forget steps particularly preprocessing steps.</li><li><strong>Easier to Productionize:</strong> Pipelines help to transition a model from a prototype to a deployable model.</li></ol><p>A simple machine learning pipeline can be created in three steps. I utilized the <a href="https://www.kaggle.com/dansbecker/melbourne-housing-snapshot/home">Melbourne Housing Snapsho</a>t Dataset on Kaggle for this example.</p><ol><li><strong>Preprocessing step</strong>: The ColumnTransformer class from the scikit learn library is used to bundle together different preprocessing steps. In the code below, I impute missing values in numerical and categorical data and also apply a one-hot encoding to categorical data.</li></ol><pre>from sklearn.compose import ColumnTransformer<br>from sklearn.impute import SimpleImputer<br>from sklearn.preprocessing import OneHotEncoder<br><br>numerical_transformer = SimpleImputer(strategy=&#39;constant&#39;)<br><br><br>categorical_transformer = Pipeline(steps=[<br>    (&#39;imputer&#39;, SimpleImputer(strategy=&#39;most_frequent&#39;)),<br>    (&#39;onehot&#39;, OneHotEncoder(handle_unknown=&#39;ignore&#39;))<br>])<br><br><br>preprocessor = ColumnTransformer(<br>    transformers=[<br>        (&#39;num&#39;, numerical_transformer, numerical_cols),<br>        (&#39;cat&#39;, categorical_transformer, categorical_cols)<br>    ])</pre><p>2. <strong>Model definition</strong>: I can then define a model, in this example, I would be using the Logistic Regression Model from the sklearn library.</p><pre>from sklearn.linear_model import LogisticRegression</pre><pre>model = LogisticRegression(solver=&#39;liblinear&#39;, random_state=0)</pre><p>3. <strong>Create and Evaluate the Pipeline: </strong>The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html">Pipeline</a> class is used to define a pipeline that bundles the preprocessing and modeling steps.</p><pre>from sklearn.metrics import mean_absolute_error</pre><pre>from sklearn.pipeline import Pipeline</pre><pre><br>my_pipeline = Pipeline(steps=[(&#39;preprocessor&#39;, preprocessor),<br>                              (&#39;model&#39;, model)<br>                             ])<br><br>my_pipeline.fit(X_train, y_train)<br><br><em># Preprocessing of validation data, get predictions</em><br>preds = my_pipeline.predict(X_valid)<br><br><br>score = mean_absolute_error(y_valid, preds)<br>print(&#39;MAE:&#39;, score)</pre><p>Pipelines can be very helpful in cleaning up code, preprocessing and evaluation of models.</p><p>References:</p><p><a href="https://www.kaggle.com/alexisbcook/pipelines">https://www.kaggle.com/alexisbcook/pipelines</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fe5b95ab56d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CO2 Emissions Around the World]]></title>
            <link>https://oluwabamise44.medium.com/co2-emissions-around-the-world-af6c263a3e9c?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/af6c263a3e9c</guid>
            <category><![CDATA[co2-emissions]]></category>
            <category><![CDATA[climate-change]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sat, 15 May 2021 08:56:37 GMT</pubDate>
            <atom:updated>2021-05-15T08:58:57.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*MuLjI0UBtY8ReLFdNNoKUw.jpeg" /></figure><p>Climate change is happening all around us. It encompasses rising temperatures referred to as global warming, extreme weather events, shifting wildlife populations and habitats, and rising seas. Scientists describe it as the complex shifts, driven by greenhouse gas concentrations, that are now affecting our planet’s weather and climate systems. CO2, carbon dioxide is a big contributor to greenhouse emissions. It is responsible for three-quarters of emissions and can linger in the atmosphere for thousands of years.</p><p>Using data gotten from MakeoverMonday Tag at data.world, I set out to create visualizations in Tableau to check out this trend in CO2 emissions over the 25-year period from 1990–2016. What countries were responsible for the biggest chunk of emissions during this period?</p><p>CO2 emissions have been on an increase over the years and is still on the increase. According to <a href="https://ourworldindata.org/co2-emissions">Our World in Data</a>, Emissions have continued to grow rapidly, we now emit over 36 billion tonnes each year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_uPAx9sbrD_Np6pXE2m4Q.png" /></figure><p>We can calculate the contribution of the average citizen of each country by dividing its total emissions by its population. This gives us CO2 emissions per capita. This dataset gives the CO2 emissions in metric tonnes per capita.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VbRIoG-MzA7TpDvxb5Xesw.png" /></figure><p>More populous countries can be seen to have the highest per capita emissions. China, United States, India and Russia can be seen from the map above as having the highest per capita CO2 emissions. Many countries across Europe, for example, have much lower emissions than the US, Russia or China. Higher standard of living, clear policy and technological choices on energy sources can be attributed to this. Poorer countries particularly in Sub-Saharan Africa such as Chad, Niger and the Central African Republic also have lower emissions. There are very large inequalities in per capita emissions across the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*-8ZY_5c015nGBqANtIZhSg.png" /></figure><p>Leading the pack of countries is China. China has emitted 11,208 metric tons of CO2 between 1990–2016. This is almost twice that of the United States which comes in second, India, Russia and Brazil make up the top five of countries with the most CO2 emissions in metric tons over the years ranging 1990–2016. It can be seen that these countries coincide as countries with relatively high human population which is a huge factor in CO2 emissions.</p><p>The CO2 Emissions around the world have been on a steady increase over the past 30 years. This can be attributed to the increase in population which in turn leads to an increase in air pollution from the activities carried out by the members of the population. As at 2016, around 41,000 metric tonnes of CO2 had been emitted into the atmosphere. This figure is on a steady rise and could spell disaster for the planet at large, if measures are not put in place to curb air pollution particularly CO2 emissions.</p><p>Population growth has been one of the major driving forces behind increasing carbon dioxide emissions worldwide over the last two decades. Research shows that <strong>a 1% increase in population leads to a 2.73% increase in carbon dioxide emissions</strong>. More people means more demand for oil, gas, coal and other fuels mined or drilled from below the Earth’s surface that, when burned, spew enough carbon dioxide (CO2) into the atmosphere to trap warm air inside like a greenhouse.</p><p>The accompanying dashboard for this piece can be found <a href="https://public.tableau.com/profile/victoria.akintomide#!/vizhome/CO2EmissionsVisualizations/Dashboard1?publish=yes">here</a>. You can connect with me on <a href="https://www.linkedin.com/in/victoriaakintomide/">LinkedIn</a> and <a href="https://twitter.com/Vikkibambam">Twitter</a> <em>in case of any questions or interesting ideas to share with me. Happy Reading!!!.</em></p><p>References</p><ol><li>Nunez, C. (2021, May 3). <em>Carbon dioxide in the atmosphere is at a record high. Here’s what you need to know.</em> Environment. <a href="https://www.nationalgeographic.com/environment/article/greenhouse-gases.">https://www.nationalgeographic.com/environment/article/greenhouse-gases.</a></li><li>Scientific American. (2009, July 29). <em>Does Population Growth Impact Climate Change?</em> Scientific American. <a href="https://www.scientificamerican.com/article/population-growth-climate-change/">https://www.scientificamerican.com/article/population-growth-climate-change/.</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af6c263a3e9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wine Production Around the World]]></title>
            <link>https://oluwabamise44.medium.com/wine-production-around-the-world-2a0bda4aef0c?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a0bda4aef0c</guid>
            <category><![CDATA[wine-tasting]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[wine-industry]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Fri, 14 May 2021 22:51:40 GMT</pubDate>
            <atom:updated>2021-05-14T22:54:35.060Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*pxybiKPPMWjDcgjwj707Iw.jpeg" /></figure><p>Ever wondered where your favorite wine comes from? A good wine gives a velvety and robust taste, the aroma is simply exquisite. Research has suggested that drinking a glass of wine is good for the body. Antioxidants in wine protect against heart disease and harmful inflammation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*tqh1ZHxxHXLthZ9UD1Glvw.jpeg" /></figure><p>In this piece, we aim to discover the unique destinations around the world well-known for their wine production. The dataset used in this visualization was retrieved from data.world under the MakeoverMonday Tag. It included data concerning wine production across the globe spanning the years 2012–2016. The visualizations in this article were created using Microsoft Power BI Desktop.</p><p>The trend in wine production over the years 2012–2016 uncovers 2013 as the leading year for wine production with 566 millions of hectoliters (mhl). 2015 has the next highest with 539 millions of hectoliters. In 2014, 527 millions of hectoliters were produced, 522 millions of hectoliters in 2016 and 502 millions of hectoliters in 2012.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*VtvI6PqH9Na94yNh4Bry6Q.png" /></figure><p>The trend in wine production for the five year period sees a sharp increase from 2012 to 2013 by 64mhl, then another fall by 39mhl from 2013 to 2014. In 2015, we see an increase of 12mhl and in 2016, another decrease by 17mhl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*R6YBEIhnH0wukkfGPjVACg.png" /></figure><p>From the visualization map shown below, it can be seen that the majority of the wine production destinations are located in Europe. South America boasts three wine locations, Australia has two locations while Africa, Asia and North America boast of one each. Wine production is very big in Europe and the continent boasts of exotic wine destinations and tours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*qSoqnx2ErYQ3pGCfvF2lmw.png" /></figure><p>So what countries are these amazing wine destinations located? In the bar graph below, Italy, France and Spain provide Europe’s top wine destinations. Italy with a total production of 245 millions of hectoliters in the 5 year period provides the biggest wine destination in Europe. France produced 220mhl and Spain produced 193mhl. In North America, the United States produced 115mhl over the five year period, the only wine producing location in North America. South America’s largest producer is Argentina with 65mhl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*W2S6eHXOVDFR7lN_XAiCsw.png" /></figure><p>China is the only wine producer in Asia with 60 millions of hectoliters. Australia and New Zealand produced 61mhl and 13mhl respectively. In Africa, South Africa is the only wine producing country with 55 millions of hectoliters.</p><p>The accompanying dashboard for this piece can be found <a href="https://app.powerbi.com/view?r=eyJrIjoiOTgwMDYyOTMtYzI1NS00YzdkLWI3ZGMtNGU4NjgwYmVlMzA1IiwidCI6ImJkMzRhYWQwLTZhMmYtNDJkZS04MmM3LTY4YzlkNzc5NjRlNiJ9&amp;pageName=ReportSection">here</a>. You can connect with me on <a href="https://www.linkedin.com/in/victoriaakintomide/">LinkedIn</a> and <a href="https://twitter.com/Vikkibambam">Twitter</a> in case of any questions or interesting ideas to share with me<em>. Happy Reading!!!.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a0bda4aef0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How has Brexit affected the UK Trade with the EU — A Tableau Visualization]]></title>
            <link>https://oluwabamise44.medium.com/how-has-brexit-affected-the-uk-trade-with-the-eu-a-tableau-visualization-1209aa6eddd8?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1209aa6eddd8</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[brexit]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[trade]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sun, 11 Apr 2021 14:03:46 GMT</pubDate>
            <atom:updated>2021-04-11T14:03:46.764Z</atom:updated>
            <content:encoded><![CDATA[<h3>How has Brexit affected the UK Trade with the EU — A Tableau Visualization</h3><p>Brexit was the withdrawal of the United Kingdom(UK) from the European Union(EU) at the end of 31 January 2020. In June 2016, there was a referendum UK-wide, in which 51.89% of the population voted in favor of leaving the EU and 48.11% voted to remain a member of the EU. On 29 March 2017, the British Government formally notified the EU of the country’s intention to withdraw, and this began the Brexit process. Between 2017–2019, there was a series of negotiations after which a formal agreement between the EU and the UK was reached on the 17th October 2019. There were delays to the withdrawal agreement after which it was formalized in January 2020 and the UK finally left the EU on the 31st January 2020.</p><p>The UK continued to participate in the European Union economic activities during a transition period that ended on 31 December 2020 to allow enough time to agree to the terms of a new trade deal finally brokered on 24th December 2020. For the transition period, trade, travel and freedom of movement remained unchanged. However, effective January 1 2021, goods moving between the UK and any EU country are now treated as cross-border transactions, requiring the filing of import and export declarations. The trade deal brokered prevented any tariffs and quotas being introduced as the EU is the UK’s biggest and closest trading partner and that would have made trade more expensive.</p><p>This visualization seeks to discover the impacts of Brexit on exports from the UK to the EU. This dataset was retrieved from <a href="https://data.world/makeovermonday/2021w13">data.world</a>. The dataset featured 5 columns and 2,890 rows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_sqla6lbuFnZgsz84-8iew.png" /></figure><p>The UK exports of goods to the EU plunged by 42.54% in January 2021, the first month since Brexit. This is the biggest monthly decline in British trade for for the 24 years featured in the dataset. There was also the imposition of a new Covid-19 lockdown which might have also influenced this decline. The worth of goods exported fell by almost £6bn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9S0GcAsvWvC-fj7-eqk0A.png" /></figure><p>Imports to the UK fell by 28.42%, also the biggest decline over the 24 years featured in the dataset. The imports fell by a worth of £6.6bn.</p><p>Over the 24 years featured in the dataset, Machinery and transport equipment have been the biggest contributors to exports from the UK to the EU with a worth of about £1.3 tn, while unspecified goods having the lowest contribution with £7.845 bn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xf99K1w70ugdApOrNSo5_w.png" /></figure><p>Across the export categories, in January 2021 one month after Brexit. Exports of Animals &amp; Vegetables Oils and Fats fell the largest with percentage of 95.2%. The Beverages &amp; Tobacco exports had the biggest percentage of 688.2%. The Machinery and Transport industry still had the highest export value of £3bn and the Animals &amp; Vegetables Oils and Fats industry had the lowest export value of £17m. UK exports of food and live animals to the EU fell by 69.3% in January.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YX_6b3bOnAPTBoycZ35mdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwBgjTfcaMx9cn27SshFvw.png" /></figure><p>For imports over the 24 years featured in the dataset, The Machinery &amp; Transport equipment has been the UK’s largest import from the EU with a value of almost £2 tn. The unspecified goods industry had the lowest contribution with almost £9 bn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEJ_D067ESP8ox1_-fcz1A.png" /></figure><p>Across the export categories, in January 2021 one month after Brexit. Imports of Animals &amp; Vegetables Oils and Fats fell the largest with percentage of 97%. The Beverages &amp; Tobacco exports had the biggest percentage of 1071% from the previous month. The Machinery and Transport industry still had the highest import value of £6bn and the unspecified goods industry had the lowest import value of £16m.</p><p>The Brexit deal has definitely impacted trade particularly<strong> </strong>exports of food and live animals and animals &amp; vegetables oils and fats to the EU. Experts have suggested that stockpiling of goods by manufacturers before the Brexit deadline, so they would not need to send as many shipments as usual in January, as well as tighter Covid-19 restrictions among EU countries and the UK are reasons for this decline.</p><p>References</p><ol><li>“Exports to EU Plunge by 40% in First Month since Brexit.” <em>The Guardian</em>, Guardian News and Media, 12 Mar. 2021, <a href="http://www.theguardian.com/business/2021/mar/12/exports-to-eu-plunge-in-first-month-since-brexit-uk-economy.">www.theguardian.com/business/2021/mar/12/exports-to-eu-plunge-in-first-month-since-brexit-uk-economy.</a></li><li>“Brexit.” <em>Wikipedia</em>, Wikimedia Foundation, 8 Apr. 2021, en.wikipedia.org/wiki/Brexit.</li></ol><p>The accompanying dashboard for this piece can be found <a href="https://public.tableau.com/views/UKExportstoEUhaveplungedsinceBrexit_16181496808930/Story1?:language=en&amp;:display_count=y&amp;publish=yes&amp;:origin=viz_share_link">here</a>. You can connect with me on <a href="https://www.linkedin.com/in/victoriaakintomide/">LinkedIn</a> and <a href="https://twitter.com/Vikkibambam">Twitter</a> <em>in case of any questions or interesting ideas to share with me. Happy Reading!!!.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1209aa6eddd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Historical Data Analysis]]></title>
            <link>https://oluwabamise44.medium.com/bitcoin-historical-data-analysis-cd1b1bde6266?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd1b1bde6266</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Mon, 29 Mar 2021 10:56:51 GMT</pubDate>
            <atom:updated>2021-03-29T11:07:32.576Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ml_KXUeI6z_YspGR" /><figcaption>Photo by <a href="https://unsplash.com/@silverhousehd?utm_source=medium&amp;utm_medium=referral">André François McKenzie</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Bitcoin is the longest running and most well known cryptocurrency, first released as open source in 2009 by the anonymous Satoshi Nakamoto. Bitcoin serves as a decentralized medium of digital exchange, with transactions verified and recorded in a public distributed ledger (the blockchain) without the need for a trusted record keeping authority or central intermediary. Transaction blocks contain a SHA-256 cryptographic hash of previous transaction blocks, and are thus “chained” together, serving as an immutable record of all transactions that have ever occurred. As with any currency/commodity on the market, bitcoin trading and financial instruments soon followed public adoption of bitcoin and continue to grow.</p><p>Some interesting facts about Bitcoin:</p><ul><li>There are only 21 million bitcoins that can be mined in total.</li><li>Once bitcoin miners have unlocked all the bitcoins, the planet’s supply will essentially be tapped out.</li><li>As of February 24, 2021, 18.638 million bitcoins have been mined, which leaves 2.362 million yet to be introduced into circulation.</li><li>Once all Bitcoin has been mined the miners will still be incentivized to process transactions with fees.</li></ul><p>In this piece, I have analyzed historical data on Bitcoin which is gotten from <a href="https://www.kaggle.com/mczielinski/bitcoin-historical-data">Kaggle</a>. The data contains historical bitcoin market data at 1-min intervals for select bitcoin exchanges where trading takes place with minute to minute updates of OHLC (Open, High, Low, Close), Volume in BTC and indicated currency, and weighted bitcoin price. I used Python libraries, Pandas, Numpy, Seaborn and Matplotlib for data cleaning, manipulation and visualization. I used Google <a href="https://colab.research.google.com/">Colab</a>, an online platform with an interactive programming environment just like Jupyter Notebooks and access to free computing resources (GPUs and TPUs) which allows for faster computation. The steps I followed are listed as follows:</p><ol><li>Importing relevant libraries and dataset</li></ol><pre>#importing required libraries</pre><pre>import pandas as pd</pre><pre>import numpy as np</pre><pre>import seaborn as sns</pre><pre>import matplotlib.pyplot as plt</pre><pre>import warnings</pre><pre>warnings.filterwarnings(&#39;ignore&#39;)</pre><pre>#importing dataset</pre><pre>bitcoin_data = pd.read_csv(&#39;/content/drive/MyDrive/bitstampUSD_1-min_data_2012-01-01_to_2020-12-31.csv&#39;)</pre><p>2. I performed basic exploration of my dataset using pandas methods: head(), info(), describe() and tail().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*9kKEybeQI4_dTGJ2aG3JMg.png" /></figure><p>The dataset contains 4727777 entries with 8 columns. The columns are in integer and float numeric format. I also checked for null values and discovered that about 27% of the data contain NaN values corresponding to times without any trades or activity for that 1 -minute time interval. I decided to drop these values for the rest of my analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*xAuTs433OWz3jpxK_cHKQA.png" /></figure><p>3. The Timestamp column is in Unix Time, will be converted to datetime format. I used the datetime library to do this and then set the Timestamp column to the index.</p><pre>#converting the Timestamp column to datetime format</pre><pre>import datetime</pre><pre>bitcoin_data[&#39;Timestamp&#39;] = bitcoin_data[&#39;Timestamp&#39;].apply(lambda x: datetime.datetime.fromtimestamp(int(x)).strftime(&#39;%Y-%m-%d %H:%M:%S&#39;))</pre><pre>bitcoin_data[&#39;Timestamp&#39;] = pd.to_datetime(bitcoin_data[&#39;Timestamp&#39;])</pre><pre>bitcoin_data = bitcoin_data.set_index(&#39;Timestamp&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*YYHhRKu-ehim_hDbeFAeig.png" /></figure><p>4. I then performed Univariate Analysis of each of the columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_i2NPKXwoheXt41NzlAxvQ.png" /></figure><p>The Opening Price of Bitcoin has steadily been increasing over the years with the opening price at 31st December, 2020 being 28893.21(USD). In June of 2019, the cryptocurrency hit a high of $14,000, but dipped after that period. It hit another peak at November 4th and continued gaining steadily every day with a opening price of 55,949.09(USD) as at today 29th March, 2021. The Kernel Density Estimate + Histogram plot is used for visualizing the probability density of a continuous variable. It depicts the probability density at different values in the opening price values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcGo4CsZ6Do6g-Hv9bLuvw.png" /></figure><p>The Closing Price per day of Bitcoin has steadily been increasing over the years with the price at 31st December, 2020 being 28928.49(USD). There was a notable fall in price in the year 2019, but the cryptocurrency is steadily gaining every day with a closing price of 57,196.16(USD) as at today 29th March, 2021. Despite the peaks and troughs in the price of BTC, investors have insisted that the cryptocurrency will be able to push past and continue to rise as it has push past several dips and highs in its history. This speculation has lead to an increase in Bitcoin’s value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*edUy_LZFSdNe_L0iyF6Z4A.png" /></figure><p>The volume of BTC traded per min-interval timeseries is shown above, with the highest volume of BTC was traded on <strong>2014–10–05 15:46:00 </strong>with a volume of 5853.852166 BTC with 1761470 USD and at a price of 306.86 BTC-USD. Over the years since then, the BTC volume traded has been steadily very little as the more than 18 million has already been mined.</p><pre>bitcoin_data[bitcoin_data[&#39;Volume_(BTC)&#39;] == bitcoin_data[&#39;Volume_(BTC)&#39;].max() ]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*5z90UcdDzvXODbGkPZwucA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDOzNK9AS54m-3tw4LITdA.png" /></figure><p>As the price of Bitcoin increases over the years, more money is spent to purchase this cryptocurrency as can be seen from the plot above. The highest volume of currency traded per min-interval was at <strong>2020–05–20 15:15:00 with </strong>10445987.794 USD at a BTC-USD price of 9724.89 and the volume of 1098.349384 BTC.</p><pre>bitcoin_data[bitcoin_data[&#39;Volume_(Currency)&#39;] == bitcoin_data[&#39;Volume_(Currency)&#39;].max()]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*-aCxgYGdFlZLEBgzfPL1jA.png" /></figure><p>5. The correlation between the variables in the dataset is seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXRPVmRf-0PsIBYHMZudhw.png" /></figure><p>The opening, closing, highest, lowest and weighted prices were strongly correlated as they contain the prices of BTC. The volume of BTC , the volume of currency traded and the price were weakly correlated. Another reason for Bitcoin’s rise is the growing inflation of the U.S. dollar. The recent stimulus spending is poised to greatly increase the level of inflation and decrease the dollar’s purchasing power.</p><p>6. I was interested in the day with the highest difference in price between the Highest and Lowest Prices of BTC. I created a new column ‘Diff’ in my dataset.</p><pre>#create new column Diff_Price</pre><pre>bitcoin_data[&quot;Diff_Price&quot;] = bitcoin_data[&quot;High&quot;] - bitcoin_data[&quot;Low&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XA2oz6wnroHVq6XrIOPm1g.png" /></figure><p>The difference in daily prices is plotted above with highest difference occurring on <strong>2020–11–05 17:33:00.</strong> The price difference at this time interval was 850.00(BTC-USD). The difference between the price is also on a steady rise with frequent occurrences of this kind of increase especially since 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*_rT1qxZ_cMTq2_cOqJbkrw.png" /></figure><p>There are two major reasons why Bitcoin’s value keeps appreciating over the years. Firstly, there is only 21 million Bitcoin that will ever exist. There will be no more and no less and this number will always stay static. This makes bitcoin more scarce than anything that has come before it. Other scarce assets are not 100% finite and in some cases, they can be synthetically manufactured.</p><p>Secondly, there is a process coded into Bitcoin called the halving. Essentially, Bitcoin has its own built-in escrow mechanism where Bitcoin is released and given to miners as a reward for processing transactions. This reward is cut in half every four years.</p><p>By doing so, Bitcoin’s rate of inflation is reduced by half each halving and its stock-to-flow ratio is doubled each halving. This process continues every four years until all Bitcoin in this escrow mechanism is released and in circulation. From that point on Bitcoin in circulation will be capped at 21 million.</p><p>References</p><ol><li>Conway, L. (2020, December 09). Why is bitcoin’s price rising? Retrieved March 29, 2021, from <a href="https://www.investopedia.com/tech/cryptocurrency-this-week/">https://www.investopedia.com/tech/cryptocurrency-this-week/</a></li><li>Bitcoin USD (btc-usd) STOCK historical prices &amp; data. (2021, March 28). Retrieved March 29, 2021, from <a href="https://finance.yahoo.com/quote/BTC-USD/history/">https://finance.yahoo.com/quote/BTC-USD/history/</a></li></ol><p><em>You can connect with me on </em><a href="https://www.linkedin.com/in/victoriaakintomide/"><em>LinkedIn</em></a><em> and </em><a href="https://twitter.com/Vikkibambam"><em>Twitter</em></a><em> in case of any questions or interesting ideas to share with me. Happy Reading!!!.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd1b1bde6266" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An EDA on Space Missions since 1957]]></title>
            <link>https://oluwabamise44.medium.com/an-eda-on-space-missions-since-1957-160b22c1b84f?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/160b22c1b84f</guid>
            <category><![CDATA[space-exploration]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[seaborn]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sat, 20 Mar 2021 11:58:49 GMT</pubDate>
            <atom:updated>2021-03-20T11:58:49.089Z</atom:updated>
            <content:encoded><![CDATA[<p>Space exploration is the use of space technology to explore outer space. The physical exploration of space is carried out by unmanned robotic space probes and human spaceflight. Astronomers with telescopes also conduct space exploration. The early era of space exploration known as the “Space Race”, was dominated by the Soviet Union and the United States.</p><p>The launch of the first human-made object to orbit Earth, the Soviet Union’s Sputnik 1, on 4 October 1957, and the first Moon landing by the American Apollo 11 mission on 20 July 1969 are often taken as landmarks for this initial period. Milestones in this period include, the first living being in orbit in 1957, the first human spaceflight (Yuri Gagarin aboard <em>Vostok 1</em>) in 1961, the first spacewalk (by Alexei Leonov) on 18 March 1965, the first automatic landing on another celestial body in 1966, and the launch of the first space station (<em>Salyut 1</em>) in 1971.</p><p>In this analysis, I would be producing interactive charts for data visualization and understanding on space missions since 1957.</p><p>I first import relevant industries in my notebook.</p><pre>#importing required libraries</pre><pre>import pandas as pd</pre><pre>import numpy as np</pre><pre>import matplotlib.pyplot as plt</pre><pre>import seaborn as sns</pre><p>Then I import the dataset, this dataset was scraped from <a href="https://nextspaceflight.com/launches/past/?page=1">https://nextspaceflight.com/launches/past/?page=1</a> and includes all the space missions since the beginning of Space Race (1957).</p><pre>#importing dataset</pre><pre>data = pd.read_csv(&#39;Space_Corrected.csv&#39;)</pre><p>I print the first five rows to get a view of my data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uACPuoYkE1fw7PBeg_OlFw.png" /></figure><p>I perform data preprocessing by dropping the first two columns and creating a new column ‘Datetime’ from the ‘Datum’ column by converting it to a datetime object. I also extracted the ‘Year’ column and the created the Country column from the ‘Location’.</p><pre>#dropping the first two columns</pre><pre>data= data.drop([&#39;Unnamed: 0&#39;,&#39;Unnamed: 0.1&#39;],axis=1)</pre><pre>#convert the Datum column to a datetime object</pre><pre>data[&#39;DateTime&#39;] = pd.to_datetime(data[&#39;Datum&#39;])</pre><pre># Extract the launch year</pre><pre>data[&#39;Year&#39;] = data[&#39;DateTime&#39;].apply(lambda datetime: datetime.year)</pre><pre># Extract the country of launch</pre><pre>data[&quot;Country&quot;] = data[&quot;Location&quot;].apply(lambda location: location.split(&quot;, &quot;)[-1])</pre><p>General Information about the dataset is shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*HUuOV47kdRFN6Cj3sYzT7A.png" /></figure><p>Using the seaborn countplot method and the plot method in pandas. The following visualizations were created.</p><p>The number of launches per year from 1957 to 2020. 1971,2020 and 1977 have been the years with the highest rocket launches with 119, 117 and 114 launches in these years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lBLOQok5UeI7O8SKDPF03g.png" /></figure><p>The launches per countries over the years. Russia and the USA lead lead this race over the years, to be the leader in space exploration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hzcxGwcOx8vf6D9_wmUwfg.png" /></figure><p>The status of rockets launched over the years. 81% of rockets launched over the years have been retired.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0cAfa6cOowi3w-IWUW0_A.png" /></figure><p>The launches over the years have been mostly successful with a 90% success rate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EsNDCf0E4ZdBnHAfSmefAw.png" /></figure><p>You can check out this notebook <a href="https://github.com/VictoriaAkintomide/SCA-MP-C4-Assessments/blob/main/All_Space_Missions_from_1957_Data_Analysis.ipynb">here</a> for more visualizations and analysis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=160b22c1b84f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Probability and Statistics in Data Science]]></title>
            <link>https://oluwabamise44.medium.com/probability-and-statistics-in-data-science-69eb0d58f0c8?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/69eb0d58f0c8</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sat, 13 Mar 2021 10:19:32 GMT</pubDate>
            <atom:updated>2021-03-13T10:19:32.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*PwhD4L-cb5KzwCXakT9M3A.jpeg" /></figure><p>Data Science has been ranked as the topmost profession by Glassdoor. The article by Harvard Business Review also spells it as the sexiest job of the 21st century. So what are the most important tools to becoming a good data scientist? Apart from programming, basic mathematical concepts, probability and statistics are equally important. A good understanding of these mathematical concepts will help in the journey of becoming a professional data scientist.</p><p><strong>Probability</strong></p><p>Probability calculates how likely an event will happen. It answers the question “What is the chance this event will happen?”. It is used intuitively without even realizing it. When we ask what are chances, it will rain in March, we are seeking the probability of rain falling in March.</p><p>Uncertainty is expected in the world we live in. Probability can help in understanding and knowing the chances of events occurring. From studying patterns and trends in past collected data, probability can assist in making informed decisions about the likelihood of events happening.</p><p>Some key concepts in the probability include:</p><ol><li>Conditional Probability: This is the probability of another event (event B) occurring given that another event (event A) has occurred. For example, given that it is raining today, what is the probability that NEPA would supply power?</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/0*zb9DHLhbl60KA3i8.gif" /><figcaption>Figure: Formula for calculating conditional probability</figcaption></figure><p>2. Random Variables: A random variable is a variable whose value is a numerical outcome of a random experiment. Random variables are divided into two:</p><ul><li>Continuous Random Variable: In a continuous random variable, its possible values contain a whole interval of numbers. An example is the height of students in a statistics class.</li><li>Discrete Random Variable: A discrete random number has a countable number of possible values. The number of students in a statistics class is an example of a discrete random variable.</li></ul><p>3. Probability Distribution: Probability distribution is a function that describes all the possible likelihoods and values that can be taken by a random variable within a given range.</p><p>For a continuous random variable, the probability distribution is described by the probability density function. And for a discrete random variable, it’s a probability mass function that defines the probability distribution.</p><p>There are different probability distributions each catering to different data generation process and purposes. An example is the binomial distribution which evaluates the probability of a particular event occurring many times over a given number of trials as well as given the probability of the event in each trial.</p><p><strong>Statistics</strong></p><p>Statistics is a branch of mathematics that concerns the collection, interpretation, organization, analysis and presentation of data.</p><p>Commonly used terminologies in the statistics field include:</p><ul><li>Population: The complete set of data items to be investigated.</li><li>Sample: A subset of the population.</li><li>Parameter: A characteristic of the population.</li></ul><p>Statistics can be divided into two main categories:</p><ol><li><strong>Descriptive Statistics:</strong> Here, data is used to provide descriptions of the population. The characteristics of the data are what are being investigated in this analysis.</li></ol><ul><li><strong>Measure of Center:</strong> These measures attempts to describe the set of data by identifying central positions. The mean is the average of the data values. The median is the central value of the set of data and the mode is the most occurring value in the data set.</li><li><strong>Measure of Spread: </strong>This measures how varied the set of observations are. The range is the difference between the maximum and minimum value in the set of data. The variance describes how much a random variable differs from its expected value. The standard deviation is a measure of the dispersion of a set of data from its mean.</li></ul><p>2. <strong>Inferential Statistics:</strong> Inferential statistics makes inferences and predictions about a population based on a sample of data taken from the population in question.</p><ul><li>Hypothesis testing is an inferential statistical technique that determines whether there is enough evidence in a data sample to infer that a certain condition holds true for an entire population.</li></ul><p>A good comprehension of the mathematical concepts in data science helps a data scientist gain deeper insights into the data and the best approach to take to solve problems presented.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69eb0d58f0c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bank Institution Term Deposit Predictive Model]]></title>
            <link>https://oluwabamise44.medium.com/bank-institution-term-deposit-predictive-model-c995d20cd5d2?source=rss-4c4026d76ce1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c995d20cd5d2</guid>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[eda]]></category>
            <category><![CDATA[predictive-modelling]]></category>
            <category><![CDATA[class-imbalance]]></category>
            <dc:creator><![CDATA[Victoria Akintomide]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 18:44:07 GMT</pubDate>
            <atom:updated>2020-08-29T18:44:07.328Z</atom:updated>
            <content:encoded><![CDATA[<p>A bank would like to identify its customers who would potentially subscribe to its term deposits. The objective of this project is to build a robust predictive model that would help the bank identify customers who would or would not subscribe to their term deposits in the future. The predictive model can help the bank increase their campaign efficiency as they would be able to identify customers who would subscribe to their term deposit and thereby direct their marketing efforts to them. This would help them better manage their resources (e.g human effort, phone calls, time)</p><p><strong>The Data</strong></p><p>The data is downloaded from the <a href="http://archive.ics.uci.edu/ml/datasets/Bank+Marketing">UCI ML</a>. It has 20 features varying from the personal information of customers, to previous telemarketing campaigns and social-economic factors of customers. The target is the y variable which records if the customer has subscribed to a term deposit or not.</p><p><strong>Methods</strong></p><p><strong><em>Exploratory Data Analysis</em></strong></p><p>Using Python libraries (Seaborn, Pandas and Matplotlib), Univariate and Bivariate analysis is carried out on all columns. For the Univariate analysis, the categorical columns are visualized using bar charts and pie charts while the numerical columns are visualized using histograms. From the univariate analysis, it can be seen there is a huge class imbalance problem as 88% of the customers did not subscribe to a term deposit. Some numerical columns also contained outliers which could skew our analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOpa-TaQqEJ8zHNFoOX2Hg.png" /></figure><p>The Bivariate analysis for the categorical variables is done using cross tabulation and bar charts to compare them against the target. The numerical columns are correlated against the target in a heatmap.</p><p><strong><em>Data Preprocessing</em></strong></p><p>The data is aggregated to reduce variance in the data. One Hot Encoding is performed for all categorical columns. Many machine learning algorithms cannot work with categorical data directly. The categories must be converted into numbers. This is required for both the features and the target.</p><p>Outlier treatment using Isolation Forest, a tree based anomaly detection algorithm. It is an unsupervised machine learning algorithm for anomaly detection that works on the principle of isolating anomalies.</p><p>Normalization is done, using MinMax Scaler to change the values of numeric columns in the data to a common scale.</p><p>Dimensionality Reduction is applied using Principal Component Analysis(PCA).</p><p><strong><em>Models</em></strong></p><p>Five models were employed in this project to check which will perform best.</p><ol><li>Logistic Regression</li><li>XGBoost</li><li>Support Vector Machine (SVM)</li><li>Random Forest</li><li>Decision Trees</li></ol><p><strong><em>Cross Validation</em></strong></p><p>The cross validation techniques were used to select the best performing models. Stratified K-Fold Cross Validation and K-Fold Validation were also compared and the Stratified K-Fold Cross validation performed better. The Stratified K-Fold helps with class imbalance problems as it preserves the class distribution in the train and test sets for each evaluation of a given model.</p><p><strong><em>Evaluation Metrics</em></strong></p><p>Evaluation metrics are used to measure the quality of the machine learning model. A model may perform well using one measurement from one evaluation metric, but may perform poorly using another measurement from another evaluation metric. To ensure that the model is operating correctly and optimally, we employed the following; Accuracy, Precision, Recall, F1 Score, ROC-AUC Curve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*FUL26tDkI9UEfKKWtJDGLw.png" /></figure><p>The F1 Score and the ROC-AUC curve were selected as the best metric for imbalanced data problem. Based on these metrics, the top three performing models were; Random Forest, XGBoost and the Logistic Regression models.</p><p>References</p><ol><li>How to Fix k-Fold Cross-Validation for Imbalanced Classification <a href="https://machinelearningmastery.com/cross-validation-for-imbalanced-classification/#:~:text=For%20example%2C%20we%20can%20use,in%20the%20complete%20training%20dataset">https://machinelearningmastery.com/cross-validation-for-imbalanced-classification/#:~:text=For%20example%2C%20we%20can%20use,in%20the%20complete%20training%20dataset</a></li><li>Logistic Regression with StratifiedKfold <a href="https://www.kaggle.com/sudhirnl7/logistic-regression-with-stratifiedkfold">https://www.kaggle.com/sudhirnl7/logistic-regression-with-stratifiedkfold</a></li></ol><p>Link to Code :</p><p><a href="https://github.com/VictoriaAkintomide/10Academy/tree/master/week6">https://github.com/VictoriaAkintomide/10Academy/tree/master/week6</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c995d20cd5d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>