RSSAmplifier

Blog

Salem Marafi

salemmarafi.comRSS feed ↗10 posts

Latest posts

Diving into Data – An SQL Course on Udemy by MBASQL.com

An interactive SQL learning experience We run a micro-courses business, Afterskills, to help professionals ramp up their skills on specific and technical topics. One of our products, MBASQL, is designed to help MBA’s, Business Analysts, and other professionals in Marketing, Online Fashion, and E-Commerce ramp up their skills with Data. Today, we launched that course […]

Recursively rename files to their parent folder’s name

If you own a business and sell online, you will have had to – at some point or another – name a whole bunch of images in a specific way to stay organised. If you sell on behalf of brands, naming your images is even more important. Problem: Lets say you had your images sorted […]

Collaborative Filtering with Python

To start, I have to say that it is really heartwarming to get feedback from readers, so thank you for engagement. This post is a response to a request made collaborative filtering with R. The approach used in the post required the use of loops on several occassions. Loops in R are infamous for being […]

Counting Tweets in R – Substrings, Chaining, and Grouping

I was recently sent an email about transforming tweet data and presenting it in a simple way to represent stats about tweets by a certain category. I thought I would share how to do this: A tweet is basically composed of text, hash tags (text prefixed with #), mentions (text prefixed with @), and lastly […]

Why we die – Mortality in Kuwait with R

I came across Randy Olson’s (editor at @DataIsBeautiful) tweet about causes of death in the US. I thought I would replicate the information here using R and localize it for Kuwait – nothing fancy. I will keep the code to the end because I think the results are quite interesting. The data source is from […]

Price Elasticity with R

Scenario We covered Price Elasticity in an accompanying post. In this post we will look at how we can use this information to analyse our own product and cross product elasticity. The scenario is as follows: You are the owner of a corner mom and pop shop that sells eggs and cookies. You sometimes put […]

Price Elasticity

Concept The concept of price elasticity is pretty easy to grasp. In economics, it is a measure of how sensitive demand or supply is to price. In marketing, it is how sensitive consumers are to a change in price of a product. There are many determinant of elasticity that are both supply-side and demand-side. Nevertheless […]

Overweight in Kuwait – Food Supply with R

Disclaimer I cannot say this enough … I have no idea about nutrition. In fact, if one were to ask me for a dietary plan it would consist of 4 portions of cookies and 20 portions of coffee. The reason I am doing this is to practice and demonstrate how to do some analysis with […]

Overweight in Kuwait – BMI with R

Inspiration Let me open with this: Faisal Al-Basri brings a lot of laughter into my life. It’s nothing short of a pleasure watching the political, social, and general satire on his instagram account. One particular post recently caught my attention – entitled: “Kuwaiti Women 2nd most obese world wide”. In his own words: Instagram (Rough) […]

Kuwait Sugar Consumption with R

I was doing Facebook’s Udacity Explorartory Data Analysis course and one of the tasks is to use GapMinder.org’s data to visualise data. So I picked sugar consumption per capita per day; diabetes is a subject that has always been close and interesting to me. The graph above shows Kuwait’s sugar consumption relative to world averages. […]