# data[].attributes.body
Online food delivery (“OFD”) applications such as Grabfood and Foodpanda have revolutionised the food takeout industry, allowing people to order their meals with ease and convenience at the click of a button on their mobile phones. However, not everyone is convinced. Citing reasons such as bad past experiences and higher costs, there is still a substantial number of people who shun the use of these OFD apps.

From the OFD app companies' perspective, this group of people could represent an opportunity for the companies to capture more market share in a highly competitive OFD industry.

Zomato, the most popular OFD app company in India with around 40% market share in 2019, commissioned a study to better understand India's city dweller demographics, habits and preferences impacting their food takeout decision making process.

Based on the insights gained, Zomato aims to develop marketing strategies to increase its customer conversion and retention rates for its OFD app, thereby increasing its bottom line.

# data[].attributes.body
With millennials accounting for 63% of the overall user base of the OFD app market in India 2019 (see footnote 1), Zomato decided to randomly select 388 subjects between the ages of 18 to 33 from the bustling city of Bangladesh in India for this study.

The 388 subjects were interviewed with 55 questions, the breakdown of which are as follows:
-10 questions are related to the subjects' demographics (e.g age, gender, occupation etc).
-10 questions are on the subject's food takeout habits (e.g which method do they use to order their takeout food most often etc).
- 35 questions are related to the subject's preferences or opinions (e.g maximum waiting time, offers and discount etc) and how they might influence the subject's decision to use an OFD app or not.

# data[].attributes.body
Before we can derive meaningful insights from the survey results, we subjected the dataset to the augmented data preparation process as follows:
1. Accessing the dataset.
2. Profiling the dataset to identify data quality problems.
3. Performing data cleaning and transformation.
4. Pivoting the data to identify patterns and draw insights
5. Normalising/ scaling the data before feeding into regression model
The above process converts the raw data into a format that is suitable and ready for further augmented analytics to be performed.

# data[].attributes.body
Each of the 388 subject's responses to the 55 questions were recorded, compiled and published on the following website: https://www.kaggle.com/benroshan/online-food-delivery-preferencesbangalore-region?select=onlinedeliverydata.csv
We extracted the dataset as an excel file and uploaded it into TIBCO, before proceeding to step 2: Data profiling.

# data[].attributes.body
While we may have all the 833 subject's responses to the 55 questions, chances are that some of the data is not clean. We made use of TIBCO's augmented data preparation tools to identify and fix data quality problems such as incorrect, incomplete, irrelevant, duplicated, or improperly formatted data.

Data Profiling:  For example, we understand that the dataset was collected by surveying city dwellers between the ages of 18 to 33. In order to confirm this, we made use of TIBCO's Visualisation Recommendation tool to perform a semantic check. When we created the histogram recommended by TIBCO, we observed that there is a record with the age of 72. Clearly, this is an outlier that could have been caused by typing in the wrong age.

Data Cleaning: Because there is only 1 outlier, we can remove this row of data by clicking on the outlier on the histogram to delete it.

# data[].attributes.body
Majority (35) of the 55 questions were related to preferences or opinions(e.g waiting time, offers and promotions) that might influence the subject's decision to use a OFD app or not. For these questions, subjects selected one of the 5 ratings (Strongly agree, agree, neutral, disagree or strongly disagree) to reflect how important each attribute was in affecting their decision making process.

These 5 ratings (Strongly agree, agree, neutral, disagree or strongly disagree) are Ordinal Data, and their natural order or ranking is important for our analysis. While humans can easily tell the difference in ranking between e.g strongly agree and just agree or neutral , analytical software such as TIBCO is not able to do so automatically on textual data.

Thus, we performed data transformation to convert the 5 ratings into a numeric scale as follows:
(Strongly agree to 2)
(Agree to 1)
(Neutral to 0)
(Disagree to -1)
(Strongly disagree to -2)

# data[].attributes.body
To illustrate, we performed data transformation on the Time Saving column using the following steps:
1.       Click on  the Data Canvas dialog.

2.       Click on the + sign and select Add transformations
3.       Select Calculate new column and click Insert
4.       Input the code below to convert the ratings "Strongly agree to strongly disagree" to the numeric value (-2, -1, 0, 1, 2) under a new column called Time Saving Recoded:

# data[].attributes.headline
3.2 Data Transformation - Time Saving Recode

# data[].attributes.subject
3.2 Data Transformation - Time Saving Recode

# data[].attributes.body
When we click on the TIBCO's Data Panel to look up the new column Time Saving Recode created, observe that the data has been converted to the numeric scale (2,1,0,-1,2) as per the screenshot below.

