<?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 Oluwafunmilayo C. Sofuwa on Medium]]></title>
        <description><![CDATA[Stories by Oluwafunmilayo C. Sofuwa on Medium]]></description>
        <link>https://medium.com/@oluwafunmilayo?source=rss-90a3f3c2f63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9GWpyko8xp0EYKt0jdyoNA.jpeg</url>
            <title>Stories by Oluwafunmilayo C. Sofuwa on Medium</title>
            <link>https://medium.com/@oluwafunmilayo?source=rss-90a3f3c2f63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 03:21:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oluwafunmilayo/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[Highest Paid K-Drama Actors 2021]]></title>
            <link>https://oluwafunmilayo.medium.com/highest-paid-k-drama-actors-2021-5c78229bd254?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c78229bd254</guid>
            <category><![CDATA[beautifulsoup]]></category>
            <category><![CDATA[actors]]></category>
            <category><![CDATA[kdrama]]></category>
            <category><![CDATA[korean]]></category>
            <category><![CDATA[web-scraping]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Tue, 19 Oct 2021 16:58:30 GMT</pubDate>
            <atom:updated>2021-12-26T16:08:47.616Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A web-scraping approach</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*Wb_pG_mak0wBjpGc2NLWyg.jpeg" /><figcaption><a href="https://www.preview.ph/culture/highest-paid-korean-actors-2020-a00346-20200702">Image Link</a></figcaption></figure><p>I have this love affair with Korean dramas. The first ever K-Drama I watched was Boys Over Flowers (same with most people I know) and since then… let’s just say the rest is history!</p><p>I decided to combine my love for data and k-drama into an interesting project and I took a web-scraping approach.</p><p>In this article, I would be discussing:</p><ol><li>What Web scraping is?</li><li>Resources I used in learning</li><li>Summary of how I approached my project</li><li>Who made the list?</li><li>Points to note</li><li>Link to my other pages</li></ol><p><strong>What is ‘<em>Web Scraping</em>’?</strong></p><p><a href="https://en.wikipedia.org/wiki/Web_scraping">Wikipedia</a> defines web scraping as ‘ data scraping used for extracting data from websites. It can be done manually by a software user, the term typically refers to automated processes implemented using a bot or web crawler. It is a form of copying in which specific data is gathered and copied from the web, typically into a central local database or spreadsheet, for later retrieval or analysis.</p><p><a href="https://www.zyte.com/learn/what-is-web-scraping/">Zyte</a> lists what a general DIY web scraping process looks like:</p><ol><li>Identify the target website</li><li>Collect URLs of the pages where you want to extract data from</li><li>Make a request to these URLs to get the HTML of the page</li><li>Use locators to find the data in the HTML</li><li>Save the data in a JSON or CSV file or some other structured format</li></ol><p>This process however applies when you are working on small projects rather than data that needs to be scaled.</p><p><strong>Resources I used</strong></p><p>To learn about web scraping I made use of three YouTube videos:</p><ol><li><a href="https://www.youtube.com/watch?v=XVv6mJpFOb0">Web Scraping with Python — Beautiful Soup Crash Course</a></li><li><a href="https://www.youtube.com/watch?v=GjKQ6V_ViQE">Comprehensive Python Beautiful Soup Web Scraping Tutorial! (find/find_all, css select, scrape table)</a></li><li><a href="https://www.youtube.com/watch?v=Ewgy-G9cmbg&amp;t=6186s">Solving real world data science tasks with Python Beautiful Soup! (movie dataset creation)</a></li></ol><p><strong>Project Summary</strong></p><p>Initially I wanted to scrape American movies but since that was fairly common, I decided to go another route. My plan was to get the highest paid Korean actors and then get the only the television dramas they have featured in. I found various websites with the highest paid Korean drama actors however some there were slight differences between them. The initial website I started scraping from had an issue with their page so I ended up using the information from <a href="https://seoulspace.com/richest-kdrama-actors-highest-paid-actors-in-korean-dramas/">SeoulSpace</a>. I particularly like the way the information is presented on their website which was similar to the initial website I wanted to use. They give a sort of backstory to each actor as well as their fees per episode and estimated total earnings from Kdramas. I scrapped the backstory and the fees per episode.</p><p>Once that was done, my next plan of action was to get the Wikipedia page of each actor or their filmography page. From their Wikipedia pages, I extracted their date of birth and age. My initial next step after this was to get the list of the series they have acted it and then get more information of each series using the OMDB API. I couldn’t move forward with this method for a number of reasons:</p><ul><li>Some Korean series have the same title as some other movie which would have provided me with the wrong information from OMDB API</li><li>Some Korean series have alternative titles</li><li>Some Korean series information do not exist on OMDB API</li></ul><p>With this realization, I chose to get the series information entirely from IMDB. The information I wanted to get include the series summary, alternative title, year it was released, IMDB rating as well as the series images (series poster). I would briefly list out each step I took.</p><ul><li>I got the IMDB’s advanced search URL. With this URL, I would create the advanced URL search for each actor and then pick the first item from the search result.</li><li>The first item from the search result would contain the actor’s IMDB URL. I had to use this method because IMDB assigns a unique number to each series, movie, actor etc., that is on their website.</li><li>Using the actor’s IMDB URL, I extracted the actor’s name, the names of the series they have acted in and the series URL.</li><li>With the series URL, I got the series alternative title, year of release, summary of the series, genre and IMDB rating.</li><li>Once that was done, I needed to scrape the series images. To do this, I created a unique list of of the series URLs from step 3.</li><li>Most of these URLs contain an image for the series. The images have a link that takes you to another IMDB page with the picture and a few other information. I extracted these image links.</li><li>From the image link, I got the final link of where the images where gotten from or uploaded to. These final links directed me to the image of the series which I downloaded/scraped.</li><li>Lastly, I downloaded all my data tables as csv files to my local storage on my laptop as well as a zip folder of the images that I scraped.</li></ul><h4>Who made the list?</h4><ol><li>Top of the list was Kim Soo-Hyun. If you have watched Moon Embracing the Sun. My Love from the Star or It’s Okay to Not Be Okay, you should know him.</li><li>So Ji-sub known for his roles in I’m Sorry I Love You, Something Happened in Bali, and Master’s Sun.</li><li>Crash Landing on You actor, Hyun Bin.</li><li>One of my all time favorite from Boys Over Flowers, Lee Min-ho.</li><li>Ji Chang-wook - Some of his top Korean dramas are Suspicious Partner, The Empress Ki, and Healer.</li><li>Jo In-Sung</li><li>Yoo Ah-in</li><li>Lee Jong-suk</li><li>Lee Seung-gi</li><li>Song Joong-ki</li></ol><h4>Points to note</h4><ul><li>I did a lot of back and forth between my code and the websites I was scraping from.</li><li>I was working on a small project and not data that needed to be scaled</li><li>I noticed that there were times when beautiful soup wouldn’t wait for a website to load properly and therefore would affect the information I could get from that website. In such instances, I had to rerun my code multiple times before I got the information I needed. Stack overflow gave me this insight as I initially thought my code had an issue. It also stated that Selenium can be used to avoid this error which I plan to learn about soon.</li></ul><h4>Link to other pages</h4><p>I hope this article is helpful to you or that you just enjoyed reading it. Here are links to the codes of this particular project and my other pages:</p><p><a href="https://github.com/Sofuwa/Data-Practice/blob/master/Highest_Paid_Kdrama_Actors_2021.ipynb">Project Link</a></p><p><a href="https://public.tableau.com/app/profile/oluwafunmilayo8574/viz/HighestPaidK-dramaActors2021/MainPage">Project Visualization</a></p><p><a href="https://github.com/Sofuwa/Data-Practice">GitHub</a></p><p><a href="https://public.tableau.com/profile/oluwafunmilayo8574">Tableau</a></p><p><a href="https://www.linkedin.com/in/oluwafunmilayo-sofuwa-79454390/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c78229bd254" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting new goals…]]></title>
            <link>https://oluwafunmilayo.medium.com/setting-new-goals-e4b9ed5d99?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4b9ed5d99</guid>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Tue, 27 Apr 2021 01:58:07 GMT</pubDate>
            <atom:updated>2021-08-18T17:32:05.220Z</atom:updated>
            <content:encoded><![CDATA[<p>An NLP analysis on 2015 New Year’s Eve Resolution tweets downloaded from Maven Analytics Digital Playground</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*Sm6m1cnks6dI8eubiOOUDw.jpeg" /><figcaption>Image gotten from google photos search</figcaption></figure><p>Social media has become such an important platform and tool nowadays. Individuals and businesses leverage social media platforms such as Twitter and Instagram for various purposes. Businesses leverage social media in advertising their services and products, getting feedbacks or reviews regarding their services as well as a range of other things such as getting insights about peak periods of sales, customer segmentation and so on.</p><p>It has become sort of a norm for individuals to set goals, plans, resolutions regarding things they want to change, do better at or even achieve as a new year is about to unfold. This was my first time using NLP to analyze data. My dataset was downloaded from Maven Analytics digital playground. The data is based on new year’s eve resolution tweets made by individuals towards the year 2015.</p><h3>DATA ANALYSIS PROCESS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31bLeZp9c6rEAdhGdsmvEQ.png" /></figure><p>DOWNLOADING THE DATA</p><p>The first step was to download my data from maven analytics digital playground. Maven analytics has really good datasets that can be used for visualizations. I chose to use the 2015 new year eve’s resolutions data. I wanted to practice analyzing text data using NLP and the volume of data is definitely what I needed to start off with.</p><p>DATA CLEANING</p><p>The next step was definitely to clean my data. I dropped columns which would not be useful to my analysis and visualization. I also had to deal replacing the null values in the retweet column with 0. The last column I needed to clean was the location column. To do this, I used regex and join.</p><p>DATA MANIPULATION</p><p>Next step was to manipulate the data to extract and create new features. I manipulated the date, tweet and location data.</p><p>From the date column, I extracted and created two new columns, hour and time of day. After extracting the hour from the date column, I used the information to group the hours into the different times of the day (midnight, early morning, morning, afternoon, evening and night).</p><p>In manipulating the tweets column, I wanted to extract the hashtags to see if there was any unique tag. Usually, tags such as #newyearnewme, #newyearresolution, for example, are commonly used and that reflected in the data.</p><p>To manipulate the location data, I employed geocoding. I used the Here developer geocoding api. All locations in the data were based in USA. The dataset had over 4000 rows of data and it took over an hour to run the geocoding. I chose to geocode my location to extract longitude, latitude, state code and county name. Some of the results returned had more than one location. To tackle this, I examined some of those rows and noticed that the actual location was presented as the last which is what I ended up extracting. My data already had a state code. I compared the existing state code with the geocoded state code and extracted the geocoded values if both state codes were a match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*reGt2g62NC1leC2D27O03Q.png" /><figcaption>Location Geocoding</figcaption></figure><p>TWEETS PROCESSING</p><p>After the long process of manipulating data, I had to process the tweets. Now tweets contain emojis, punctuations, single alphabets, numbers, hashtags and sometimes just weird unicode characters. I had to clean all these from the tweets first. Once this was done, I applied lemmatization to the tweets to get the root of words used in each tweet in the context which it is being used. For example, words like ‘go’, ‘goes’, ‘going’,’ went’ have the lemma ‘go’. I also filtered to exclude words that have a count of 3 and below. The last step I did was to apply pos_tagging (Part of Speech tagging). I used this to get an idea of the specific words that shaped people’s resolution. I only extracted the words that appeared in the context of a noun. Such words gave me more context than other parts of speech. For example, a tweet like ‘I want to get pregnant next year’, in this context ‘get pregnant’ is a noun.</p><p>DATA EXPLORATION</p><p>After the major heavy lifting had been done, I explored the data. I did a couple of visualization in python but the major visualization was done in Tableau. I created a word cloud to visualize the words used in the context of a noun.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*3fDAxqOpG73L4vkRK2cp9Q.png" /></figure><p>TABLEAU DASHBOARD VISUALIZATION</p><p>Finally, the last step!!!</p><p>To visualize my data in Tableau, I made used of excel which was where I stored my final output from my analysis. I also made use of SQL. I used SQL to query the most retweeted tweet per category. I tried using several tableau formulas for this but it didn’t quite come out right. This was probably because some categories had more than one tweet having the same maximum number of retweets and I only wanted categories that had one tweet having the most retweets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*Tnue3du6ltwZKHF5QnqX-A.png" /><figcaption>SQL query</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F542948094%3Fapp_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F542948094%3Fautoplay%3D1&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1123952057_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1282" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a0f9f89b9fd6d308358e56ef0949853/href">https://medium.com/media/6a0f9f89b9fd6d308358e56ef0949853/href</a></iframe><p>INSIGHTS AND RECOMMENDATIONS</p><p>The overall most retweeted tweet came from the finance category while the personal growth category had the highest number tweets created. Companies that focus on finance and personal growth (eg online courses) can leverage this information to get better information on what customer segment is tweeting about these resolutions. With this, targeted ads or services can be directed at that particular customer segment. It can also be an opportunity to turn potential customers to actual customers.</p><p>New York had the highest number of tweets created.</p><p>The time of day with the highest tweet activity was in the morning specifically around 9am. This is not unusual as most individuals are awake at this time. However, we cannot just conclude based on this assumption alone as other details come into play such as the nature of their job, age range and so on. This would help in making more informed decisions when it comes to marketing, advertising and knowing what customers to target.</p><p>LESSONS LEARNT</p><p>This was my first time analyzing text data with NLP and I definitely learnt some things</p><p>1. Try as much as possible to save your data after geocoding your location preferably in a json format. In this way, if for any reason you have a break in connection or need to restart your laptop, you can pick up from the saved data rather than the geocoding location all over again. I learnt this the very hard way.</p><p>2. When creating bins, ensure that all values that are being binned have the corresponding bin value. I didn’t realize until I was visualizing my data in Tableau that the hour 0 which was meant to be grouped as ‘morning’ was showing null instead. Thankfully I was able to rectify this in Tableau by grouping the null values with the morning category.</p><p>3. Employing other means of extracting data not just Tableau formulas. For example, using SQL, Excel or Google sheets.</p><p>I hope you enjoyed going through this post with me.</p><p>To view my notebook, click <a href="https://github.com/Sofuwa/Data-Practice/blob/master/New%20Year&#39;s%20Resolution%20NLP-Copy.ipynb">here</a></p><p>For a visual perspective, click <a href="https://public.tableau.com/profile/oluwafunmilayo8574#!/vizhome/2015NewYearsResolutions_16186021638040/Dashboard1">here</a></p><p>Connect with me on <a href="https://www.linkedin.com/in/oluwafunmilayo-sofuwa-79454390/">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4b9ed5d99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CHEERS TO THE FREAKING WEEKEND!!!!]]></title>
            <link>https://oluwafunmilayo.medium.com/cheers-to-the-freaking-weekend-75cc0334c4ba?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/75cc0334c4ba</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[wine]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[shecodeafrica]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Fri, 18 Dec 2020 20:47:57 GMT</pubDate>
            <atom:updated>2020-12-18T20:59:24.726Z</atom:updated>
            <content:encoded><![CDATA[<h3>ANALYZING AND PREDICTING WHITE WINE DATA</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*mzSrifpwp5la_TlX5ioFLg.png" /></figure><p>It’s the weekend people!! All I can think of right now is how I can’t wait to unwind with a really good bottle of wine and a good series, preferably Korean. Talking of wines, this post focuses on using machine learning to predict the quality of a sample wine data. Sounds interesting right? Let’s get right into it!</p><p>Here’s a link to my github page analyzing this data <a href="https://github.com/Sofuwa/She-Code-Africa/blob/main/White_Wine_Quality.ipynb">https://github.com/Sofuwa/She-Code-Africa/blob/main/White_Wine_Quality.ipynb</a></p><p>Below are the steps I used in analyzing and predicting my dataset. I’ll be giving a brief explanation of what I did under each step.</p><ol><li>Import Libraries</li><li>Data Preprocessing</li><li>Exploring and Dealing with Outliers</li><li>Exploratory Data Analysis (EDA)</li><li>Splitting and transforming the data</li><li>Dealing with Data Imbalance</li><li>Standardizing the data</li><li>Machine Learning Algorithm</li></ol><p>Importing the libraries that I used was the first step. I usually prefer to state all the libraries imported at the very top of my code because it’s more readable than leaving them in between other codes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*xX8MkuAHEGRFy1vjqQA-jw.png" /></figure><p>Data preprocessing was the second and the most important step. Data preprocessing if not done properly can lead to misleading insights and affect your predicted values. These errors can lead to significant negative effects especially if this is done in the context of a business as these insights could be leveraged in making decisions. I started off by checking if there was any null values. There are different ways to achieve this but I typically use the describe function which gives a descriptive statistics of the data including count of values, minimum and maximum values, mean etc. The data had no missing values but I noticed that it had some extreme values for certain variables eg the min and max for free sulfur dioxide is 2 and 289 respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWZ3QhEhjiLUHMDpqfCD3A.png" /></figure><p>These extreme values are referred to as outliers and there are a number of ways to deal with this. I made use of the box plot and IQR methods which allowed me to visualize the outliers as well as exclude the lower and upper bound outliers. Caution should be taken when dealing with outliers so as not to exclude a significant percentage of the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*6s7r17MYhoWenzBwjku9Og.png" /></figure><p>The machine learning algorithm I utilized was a classification algorithm. I created bins from the quality variables which I used in creating another variable called wine grade. This grade segments wine into bad, good and excellent. I also did a value counts to get how the data is distributed between the three classes and it showed that there was a significant level of imbalance in the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*i2YTSRCmJ7m-wX_yTzBiaA.png" /></figure><p>Exploratory data analysis is done to give an idea of what the data is like. You can get insights in distribution of the data, relationship between variables etc. I examined the relationship between the quality of wine or wine grade with four other variables I found really interesting: citric acid, volatile acidity, residual sugar and density.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*35a9iQ9sUWO2tNPVF_olfA.png" /><figcaption>Data Imbalance</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*wzdRHhh2-JbM6HHxshoIog.png" /><figcaption>The lower the density, the more excellent the wine</figcaption></figure><p>The next step was to encode and split my data intro training and test sets. In machine learning, variables inputted into the algorithm have to be in numbers, that is, any text would have to be coded as number. The label encoder converts texts to number. The only text in my data was the wine grade. The label encoder works by assigning numbers to the text after sorting in the texts in an ascending order. This means the wine grade will be sort as bad, excellent, good and encoded as 0,1,2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9FmXkSeICPitbOBKAH7Vg.png" /></figure><p>Splitting the data is another necessary step. The data needs to be split so that it can be trained properly. By training the data properly, the model would be able to make good or great predictions on unseen data. The test data acts as a form of unseen data to measure how accurate the machine learning algorithm can make accurate predictions after it has been trained with the training data. To deal with the imbalance I made use of SMOTE(Synthetic Minority Over-sampling Technique). SMOTE helps in dealing with data imbalance such as we have in this data. You can over sample or under sample. SMOTE over samples the data, in our cases the bad and excellent wine grade which have significantly less data than good wines, by introducing synthetic data to the classes with lower number of values. This will introduce more data to the classes and deal with the problem is imbalance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*LppobU6_PbvHrfOPbGL6tA.png" /></figure><p>Finally, making predictions using machine learning algorithms. In choosing the best suited machine learning algorithm for my data, I test my data with different models and select the best model based on the prediction results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*6OSZ30O9KAWIOGRm1SMh0Q.png" /></figure><p>After running the different machine learning models against the data, most of the results give an accuracy, precision, recall and f1 score of 1 stating the these models accurately predicted the test data values 100%. Accuracy should be the only metrics to determine how good your model is. Other metrics such as precision, recall and f1 score are also important. The closer accuracy, precision, recall and f1 score are to 1 the better your model. The closer to 0, the worse your model becomes.</p><p>Scikit-learn explains precision, recall and f1 score as:</p><p>The precision is the ratio tp / (tp + fp) where tp is the number of true positives and fp the number of false positives. The precision is intuitively the ability of the classifier not to label as positive a sample that is negative.</p><p>The recall is the ratio tp / (tp + fn) where tp is the number of true positives and fn the number of false negatives. The recall is intuitively the ability of the classifier to find all the positive samples.</p><p>The F-beta score can be interpreted as a weighted harmonic mean of the precision and recall, where an F-beta score reaches its best value at 1 and worst score at 0.</p><p>This should be something I’m dancing about but a 100% accuracy just tells me that my model is overfitted. This means that bringing in any other new data asides the test data would give us inaccurate results. Accuracy that fall between 80% and 95% however are great prediction result. I decided to employ the KNN model as it wasn’t overfitted and still gave me a great accuracy of about 84%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*skPUSVxJEUSpdfeLM1xKnA.png" /></figure><p>That bring me to the end of my mentorship program with She Code Africa. I look forward to learning more and utilizing all I have learnt in the future.</p><p>Till next time</p><p>Bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75cc0334c4ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CLASS PLACEMENT RATE: WHAT DOES THE DATA TELL US?]]></title>
            <link>https://oluwafunmilayo.medium.com/class-placement-rate-what-does-the-data-tell-us-6364d677264e?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/6364d677264e</guid>
            <category><![CDATA[shecodeafrica]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[placement]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Thu, 03 Dec 2020 09:29:49 GMT</pubDate>
            <atom:updated>2020-12-03T09:29:49.356Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WTFpeY6tXza3I8vBfb4yOg.jpeg" /></figure><p>I came across a class placement dataset recently on Kaggle. I wanted to carry out EDA analysis on the data and also practice my skills in machine learning. The dataset looks at the placement rate if students based on multiple criteria such as gender, degree taken in the university, if such students have an MBA with a specialization etc. For the context of my visualization in tableau, I examined several questions, some of which you can find below as well as the insights I was able to derive from the data.</p><p>a) What is the proportion of the placement rate?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*pziC9RSm3WR7C2X4E01BMw.png" /></figure><p>A lot of students were able to secure a placements with industries. From the visualization, we can see that about 70% of students were able to secure placements as against the 30% who were not placed.</p><p>b) Do students who have previous work experience have an edge over students who don’t?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*MWvDFpCK_d5SdPVAIDVz3A.png" /></figure><p>Work experience doesn’t seem to have an impact on students being placed. The visualization tells us however that students with no work experience had higher placement rate than students with work experience. On the other hand, students with work experience had a lower rate of not being placed (5%) compared with student with no work experience (27%).</p><p>c) What’s the likelihood of men getting placed compared to women?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*U99CpprAuGhqVx9kaagUpw.png" /></figure><p>Men are two times likely to get placed compared to women. This in itself is something that is still quite prevalent today across various industries.</p><p>d) What is the maximum salary distribution by gender?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*hWfk0lWdySVM17HWdSxJSw.png" /></figure><p>Just as men were two times more likely to get a job placement, they were also likely to get more salary when compared to their female counterparts.</p><p>e) What is the placement distribution based on the degree obtained while in school?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*0fKWh0JAat1BII4MnLzmsQ.png" /></figure><p>Communications and Management had by far the highest placement rate compared to the other two, Science &amp; Technology and Others. This could be due to a high demand for Communication and Management across industries in a particular period of time.</p><p>To view my complete visualization or download my tableau workbook, please visit <a href="https://public.tableau.com/profile/oluwafunmilayo8574#!/vizhome/PlacementData_16066821447100/Workexperience">https://public.tableau.com/profile/oluwafunmilayo8574#!/vizhome/PlacementData_16066821447100/Workexperience</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6364d677264e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MONTHLY RECAP: SHE CODE AFRICA]]></title>
            <link>https://oluwafunmilayo.medium.com/monthly-recap-she-code-africa-36efde9bd6d5?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/36efde9bd6d5</guid>
            <category><![CDATA[data-wrangling]]></category>
            <category><![CDATA[shecodeafrica]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Sun, 01 Nov 2020 10:50:07 GMT</pubDate>
            <atom:updated>2020-11-01T10:50:07.369Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently started my three months mentorship program with She Code Africa (Cohort 3) and it has been great so far. I took up an interest in data science and analytics some months ago and while I have been trying my hands on working with datasets from Kaggle, it’s important for me go back the basics once in a while. Another reason I’m glad to participate in this program is because I have an opportunity to be mentored.</p><p>In this post, I’ll give you a brief insight to tasks I did, new things I learnt and the likes.</p><p>WEEK 1</p><p>The task this week was to write two functions; guess the number function and a password generator function. The guess the number function was for users to guess a number between 0 and 20. In my function, the user gets to guess the number three times after which the right number will be printed if the guesses were wrong. During the three instances where user guesses the number, any number below or above the specified range, a warning will be printed telling the user that their guess is high or low and that they should guess lower or higher.</p><p>The second function was that of a password generator. I particularly enjoyed writing this function because it allowed me to work with the ‘string’ python module which I had never worked with before. The picture below shows my code for the password generator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*waZRtY6deN1aSf-Ii4GP7w.png" /></figure><p>WEEK 2</p><p>Probability was the focus this week. I wrote a medium post about this which you can find here: <a href="https://medium.com/@oluwafunmilayo/probability-and-data-science-8842c6f51601">https://medium.com/@oluwafunmilayo/probability-and-data-science-8842c6f51601</a> .</p><p>WEEK 3</p><p>I met with the Chinook dataset once again. The first time I worked with this dataset was when I was learning the basics of SQL. It was definitely interesting to work with this data in python. Working with this data in python required me to do a lot of merges which I wasn’t accustomed to. This is because the dataset has multiple tables and to get information about certain customers or maybe sales revenue, I needed to do a lot of merging across different data frames.</p><p>WEEK 4</p><p>Data Wrangling!</p><p>This is one of the most important steps when analyzing data. The data you are working with has to be sorted, filtered, cleaned etc. as real world data is always dirty. For example, your data may contain null values, also known as missing values. You have to deal with these values by either getting rid of such values or using statistics such as mean, median or mode to replace the missing values. Dealing with these values has to be done with caution.</p><p>I’m definitely looking forward to what the next two months will hold in store.</p><p>That’s it for today!</p><p>See you soon! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36efde9bd6d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROBABILITY AND DATA SCIENCE]]></title>
            <link>https://oluwafunmilayo.medium.com/probability-and-data-science-8842c6f51601?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/8842c6f51601</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Sun, 18 Oct 2020 00:47:39 GMT</pubDate>
            <atom:updated>2020-10-18T00:47:39.396Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*R_tIAFUPGskKqmStnh-asg.gif" /></figure><p>Leveraging data with data science and analytics is becoming more important across industries. We live in a world of technology and with growing developments in the technology, data generated by individuals and corporations keep increasing.</p><p>How then does probability affect data science and analytics?</p><p>Probability just has to do with the likelihood of an event occurring or not occurring. In the world we live in, we apply probability in our daily lives without even realizing it. Nothing is 100% certain. There is always some form of uncertainty. Probability is usually measured between 0 and 1 with 1 being the highest, that is, 100% certainty.</p><p>Some examples include the likelihood of being selected for a job or to a school you applied to, the likelihood of getting to a particular place early considering the flow traffic or even the likelihood that someone you really like would like you back. What if there was a way to measure the likelihood of these events? Probability is the way to go.</p><p>It is at the core of decision making, applications that are developed, technology advancements etc. By using Google maps to find out how long it would take for you to get to a certain place from your current location depends on probability given certain conditions e.g. weather conditions, traffic, speed of driving etc. It is never 100% accurate all the time but it does give a close enough estimate.</p><p>Let’s take a look at some basic concepts in probability along with some examples.</p><p>Random experiment: An experiment or a process for which the outcome cannot be predicted with certainty. It is called random if it has more than one outcome e.g. heads or tails in a coin toss.</p><p>Empirical probability: Probability that is calculated by performing an experiment one or more times. It considers the number of successful outcomes and the number of times the experiment was carried out E.g. what is the probability of making a basket after tossing a basketball into the hoop. To do this, you can toss the basketball for example, 500 times (the number of times the experiment was carried out) and count the number of times you made a basket, say 245 (the successful outcome). The probability of making a basket will be 245/500 = 0.49. For better understanding and readability, convert your answer to a percentage; 0.49 x 100% = 49%. Therefore such an individual has a 49% chance of making a basket based on his/her current skill level.</p><p>Theoretical probability: In real life scenarios, we can’t always perform experiments multiple times. Theoretical probability looks at the number of successful outcomes and the total number of possible outcomes. E.g. In a candy jar, there are 200 candies; 65 blue, 80 red , 55 purple and 90 yellow. What is the probability of choosing a red candy?</p><p>Total number of possible outcome = 200</p><p>Number of red candies = 80</p><p>Probability = 80/ 200 = 0.4 x 100% = 40%</p><p>The probability of choosing a red candy then is 40%</p><p>In data science, probability plays a huge role in machine learning and predictions, deep learning etc. For example, in predicting the profit a company, previous as well as present data is utilized when building a machine learning model. By considering this data, profit can be predicted for the next month(s) or even year(s). This prediction gives us a likelihood of what the profit might be for the period being predicted for and to what extent such predicted values are accurate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8842c6f51601" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROJECT 1]]></title>
            <link>https://oluwafunmilayo.medium.com/project-1-e38f055d7a0e?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e38f055d7a0e</guid>
            <category><![CDATA[plotly]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[forbes]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 15:18:02 GMT</pubDate>
            <atom:updated>2020-06-22T18:13:19.935Z</atom:updated>
            <content:encoded><![CDATA[<h3>Forbes Celebrity 100: The World’s Highest Paid Entertainers (2005–2019)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*62uvntbYXs3f8UvTxV_tyw.png" /></figure><p>I started my journey into data science and analytics probably at the beginning of 2019. I took a 6 months online course in data analytics where I learnt the basics of SQL, Tableau and Python to analyze and visualize data. After the course was done, I was really looking forward to getting a job and applying the skills I had learnt in real world situations. However, it’s not so easy to do that in the real world. I did get some opportunities but I never made it past the second to the final recruitment stage or even the final recruitment stage. I was able to get in touch with one of such companies to find out what I needed to improve on and they advised me to learn how to better clean and analyze data with Python rather than doing most of the data cleaning stage on Excel. I read somewhere recently about how taking a lot of MOOCs won’t help you till you actually put into practice what you’ve learnt on real world data and that’s what I decided to do.</p><p>This is the first of my real world projects I’m working on to challenge myself, build my portfolio and also learn a lot by JUST DOING! I would also be documenting each project here once its completed.</p><p>I obtained this dataset from Kaggle and you can find my full codes and visualizations here <a href="https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda">https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda</a><em>.</em> This project challenged me A LOT and it kind of took a while to complete it because there were days when I was just frustrated when my code wouldn’t do something I needed it to do but Google and a friend of mine helped me out and then my laptop developed a fault which took almost a week before I got it back. Nevertheless, I’m so proud that I completed this project.</p><p>Forbes Celebrity 100, according to Wikipedia is an annual list and its purpose is to list the world’s highest paid celebrities. The methodology used by Forbes to determine which celebrities are paid the most is by ranking ‘front of the camera’ stars around the globe using pretax earnings, over the course of a year, before deducting fees for managers, lawyers and agents.</p><p>Tools and packages I utilized:</p><p>· Jupyter Notebook from the Anaconda Navigator</p><p>· Pandas</p><p>· Plotly Express because of its interactivity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*1L2kFl0RA4gHzsZCbLQ19g.png" /></figure><p>I started out by exploring my dataset to find out if there was any missing data, to get a general idea of the data I was working on and to come up with questions about what insights or information I could get from the data. I came up with six questions but I’ll be addressing two of those here. To view my codes and visualizations check out my kaggle notebook <a href="https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda">https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda</a>. There was no missing data and the data was pretty much clean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*QRLm5_6jOsrTyediebTrSw.png" /></figure><p>All I did in the data cleaning stage was to group certain categories together which helped me reduce the number of categories from 13 to 9.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCgvyBA3iA1SDE69j_d5OQ.png" /></figure><p>One of the questions I wanted to find an answer to was which category had the most listing per year between 2005 and 2019. I began by creating the category_nom dataframe by grouping my data by year, category and calculating a count aggregate. Then, I created a new dataframe to filter the data in category_nom to show just data for the year 2019.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uHHgHix2pbc_XmRfWAwGTw.png" /></figure><p>From the visualizations below, it shows that Actors and Athletes had the most listing in 2005. Musicians, on the other hand, took the spot for most listed category between 2017 and 2019. Over the years, however, the Actors category generally had the most listings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6X5nRb2oNcXgQa9tts8lg.png" /><figcaption>Plotly Express category analysis code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*ORFrQSsglxfiEN03h7Y-wQ.png" /></figure><p>The second question was to analyze and show the ten celebrities to make it to the top of the Forbes Celebrity 100 list in 2019 along with their earnings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--6sD4utCfjcrFS6dQr5EA.png" /></figure><p>The visualization below shows that Taylor Swift, was the highest earning entertainer in 2019 earning $185M. Kylie Jenner and Kanye West took the second and third spots respectively having $170M and $150M each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LYrN-KTHI-yzTiPn2X6NPQ.png" /><figcaption>Pltly Express Top list code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*p8GbgB9r9V4ht27N02mYlw.png" /></figure><p>Once again to view the entirety of my codes and visualizations, you can do that here <a href="https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda">https://www.kaggle.com/sofuwaoo/forbes-celebrity-100-eda</a></p><p>Till next time</p><p>Stay Safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e38f055d7a0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AN ANALYSIS OF THE FIFA WORLD CUP]]></title>
            <link>https://oluwafunmilayo.medium.com/an-analysis-of-the-fifa-world-cup-4f295be42b53?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f295be42b53</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[git-girl]]></category>
            <category><![CDATA[fifa]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[football]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Sun, 23 Jun 2019 23:29:06 GMT</pubDate>
            <atom:updated>2020-06-09T10:27:32.266Z</atom:updated>
            <content:encoded><![CDATA[<h4>An analysis of the FIFA World Cup</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R1nYjRTHekFyH44wUZhlgw.jpeg" /></figure><p><strong><em>What is football to you?</em></strong></p><p>Pelé, regarded by many as the greatest player of all time describes football as <em>“a beautiful game”</em>.</p><p>I do not watch football regularly but I do follow the FIFA World Cup. I would describe football as a game of emotions, friends and family. There are always various emotions that people experience when watching football which include but are not limited to happiness, anger, sadness, tension.</p><p>The FIFA World Cup was founded in 1930 and has been held every four years ever since with the exception of the 1942 and 1946 World Cup which were cancelled due to the Second World War. Wikipedia states “The World Cup is the most prestigious association football tournament in the world, as well as the most widely viewed and followed sporting event in the world, exceeding even the Olympic Games; the cumulative viewership of all matches of the 2006 World Cup was estimated to be 23.29 billion with an estimated 715.1 million watching the final match, a ninth of the entire population of planet.”</p><h4><strong>THE DATA-SET</strong></h4><p>One of our final projects at Gitgirl was to analyze the FIFA World Cup data from 1930–2014 with the aid of Tableau and create a dashboard. I would be taking you through a step by step of how I analyzed my data. Before I could begin analyzing my data I had to understand the data-set. The data-set had three sheets; the first and second sheets were similar with data such as the year, date, time of the match, round, city, country, observation, stadium, home and away teams and as well as the home and away goals. The third sheet had data on year, country, winner, runner up, third, fourth, total goals scored, teams qualified, total matches played and total attendance. I ended up using the first and third sheets because the total goals scored seemed closer. I had to do some minor cleaning of my data to remove symbols from the names of the stadium and remove duplicates before I could start analyzing my data.</p><p><strong>DATA ANALYSIS</strong></p><p>To begin analyzing my data, I had to come up questions I wanted to answer as well as visualize.</p><p>The questions I went with are discussed below:</p><p>Here is a link to my visualization: <a href="https://public.tableau.com/shared/GFNZ5GNCG?:display_count=yes&amp;:origin=viz_share_link">https://public.tableau.com/shared/GFNZ5GNCG?:display_count=yes&amp;:origin=viz_share_link</a></p><p><strong><em>Which countries have won the FIFA World Cup and how many times have they won?</em></strong></p><p>To determine this, I created a new group from winners which I renamed World Cup Winners. This is because I had to group Germany and Germany FR as one. Thereafter I dragged World Cup Winners to the column label to show the names of the winner and Winner to the row label as a count to show how many times each country won the FIFA World Cup title.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*AmYIZcQDaLCRp8wDPoKM5g.png" /></figure><p>As at 2014, Brazil had won the FIFA World Cup title five times; Italy and Germany four times; Uruguay and Argentina twice; France, Spain and England once. Hovering or selecting any of the bars will bring up a tooltip which contains information. I linked my visualization on what year(s) these countries won the FIFA World Cup title to my tooltip. Here the information that will be shown is about the name of the country, how many times they have won the FIFA World Cup title between 1930 and 2014 as well as visualization on what year(s) each country won the FIFA World Cup title.</p><p><strong><em>What year(s) did these countries win the FIFA World Cup title?</em></strong></p><p>I wanted to further to explore the specific years that each country won the FIFA World Cup title(s). To visualize this, I dragged World Cup Winners to the column label and Year to the row label. I also added a color mark to distinguish between each of the eight countries that have won the FIFA World Cup title. The tooltip, which comes up by hovering or selecting any of the data points states the winning country, the year they won and the host country.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*6XF7p3fExhEXxTvuR-F01Q.png" /></figure><p><strong><em>Brazil is the most successful team to win the FIFA World Cup title. What are their statistics at the finals over the years?</em></strong></p><p>Brazil is the most successful team at the FIFA World Cup with five World Cup titles and according to Wikipedia, Brazil is the only team that has played in every World Cup tournament. For my visualization, I had to convert my year dimension from continuous to discrete. This is because leaving my year as a continuous data messed up my visualization and also I wanted my filter for year to be a single value drop-down menu rather than a slider. From the round dimension, I created a group called stage where I combined all the groups (Group A, B etc.) into one and also grouped play-off for third place which had multiple names in the data into one. I also wrote two SQL queries to determine if the match played ended in a win, tie or loss and named it match results for home team and match results for away team. I did this because some teams such as Brazil played as the home and away team in different matches and I wanted to get the full scope of the match statistics. For Brazil match statistics as the home team, I dragged home goals which automatically aggregated as a sum to the column label and year, stage, home team, away team, match results of home team onto my row label. I used year, home team and stage as my filters where year was filtered to all, home team to Brazil and stage to final. For Brazil match statistics as the away team, I repeated the above in another sheet with the exception of using away goals rather than home goals in my column label and match results for away team rather than match results for home team. . I used year, away team and stage as my filters where year was filtered to all, away team to Brazil and stage to final.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*vryItEm5OCqMPe-HPJtueQ.png" /><figcaption>SQL Query for Home Team</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*_6EzgWIXpl51UyDe6C0myw.png" /><figcaption>SQL Query for Away Team</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*1HEfVtQY89HwW5l9k1XmXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*KxXbNDk1PL1eghUOw-nBFw.png" /></figure><p>The visualization shows the years Brazil won, tied and lost their final match as well as what they scored against their opponents. Brazil won the World Cup title in 1958, 1962, 1970, 1994 and 2002. In 1994, they tied with Italy but went on to win against them with penalties. Hovering or selecting any of the bars will bring up the tooltip which shows information on the year, host country, stadium, home and away teams, home and away goals, stage, match results for the home or away team and comments if any(for example penalties).</p><p><strong><em>Is there a correlation between sum of goals scored and number of qualified teams at each FIFA World Cup?</em></strong></p><p>Finally, I wanted to determine if there was any correlation between the total number of goals scored and the number of teams that qualified in each World Cup. To visualize this, I simply dragged goals scored to the column label and qualified teams to the row label. The number of teams that qualified for the FIFA World Cup between 1930 and 1978 ranged between 13 and 16. This number increased to 24 between 1982 and 1994, which further increased to 32 in 1998 and has been the format that has been used since then. However, the number of teams that will qualify to play at the FIFA World Cup will increase from 32 to 48 and will be implemented in the year 2026.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*m3Fz9RewvIdRHo-Gmm3lXA.png" /></figure><p>The visualization shows that there is a positive correlation between total goals scored at each World cup and number of qualified teams. With every significant increase in the number of teams qualified to play at the World Cup, the total number of goals also increases significantly. My tooltip shows the number of qualified teams, year, host country and total number of goals scored.</p><p><strong>PUTTING IT ALL TOGETHER</strong></p><p>My final objective was to merge my visualizations into one sheet as a dashboard. Creating a dashboard was relatively easy. I just had to drag the sheets I wanted into the dashboard, rearrange them the way I wanted and just carry out some minor tweaks. One of the minor tweaks I did included formatting my home and away team sheet names so that whichever home or away team is selected in the filter updates in the sheet names as well, for example if I choose Italy as my home team, the sheet name will update from “Brazil World Cup Statistics (Home Team)” to “Italy World Cup Statistics (Home Team)”. I named my dashboard, applied the year and stage filter to both my home and away team sheets so that whatever year or stage is selected applies only to those sheets. The home team filter affects just the home team sheet and the away team filter affects the away team sheet only. To get the best result or full scope of each country’s statistics, I stated that the home and away team filters should be set to the same country.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EjWhiP-DuieFg2DMsvnU7A.png" /></figure><p>I hope you enjoyed this because I sure enjoyed working on this!</p><p>Till next time,</p><p>Bye.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f295be42b53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL: THE HACKERRANK CHALLENGE]]></title>
            <link>https://oluwafunmilayo.medium.com/sql-the-hackerrank-challenge-9c1b4a01059f?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c1b4a01059f</guid>
            <category><![CDATA[git-girl]]></category>
            <category><![CDATA[hackerrank]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Mon, 27 May 2019 02:08:34 GMT</pubDate>
            <atom:updated>2020-06-09T10:29:01.750Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>SQL: The Hackerrank Challenge</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*gHLlvTIan-EBAOaypVVcgA.png" /></figure><p>Hello everyone!!!</p><p>New Month, New Challenges!! The project for this month from the GitGirl School of Data that I attend is putting our knowledge about SQL to practice through the HackerRank SQL challenge. Before I go on to discussing the challenge, we had to study some advanced syntax and functions in SQL. These include but are not limited to case when, advanced queries such as correlated and nested sub-queries, window functions and so on. Now, in order to get a better understanding to these advanced syntax and functions in SQL, it is paramount that you have a beginner’s knowledge in SQL. That being said, there are sites and online programs that you can learn this from including Youtube, DataCamp as well as GitGirl School of Data among other options.</p><p>I’m going to let you in on a little secret and that is, I did not really understand what exactly I was studying this month. I had a ton of material to cover and it was really challenging for me and if it is the same way for you, that’s okay. Just remember, you have to keep practicing. I sometimes go back to the beginning again which is what I’m currently doing to better understand what I am trying to study. That being said, I had to start working on the HackerRank SQL challenges knowing that I would learn new things along the way. The easy challenges were relatively easy to solve but the medium challenges were kind of a hard nut to crack. Sometimes, I had to go through the discussions for such challenges to better understand how to go about solving the challenges. There were certain new terms and lessons I learnt along the way such as:</p><p>CEIL: This is used to obtain the smallest integer which is greater than or equal to a numeric expression. It helps you round up decimal numbers.</p><p>FLOOR: This is the opposite of the ‘CEIL’ function. This helps you round down decimal numbers.</p><p>HAVING: This works in the same way as the ‘WHERE’ clause with the exception that it work with aggregate values which the ‘WHERE’ clause cannot carry out.</p><p>Lesson 1: When writing queries, especially sub-queries, you have to be careful about your indentation.</p><p>Lesson 2: You have to use the right syntax else it could affect your whole query.</p><p>Lesson 3: Always spell-check your queries.</p><p>I’m going to share 2 challenges (1 easy and 1 medium challenge) along with my solution. Note that there is never just one way to go about solving these challenges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*5S2E1WUmzn9wRDtdBOde8g.png" /><figcaption>PROBLEM 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*RLiYsR_9cYSHks2uHlciEQ.png" /><figcaption>SOLUTION 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*NvXCEkoVMevZYNCQBDQ23Q.png" /><figcaption>PROBLEM 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*btXsSe_VqNMG0uEodVLwGw.png" /><figcaption>SOLUTION 2</figcaption></figure><p>I hope you enjoyed this post and don’t forget practice is key!!</p><p>Until next time, happy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c1b4a01059f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DATA WRANGLING: SEYCHELLES TRAVEL DATA]]></title>
            <link>https://oluwafunmilayo.medium.com/data-wrangling-seychelles-travel-data-b5a5d9b6ed73?source=rss-90a3f3c2f63------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5a5d9b6ed73</guid>
            <category><![CDATA[tableau-prep]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[git-girl]]></category>
            <category><![CDATA[tableau]]></category>
            <dc:creator><![CDATA[Oluwafunmilayo C. Sofuwa]]></dc:creator>
            <pubDate>Wed, 01 May 2019 11:05:59 GMT</pubDate>
            <atom:updated>2020-06-09T10:30:04.369Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Data wrangling: Seychelles travel data</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*P93oDAnQsFy2BJ4PgTMtKw.jpeg" /></figure><p>Data wrangling which is often known as data cleaning is an important step in the data analysis process. Data cleaning has often been done with Excel among other tools in the past which was time consuming. The preparation of data with Excel constituted 80% of the work to be done while data analysis constituted 20%. However, with the introduction of Tableau prep, data cleaning can be easily done in a lesser amount of time than before. Our project at Git Girl for the month of April was wrangling the travel data for Seychelles from 2000–2017 with Excel and Tableau. Here is a link to the raw data: <a href="https://www.nbs.gov.sc/statistics/tourism">https://www.nbs.gov.sc/statistics/tourism</a></p><p>First things first, I wanted opened the data set to explore it as well as understand what the data was all about. The Seychelles travel data contains information regarding the country of departure as well as the continent, monthly and quarterly travel data, mode of transport(air and sea). Thereafter, I took some tutorials on Tableau prep which you can find here: <a href="https://www.tableau.com/learn/tutorials/on-demand/join-step?product=all&amp;version=tableau_prep_2019_1_2&amp;topic=tableau_prep"><em>https://www.tableau.com/learn/tutorials/on-demand/join-step?product=all&amp;version=tableau_prep_2019_1_2&amp;topic=tableau_prep</em></a></p><p>With Tableau prep, you can easily create a union between two or more data set if they have similar structures or headers or fields. You can also join two or more data if they have at least one common field. The pivot step provides you with the ability to convert your data from columns to rows.</p><p>The raw data set is readable in Excel as you can see in the screenshot below, however, connecting your data to Tableau prep in that format would make your data unreadable and hard to clean. The data set had two data tables on each sheet(the visitor arrivals by country and visitors arrivals by purpose). I did a basic cleaning on the data by getting rid of the arrivals by purpose table and focused on the arrivals by country. This is because joining these two data tables in Tableau prep would not be possible as they do not have common fields(Data was either collected either through continent and country or through purpose of visit). I also got rid of the grand totals and had to replace the blank cells with 0. To do this, I highlighted the area where the figures are, selected the ‘Go To Special’ function which is in the ‘Find and Select’ function under the ‘Home’ tab. I selected blanks, then used the replace function to fill the blanks with 0. I also defined my headers properly by removing any data above my headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLUk8p8xkcB_RStLISg3dQ.png" /></figure><p>The table format for certain years (2013–2017) was quite different from the previous years which can be seen in the image below. I had to restructure it so that they had the same format as the previous years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vFwcGk_YzE5CxZLBiz91g.png" /></figure><p>I also added another column(country of destination) to my table to make my table more understandable. Below is what my my excel sheet looked liked after the basic data cleaning and prior to cleaning my data with Tableau Prep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aSMN7Nr5t59XrJfQvaTKQA.png" /><figcaption>Data prior to Tableau Prep cleaning</figcaption></figure><p>I initially struggled with cleaning my data with Tableau Prep. I did a lot of unions and cleaning steps to merge all 18 years which although is not bad but is time consuming. Here is what my Tableau Prep flow looked liked originally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Afivk-QN2JX-lEn8AECC-A.png" /></figure><p>I had already produced my output when I realized my mistake and had to do it all over again. This time around, I used the data interpreter and a wildcard union rather than single table to combine the different sheets of data. A data interpreter can be found when you connect your data to Tableau Prep and it helps to clean your data properly by defining what the header and data should be. A wildcard union is especially useful when you need to combine data with similar structures that spans across several sheets in Excel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TLTvFP2qUTuQHX3he3weeQ.png" /></figure><p>This allowed me to clean my data quickly and effectively. After connecting my data to Tableau Prep, I cleaned my data by removing certain tabs, renamed some tabs, used the automatic split function on table names to derive the years etc. Thereafter, I used the pivot step to convert the month and mode of transport from columns to rows. This makes the data easier to analyze and visualize. I further cleaned my data by renaming the tabs I pivoted as months and mode of transport. The final step was to create my output which I saved as ‘csv’ rather than ‘tde’ or ‘hyper’. This is what my data looked liked after cleaning my data with Tableau Prep:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6SU30o2TmbHfEcBqLGDk4g.png" /></figure><p>That’s it for this project. Hope you had fun!! If you have questions, you can leave your comments. Till another time, Happy Analyzing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5a5d9b6ed73" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>