Data_Hoppers: Group Assignment no 2


Identifying 4 ideal locations to hire or build Billboards to display services and emergency numbers, etc for cardiac care hospital client.


Data_Hoppers Group

  1. 71610006 - Anupam Piareji
  2. 71610035 - Kulpreeth Singh
  3. 71610049 - Praison Selvaraj

Focus City: Chennai


Client description & requirements

XYX cardiac care services is a service provider in the health care industry and has many different services under its umbrella. While the cardiac care has grown tremendously and it has a lot of services to offer, they have realized the need to be resourceful and available for any type of cardiac care whenever required. While they have created new and expanded cardiac services within all major cities, in Chennai they want to provide and be a leader for outstanding heart care and quality outcomes.

They want to display their services information and emergency contact numbers at prominent places which are ideal for the clients and customer demographics which is already enrolled or may be the next suitable client to utilize their services.


1. Problem Formulation

  1. Decision Problem : Should we advertise to reach our target segment?

  2. Research Objective:

    1. Identify 4 strategic locations where hoardings can be placed to advertise the hospital details.

    2. Define what entities or proxies are indicative of the presence of our target segment

2. Why Chennai

We picked Chennai due to the high prevalence of Diabetes, which is one of the risk factor for Cardio vascular diseases. Along with this, the growing number of IT related companies being setup this area is pre-dominantly moving towards the white collar jobs. Finally we want to this city as the clients wish list where they want to more number of people to start utilizing their services.

Reference:

  1. Recent health article for Chennai

  2. Increase in heart cases in Chennai

3. Entity List

Here we give the brief of our search and selection criteria:

We are targetting individuals as our primary customers for the cardiac care. From these the wish-list is to identify and target

  • the upper middle class
  • the high net worth individuals
  • lower and middle SECs

These category of people are most likely to utilize the cardiac care services in Chennai.

Out of these the upper middle class segments are most likely to use:

  • club
  • shopping_mall
  • jewelry_store
  • casino
  • beauty salon
  • airport
  • art_gallery

The high net worth individuals are most likely to use and frequent:

  • clubs
  • shopping malls
  • jewelry stores

If we wanted to cross check with Organization, we would have targeted the following:

  • startups
  • SMEs
  • service businesses such as:
  1. education
  2. large MNCs
  • school
  • hospital
  • university

Basis the above lists identified, we short-listed the following Proxy entities within Google Maps to search:

  • gas_station
  • bus_station
  • grocery_or_supermarket
  • jewelry

Process towards the result:

1. Packages, Demographics and Data Munging:

Here is a brief summary of the data gleaning process:

  • We know we have to use Google Maps (via their API) to get the above list of entities that are closely located. We also use another library to get to and convert the data into geographical entity.
library("RCurl")
library("jsonlite")
library("plotGoogleMaps")
library("geosphere")
  • We use the global coordinates (longitude and latitude) for Chennai to extract the list of entities which we want to plot on the graph.

Chennai: #13.0827° N, 80.2707° E

Example of extraction of list of Malls within 25 km of Chennai.

  • Set the Google Places API Key
key = "AIzaSyCIsAa6qFbyca8ntlIjZTPedtGGAos-R8s"
  • Perform gas_station Search

url = paste0("https://maps.googleapis.com/maps/api/place/radarsearch/json?&query=???gas_station+in+chennai&types=???gas_station&location=13.0827,80.2707&radius=50000&key=",key)
doc <- getURL(url)
x <- jsonlite::fromJSON(doc)
gas_stations = x$results$geometry$location
head(gas_stations)
  • Perform bus_station Search

url = paste0("https://maps.googleapis.com/maps/api/place/radarsearch/json?&query=???bus_station+in+chennai&types=???bus_station&location=13.0827,80.2707&radius=50000&key=",key)
doc <- getURL(url)
x <- jsonlite::fromJSON(doc)
bus_stations = x$results$geometry$location
head(bus_stations)
  • Peform grocery_or_supermarket Search

url = paste0("https://maps.googleapis.com/maps/api/place/radarsearch/json?&query=grocery_or_supermarket+in+chennai&types=grocery_or_supermarket&location=13.0827,80.2707&radius=50000&key=",key)
doc <- getURL(url)
x <- jsonlite::fromJSON(doc)
grocers = x$results$geometry$location
head(grocers)
  • Perform jewelry_store Search