We can repeat the above process for the remaining 34 preference variables. Thereafter, we can use TIBCO tools to compare the different variables using the numeric scale created.

For example, if TIBCO computes that the average score of the “Time savings” variable is 1.5 while that of “Affordable” is -1.0, it implies that subjects generally agree that Online Food Delivery platform brings about time savings, but disagree that it is cheaper than other food order options (e.g walk-in, call in or use a web-browser to make orders).

# data[].attributes.headline
4.1 Data Profiling and Pivoting - Output

# data[].attributes.subject
4.1 Data Profiling and Pivoting - Output

# data[].attributes.body
Out of our 388 subjects surveyed, 301 of them have identified themselves as supporters of using an OFD app, while the remaining 87 are non-supporters, preferring to stick to other forms of food delivery methods (e.g walk-in, call in or use internet browser). This information is captured under the Output column as "Yes" for supporters and "No" for non-supporters.

# data[].attributes.body
We wanted to see whether the supporters and non-supporters differ in their opinion on whether the use of an OFD app led to time savings. Thus, we made use of TIBCO's Pivot function to group the responses for the Time Saving column according to the Output columns.

Under TIBCO's Pivot function, choose Time Saving for the rows, and Output for the column.

# data[].attributes.body
The pivot table results indeed show that there is a significant difference in opinion between the supporters and non-supporters on whether the use of OFD platforms led to time savings for them.

From the table, we can see that majority (131+109 =240 out of 311) of the supporters either agree or strongly agree that the use of OFD app led to time savings for them. Conversely, majority (51 out of 87) of the non-supporters disagree that the use of Online Food Delivery platforms led to time savings. Conversely,

Based on these results, we can infer that majority of the supporters are satisfied with the time savings brought about by the use of Online Food Delivery apps. Thus, the app company does not need to worry about time savings to continue retaining these supporters as their customers. Instead, the app company should do a similar pivot against the other 34 preference variables to find out which variable the supporters are least satisfied with. The app company can work on improving these other variables.

As for the non-supporters, maybe they experienced long delays when they ordered their food using an Online Food Delivery app in the past, which led them to become non-supporters. Thus, in order to convert this group of non-supporters into supporters, the app company should focus on finding out what led to the long delays faced by the non-supporters and solve it. Then, maybe these non-supporters will become supporters of the food delivery app and increase market share for the company.

# data[].attributes.headline
5.1 Data Normalisation/ Scaling - Age and Income

# data[].attributes.subject
5.1 Data Normalisation/ Scaling - Age and Income

# data[].attributes.body
Insofar, we know the following about the 388 subjects:
- Their age is between 18 to 33 years old.
- Their minimum monthly income can vary widely from 0 to 50001 rupees, depending on their occupation

We can use these 2 variables as part of further analysis like linear multivariate linear regression to predict whether someone is likely to be a supporter or non-supporter of OFD app by virtue of their age or minimum monthly income.

However, because the data values of Minimum Monthly Income is much larger than the age values, the Minimum Monthly Income variable will automatically and disproportionately have a much larger impact on the model output than Age. This is not accurate as age could be just as important income in predicting the output of whether the person will be a supporter or non-supporter of OFD app.

# data[].attributes.headline
5.2 Data Normalisation/ Scaling - Age and Income

# data[].attributes.subject
5.2 Data Normalisation/ Scaling - Age and Income

# data[].attributes.body
Thus, we made use of TIBCO’s normalisation function on the data for these 2 variables to scale all the data to the same range of between 0 to 1.

# data[].attributes.headline
5.3 Data Normalisation/ Scaling - Age and Income

# data[].attributes.subject
5.3 Data Normalisation/ Scaling - Age and Income

# data[].attributes.body
The data for the Age and Minimum Monthly Income have been scaled to between 0 to 1.

To note, however, that Minimum Monthly Income does not have bell-shaped distribution because a substantial number of the subjects surveyed were students or housewives with little to no income.

Nevertheless, when these scaled data is then fed into a regression model, these 2 columns will be more comparable in terms of importance in predicting the output.

# data[].attributes.body
https://www.kaggle.com/benroshan/online-food-delivery-preferencesbangalore-region?select=onlinedeliverydata.csv

https://www.businesswire.com/news/home/20200421005457/en/Outlook-on-the-Online-Food-Delivery-Market-in-India-to-2024---Increased-Number-of-Dual-Income-Families-Presents-Opportunities---ResearchAndMarkets.com

https://towardsai.net/p/data-science/how-when-and-why-should-you-normalize-standardize-rescale-your-data-3f083def38ff