Done by Calvin C

- Sep 2021

Recently, my parents neighbourhood has seen a rise in harassment from unlicensed moneylenders. Therefore, we will be looking at the unlicensed moneylending and harassment trend in Singapore for the last 10 years and see whether any improvement has been made. The data for analysis will be retrieved using REST API & httr::GET from data.gov.sg.

Unlicensed moneylending is when an unlicensed individual, usually a loan shark, lends money to another individual and uses unregulated harassment methods to chase outstanding debts. Victims of loanshark activities are usually low income earners with few savings and low credit score who are desperate and therefore, looks for unregulated sources of loans. Unlicensed moneylending is dangerous as some of their harassment methods are violent and often harmful and disruptive to the neighborhood and communities.

Setup

#Activate libraries required for this question
library(tidyverse)
library(ggthemes)
library(ggrepel)
library(dplyr)
library(datagovsgR)
library(httr)
library(jsonlite)
theme_set(theme_light())

Extracting data using REST API & httr::GET,

#  limit at 1000 as total is 960 to obtain all data
raw_data <- httr::GET("https://data.gov.sg/api/action/datastore_search?resource_id=c8f71283-c5b2-43ca-80d3-f08bea210ebc&limit=1000")

# Clean the data
data_content <- httr::content(raw_data, as = "text")
data_content_parse <- jsonlite::fromJSON(data_content)

data_mh<- as_tibble(data_content_parse$result$records)

head(data_mh)

Checking out structure and summary of variables

str(data_mh)
## tibble [960 x 5] (S3: tbl_df/tbl/data.frame)
##  $ value  : chr [1:960] "242" "484" "193" "286" ...
##  $ _id    : int [1:960] 1 2 3 4 5 6 7 8 9 10 ...
##  $ level_1: chr [1:960] "Central Police Division - Total" "Central Police Division - Total" "Central Police Division - Bukit Merah East NPC" "Central Police Division - Bukit Merah East NPC" ...
##  $ level_2: chr [1:960] "Unlicensed Moneylending" "Harassment" "Unlicensed Moneylending" "Harassment" ...
##  $ year   : chr [1:960] "2011" "2011" "2011" "2011" ...
summary(data_mh)
##     value                _id          level_1            level_2         
##  Length:960         Min.   :  1.0   Length:960         Length:960        
##  Class :character   1st Qu.:240.8   Class :character   Class :character  
##  Mode  :character   Median :480.5   Mode  :character   Mode  :character  
##                     Mean   :480.5                                        
##                     3rd Qu.:720.2                                        
##                     Max.   :960.0                                        
##      year          
##  Length:960        
##  Class :character  
##  Mode  :character  
##                    
##                    
## 

Data Preparation

We will need to organise and prepare the data before analysis can be conducted.

# Turns 'na' and '-' to 0 and separate level_1 into location and sub location
data_mh1<- data_mh %>%
  mutate(value = gsub("na", "0", gsub("-", "0", data_mh$value))) %>%
  separate(level_1, into = c('location', 'sub-location'), sep = " - ")

# Remove repeating term 'Police division' from table
data_mh1 <- data_mh1 %>%
  mutate(location = gsub(' Police Division', '', data_mh1$location))

# change data type to integer
data_mh1$value <- as.integer(data_mh1$value) 
data_mh1$year <- as.integer(data_mh1$year)

# change column name to activity
names(data_mh1)[5]<- paste("activity")

#select only the final variables required in the dataset
data_mh2 <- select(data_mh1, year, location, `sub-location`, activity, value)
head(data_mh2)

Number of unlicensed moneylending and harassment reported in the last 10 years.

#Creating subset of data with only total activities for each year
data_mh3 <- data_mh2 %>% filter(`sub-location` == 'Total')
data_mh3a <- aggregate(value~year+activity, data_mh3, sum)
data_mh3a <- pivot_wider(data_mh3a, names_from = activity, values_from = value)

