Mortgage - This is one word that we hear every now and then all over the news, social media and newspapers and probably ponder about the rigorous math and calculations it entails.
Taking a mortgage is such a huge step towards future home ownership. To some, it’s such a big priority in their lives that they start saving money for the loan periodically(monthly, quarterly etc) annually for quite a number of years.
Investopedia.com states that the most popular mortgages are a 30-year fixed and a 15-year fixed. …
Machine Learning algorithms are used in a wide variety of applications and among them is the healthcare industry. According to Wikipedia, Machine Learning is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence.
Machine learning algorithms build a mathematical model based on sample data, known as “training data”, in order to make predictions or decisions without being explicitly programmed to perform the task.
The Lion King (2019) is a movie that has dominated box office charts since its release. Moreover, an interesting music album “The Lion King: The Gift” was released to accompany the 1994 movie remake.
On July 19, 2019, The Lion King(2019 film) was theatrically released in the United States and has grossed over $1 billion worldwide, becoming the fourth highest-grossing film of 2019, the eighth highest-grossing animated film, and the 39th highest-grossing film of all-time. Wikipedia further states that it received mixed reviews, with praise for its visual effects, musical score, and vocal performances but criticism for the lack of…
In a previous article on ‘Forest and Tree Statistics in Kenya’ (https://medium.com/@wanjirumaggie45/forest-and-tree-statistics-in-kenya-using-r-6cfa9f67ea9b), we looked at Kenya’s current forest cover which stands at 7.6 %. The analysis was based on this data set: https://rainforests.mongabay.com/deforestation/archive/Kenya.htm. The results were okay but they got me thinking about delving deeper into the statistics such as looking at the data per county. Luckily, the same data source was neat for this case study as well.
Making beautiful data visualizations is something I enjoy doing. So I challenged myself to do an interactive map using the ‘plotly’ package in R as we will see below.
Imagine you are a data scientist/ data enthusiast and you are really curious to know what people online are saying about a new product you just launched. Now, you most definitely introduced a hashtag whereby anyone who sees the hashtag can click on it and be brought to a page featuring the feed of all the most recent tweets that contain that particular hashtag.
Moving on, the main question becomes, how do you extract Twitter tweets in R? …
According to KeNRA (Natural Resources Alliance of Kenya), from an international view, Kenya is a low forest cover country considering that it has less than 10 per cent of the total land area classified as forest as recommended by the United Nations. The country’s forest cover is now said to be at 7% having increased by 5.3% since 2013. A report by the environment cabinet secretary Judy Wakhungu earlier this year attributed this to the rehabilitation of over 400,000 hectares of degraded public land, which is part of the government’s strategy to combat desertification. Wakhungu according to The Star Newspaper…
As at 2018, with Kenya’s public debt crossing the Sh5 trillion mark, this meant that every Kenyan would now owe the lending institutions at least Sh110,000, this is according to Daily Nation.
Hence, I sought out to find out the outstanding bilateral debt of the lending countries. I used the PowerBI Desktop for interactive graphs and visualizations.
Data Source: Kenya National Bureau of Statistics 2019 Economic Survey
1. Which country does Kenya owe the most money (2014–2018)? It appears that it is China at Kshs 2.8 Trillion followed by Japan at Kshs 1.7 trillion.
2. How has the debt fared over the years per country?
From Part 1 of the mapping series, we loaded shapefiles into R and plotted the Kenyan map based on the given county coordinates(the shapefiles GEO folder).
Here, we will extract the Kenyan Map from the world map data. The world map can be obtained as a base map of the world using ggplot2. See below;
# #Load packages ---------------------------------------------------library(tidyverse)
library(rgeos)# #Obtain the world map --------------------------------------------world1 <- map_data("world")
# #Plot the world map ----------------------------------------------ggplot(world1, aes(x=long, y=lat, group=group))+
geom_polygon(fill="green",color = "black")
I was once sent a zipped folder named shapefiles Geo and I honestly didn’t know what to do with it. As we all do, I first downloaded the folder and saved them on my desktop. I then unzipped the folder and on opening it, there were 3 Microsoft Excel CSV files, a text document, DBF file, PRJ file, SBN file, SBX file, SHP file, XML document, SHX file and PNG file.
The files frightened me. It was my first encounter with shapefiles and I must admit that after merely looking at these file names, I closed the folder and never…
“Tidy Tuesday is a weekly social data project in R. Every week Thomas Mock; https://twitter.com/thomas_mock and the R for Data Science Community; https://twitter.com/R4DScommunity post a new dataset and ask R users to explore it and share their findings on Twitter with #TidyTuesday. Since the first dataset was posted on April 2nd, 2018, there are now over 40 datasets and more than 800 #TidyTuesday tweets from 221 users!” — https://nsgrantham.com/tidytuesdayrocks/
From the moment I discovered #TidyTuesday, I have never looked back.
Below are my plots so far; (The plots are all coded in R. I work mostly in R due to…