url = paste0("https://maps.googleapis.com/maps/api/place/radarsearch/json?&query=jewelry_store+in+chennai&types=jewelry_store&location=13.0827,80.2707&radius=50000&key=",key)
doc <- getURL(url)
x <- jsonlite::fromJSON(doc)
jewellers = x$results$geometry$location
head(jewellers)
  • Assign types

gas_stations$type = "Gas Station"
bus_stations$type = "Bus Stations"
grocers$type = "Grocery or Supermarket"
jewellers$type = "Jewelry Store"
  • Combine the data

    data = rbind(gas_stations,bus_stations,grocers,jewellers)
    dim(data)
  • All the entities data for Chennai are merged it into 1 file : `chennai_places.csv’

write.csv(data,"chennai_places.csv", row.names = F)
  • Look at individual entities on the map and identify strategic locations
sample = gas_stations
coordinates(sample) <-~ lng +lat # Create cordinates
proj4string(sample) = CRS('+proj=longlat +datum=WGS84') # Add Projections

m<-mcGoogleMaps(sample,zcol = "type", mapTypeId='ROADMAP') # Plot on Google maps

sample = bus_stations
coordinates(sample) <-~ lng +lat # Create cordinates
proj4string(sample) = CRS('+proj=longlat +datum=WGS84') # Add Projections

m<-mcGoogleMaps(sample,zcol = "type", mapTypeId='ROADMAP') # Plot on Google maps

sample = jewellers
coordinates(sample) <-~ lng +lat # Create cordinates
proj4string(sample) = CRS('+proj=longlat +datum=WGS84') # Add Projections

m<-mcGoogleMaps(sample,zcol = "type", mapTypeId='ROADMAP') # Plot on Google maps

sample = grocers
coordinates(sample) <-~ lng +lat # Create cordinates
proj4string(sample) = CRS('+proj=longlat +datum=WGS84') # Add Projections

m<-mcGoogleMaps(sample,zcol = "type", mapTypeId='ROADMAP') # Plot on Google maps

# Get the coordinates
p2 = gas_stations[,1:2]

# calculate distances
dist_mat = matrix(0,nrow(p2),nrow(p2))

for (i in 1:nrow(p2)){
  for (j in 1:nrow(p2)){
    dist_mat[i,j] = distCosine(p2[i,],p2[j,], r=6378173)/1000    
  }
}

class(dist_mat)
dist_mat[1:10,1:10]

# Create clusters based in distances
fit <- hclust(as.dist(dist_mat), method="ward")
plot(fit) # display dendogram

groups <- cutree(fit, k=18) # cut tree into 18 clusters
# draw dendogram with red borders around the 18 clusters
rect.hclust(fit, k=18, border="red") 

sample$group = groups # Assign cluster groups

# Plot stores with clustor as label
m <- mcGoogleMaps(sample, mapTypeId='ROADMAP', zcol="group")


sample = data
coordinates(sample) <-~ lng +lat # Create cordinates
proj4string(sample) = CRS('+proj=longlat +datum=WGS84') # Add Projections

m<-mcGoogleMaps(sample,zcol = "type", mapTypeId='ROADMAP') # Plot on Google maps
  • finally we use Google Api functions to map the locations and identify clusters out of which we get the results of the following

2. Intermediate images which we obtained to identify the ideal locations

Cluster of entities idenfitied Cluster of entities idenfitied

3. Results of the above map locations and interpretation:

When we looked at the followingn 4 locations we were able to view a lot of the entities which we have identified. This shows that the number of footfalls within this area for our target audience would be high in these localities.

A. Location 1

Gas Station on Uthamar Gandhi Road is in close proximity to Kanchi Kamkoti Childs Trust Hospital, GG Hospital, Taj Coromandel, Assumption Higher Secondary school, MOP Vaishnav College for Women, and Jewelry store and Grocery stores

Cluster of entities idenfitied

B. Location 2

Rajeev Gandhi Memorial Bus Station is also in close proximity to Dharma Ayurveda Medical College, St. Marys School, Annai Velankanni Church and Jumma Masjid

Cluster of entities idenfitied

C. Location 3

Junction where Prakasam Road and Usman Road intersect. This location is in the vicinity of many jewelry stores, Panagal Park, Restaurants, Fruit & Vegetable market and Silk showrooms

Cluster of entities idenfitied

D. Location 4

Near the Grocery store beside Kadambur Mariamman Marriage Hall. This location is in the vicinity of Adayar Ananda Bhavan Sweets, Holy Family Convent School, Our Lady of Lourdes Church, bus stop and train station

Cluster of entities idenfitied