head(data_mh3a)

Create the path plot

p.4 <- ggplot(data = data_mh3a,mapping = aes(x = Harassment, y= `Unlicensed Moneylending`))
p.4 + geom_path(color = "gray80") +
  geom_text(aes(label = year), size = 3, fontface="bold")+
  scale_y_continuous(labels = scales::label_comma())+
  scale_x_continuous(labels = scales::label_comma())+
  labs(x = "Harassment", 
       y = "Unlicensed Moneylending",
       title = "Unlicensed Money lending vs harassment"
  ) 

The above graph traces Singapore’s total unlicensed money lending and harassment over the last decade. At the start of 2011, money lending and harassment is at its peak at over 10,000 harassment and over 1,500 unlicensed money lending activities, the lowest point is in 2016 which has less than 2,500 harassment and less than 600 unlicensed money lending activities. After 2016, the numbers has been creeping back up and in 2019, almost reached the numbers of 2014.

We can that the government and enforcement efforts has been successful in reducing the number of unlicensed moneylending and harassment activities significantly since 2011. We see an outlier in 2020 where harassment remain low while unlicensed moneylending shot up. The cause of unlicensed moneylending increase might be due to the financial impact caused by the Covid-19 pandemic that make those who are unable to obtain sufficient loans from licensed lenders, like banks, to look towards unlicensed moneylending. Based on past trend, a rise in unlicensed moneylending should also result in a rise to harassment activities, however, the reverse happens instead. This might be due to the increase enforcement due to social distancing and lockdown which restrict movement and increases the risk of loanshark’s runners getting caught and apprehended if they went to harass the borrower’s household.

Activities reported grouped by policy headquarters

#Combine number of harassment and unlicensed moneylending in one dataframe
data_mh4 <- aggregate(value~year+location, data_mh3, sum)

Create the line plot

p.5 <- ggplot(data = data_mh4,mapping = aes(x = year, y= value, fill = location))
p.5 + geom_line(aes(color = location))+
  scale_y_continuous(labels = scales::label_comma())+
  scale_x_continuous(breaks = seq(2010,2020,2))+
  geom_text_repel( data = subset(data_mh4, year == 2014),
                   aes(label = location, color = location)) +
  guides(color = "none")+
  labs(y = "Total Harassment & Unlicensed Moneylending",
       x = NULL,
       title = "Total activities reported by Police Headquarters")

Zooming in to the 7 police division headquarters, we can observe that total cases reported can be split into 2 distinct groups. Headquarters taking care of neighbourhoods at the heartlands like Woodlands, Ang Mo Kio, Bedok and Jurong has a higher number of activities reported compared to the headquarters located in areas like Central, Tanglin and Clementi which has lower number of activities reported. The reduction in cases throughout the years are also consistent across all headquarters as there are no areas that outperformed or underperformed significantly throughout the decade which might suggest that measures and efforts to curb such activities are carried out evenly across Singapore and talent and manpower is evenly distributed in order to achieve similar result.

As Woodlands police division officially opened only in March 2019, their reported activities only start to pick up at the later part of the decade.


Spatial visualisation comparing 2011 and 2020

Note: Code is not shown due to private API

Looking at the spatial visualization that compares the exact number of cases between 2011 and 2020, we can see that the numbers has dropped significantly in 10 years from four- figures in most of the headquarters in 2011 to just three-figures in 2020. The choice of opening the 7th headquarters in the north of Singapore, Woodlands, is also a good move by the government as it helped to split the reported cases between Jurong and Ang Mo Kio, balancing the workload and not allowing any one location to be overloaded.

Conclusion

Overall, the above analysis shows that the effort by the Singapore government and police force to reduce and curb unlicensed money lending and harassment activities has been successful and were able to drastically reduce these activities throughout the years. This achievement can be attributed to effective policies to assist families who requires financial aid, public education and strong enforcement actions.