The archipelago of Indonesia is socially diverse. Officially, Indonesia’s law acknowledges six main religions, dividing the population into six main groups. Islam has the most followers, hence, most of the country population — 86,9% to be precise — is a Muslim. Followed by Christians, Catholics, Hindu, Buddhist, Indigenous Religion Followers, and Confucians according to the data released by The Ministry of Home Affairs in December 2021.

As the major religion, Islam plays a significant social dynamic role in Indonesia. Since the fall of the New Order Regime (Rezim Orde Baru), Muslims in Indonesia has gained some sort of revival as contrast to the oppression felt throughout the period of power. Now, Muslims has the ability to express their aspiration to be a faithful Muslim. One of the indicator is the number of mosque built after the fall of the New Order Regime. Among the mosques that exist today, 18,9% of which are built after the fall of the New Order Regime. Therefore, nearly one of the five mosques that exist today is built in only the last 22 years.

In the long history of Islam, mosque played a great role in its civilization. It is considered as the center of Islamic civilization. It has served as a community center, a courthouse, a religious school, even an emergency post-disaster shelter. This writing will try to enlighten readers about mosques in Indonesia and its correlations with the Muslim community in Indonesia.

Indonesia’s Mosques and Muslims Distribution

The Ministry of Religious Affairs has recently released data regarding the provincial distribution of mosque in Indonesia as shown below.

df_sort_bar <- df %>%
  mutate(prov = fct_reorder(prov, masjid))

ggplot(df_sort_bar) +
  aes(x = prov, y = masjid, fill = '#020202') +
  geom_col() +
  coord_flip() +
  labs(x = 'Province', y = '# of Mosque', title = 'Number of Mosques in Each Province')+
  ggthemes::theme_fivethirtyeight() +
  theme(legend.position = 'none',
        text = element_text(family = 'Rubik'))


In order to make sense of the data, the following chart groups the data by the island on which the province is located.

df_sort_bar_pulau <- df %>%
  mutate(pulau = fct_reorder(pulau, masjid))

pulau1 <- ggplot(df_sort_bar_pulau) +
  aes(x = pulau, y = masjid, fill = '#020202') +
  geom_col() +
  coord_flip() +
  labs(x = 'Island', y = '# of Mosque', title = 'Number of Mosques per Island')+
  ggthemes::theme_fivethirtyeight() +
  theme(legend.position = 'none',
        text = element_text(family = 'Rubik'))

pulau2 <- ggplot(df_sort_bar_pulau) +
  aes(x = pulau, y = masjid, fill = '#020202') +
  geom_boxplot() +
  coord_flip() +
  labs(x = 'Island', y = '# of Mosque', title = 'Number of Mosques per Island')+
  ggthemes::theme_fivethirtyeight() +
  theme(legend.position = 'none',
        text = element_text(family = 'Rubik'))

plot_grid(pulau1, pulau2, ncol = 1)

Clearly, the island of Java has more mosques compared than other islands, as the island of Java is the most populated island in Indonesia — The Ministry of Home Affairs states that more 56% of Indonesians lived in Java. The map below shows the striking difference between Java and other islands in terms of how many mosques located in each island.

ggplot(idn_masjid) +
  aes(fill = masjid) +
  geom_sf() +
  coord_sf() +
  theme_void() +
  scale_fill_viridis(option = 'C', begin = 0.2) +
  theme(panel.background = element_blank(),
        legend.position = 'right', 
        legend.title = element_blank(),
        legend.background = element_blank(),
        plot.title = element_text(family = 'Rubik', face = 'bold'),
        text = element_text(family = 'Rubik'),
        plot.background = element_blank()) +
  labs(title = 'Distribution of Mosques in Indonesia',
       subtitle = 'Absoulte Number of Mosques per Province',
       caption = 'Data of Kementerian Agama Republik Indonesia, 2019')

The underlying difference between Java and the rest of the archipelago is the number of Muslims that lived in Java. But, despite Java hosts the most Muslims, Islam also plays a significant role to the community in Sumatera, Kalimantan/Borneo, and Sulawesi. Proportional to total number of citizens in each province as shown below, Islam has the most believers in most of the provinces. Map of Indonesian Muslim as shown below visualizes the numbers.

muslim1 <- ggplot(idn_masjid_rev) +
  aes(fill = Islam) +
  geom_sf() +
  coord_sf() +
  theme_void() +
  scale_fill_viridis(labels=scales::label_number(), option = 'C', begin = 0.2) +
  theme(panel.background = element_blank(),
        legend.position = 'right', 
        legend.title = element_blank(),
        legend.background = element_blank(),
        plot.title = element_text(family = 'Rubik', face = 'bold'),
        text = element_text(family = 'Rubik'),
        plot.background = element_blank()) +
  labs(title = 'Map of Indonesian Muslims',
       subtitle = 'Number of Muslims per Province')


idn_masjid_rev$persen <- idn_masjid_rev$Islam / idn_masjid_rev$Total

muslim2 <- ggplot(idn_masjid_rev) +
  aes(fill = persen) +
  geom_sf() +
  coord_sf() +
  theme_void() +
  scale_fill_viridis(labels=scales::percent, option = 'C', begin = 0.2) +
  theme(panel.background = element_blank(),
        legend.position = 'right', 
        legend.title = element_blank(),
        legend.background = element_blank(),
        plot.title = element_text(family = 'Rubik', face = 'bold'),
        text = element_text(family = 'Rubik'),
        plot.background = element_blank()) +
  labs(title = 'Map of Indonesian Muslims',
       subtitle = 'Proportion of Muslims per Province')

grid.arrange(muslim1, muslim2, ncol = 1)

Looking for Correlations

Hypothetically, the number of mosques correlates with the number of Muslims living in each province. In order to prove the hypothesis, the data shall be tested with correlation test. But, the data shall be proven normally distributed beforehand. Shapiro-Wilk’s normality test is one of the most reliable test there is.

shapiro.test(idn_masjid_rev$Islam) # Normality test for the number of Muslims
## 
##  Shapiro-Wilk normality test
## 
## data:  idn_masjid_rev$Islam
## W = 0.57159, p-value = 8.644e-09
shapiro.test(idn_masjid_rev$masjid) # Normality test for the number of Mosques
## 
##  Shapiro-Wilk normality test
## 
## data:  idn_masjid_rev$masjid
## W = 0.53557, p-value = 3.212e-09

The p-value of each variable is way smaller than alpha(.05), hence, the Shapiro-Wilk’s tests prove that the data deviate from normal distribution. Thus, the data need to be transformed beforehand with logarithmic transformation. Only then the Pearson Correlation test could be performed.

cor.test(log(idn_masjid_rev$Islam), idn_masjid_rev$masjidlog)
## 
##  Pearson's product-moment correlation
## 
## data:  log(idn_masjid_rev$Islam) and idn_masjid_rev$masjidlog
## t = 13.103, df = 32, p-value = 2.09e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8410368 0.9586319
## sample estimates:
##      cor 
## 0.918089

The hypothesis turns out to be proven. The abundance of mosques within a province correlates with the abundance of Muslims. Correlation plot below visualizes the relationship.

ggplot(idn_masjid_rev) +
  aes(x = masjid, y = Islam) +
  geom_jitter() +
  scale_color_brewer(palette = "Dark2", 
                     direction = 1) +
  scale_x_continuous(trans = 'log') +
  scale_y_continuous(trans = 'log') +
  xlab("# of Mosques") + 
  ylab('# of Muslims') +
  ggthemes::theme_fivethirtyeight() +
  theme(legend.position = 'none', text = element_text(family = 'Roboto')) +
  labs(title = 'Correlation Plot: Number of Muslims and Mosques') +
  stat_smooth(method = 'lm', formula = y~x, geom = 'smooth')

Furthermore, if the data is combined with average household expenditure, another information might be obtained.

cor.test(log(idn_masjid_rev$'2021'), idn_masjid_rev$masjidlog)
## 
##  Pearson's product-moment correlation
## 
## data:  log(idn_masjid_rev$"2021") and idn_masjid_rev$masjidlog
## t = -1.2, df = 32, p-value = 0.239
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.5098952  0.1405158
## sample estimates:
##        cor 
## -0.2075103

Pearson’s test for correlation proves that there is no any significant correlation (p-value > alpha, r = -0.21) between monthly household expenditure per capita and number of mosques in each province. Thus, it is safe to conclude that Muslims in Indonesia have a strong will to collaborate in gathering donations for mosques, making mosques accessible for everyone regardless of household economic status.

Moreover, The Ministry of Religious Affairs also released a set of data about Islamic education. Thus, it is possible to take a look into another relationship between number of Muslims and number of Islamic schools. The following map displays the number of Islamic schools by province.

ggplot(idn_masjid_pend) +
  aes(fill = Total.y) +
  geom_sf() +
  coord_sf() +
  theme_void() +
  scale_fill_viridis(labels=scales::label_number(), option = 'C', begin = 0.2) +
  theme(panel.background = element_blank(),
        legend.position = 'right', 
        legend.title = element_blank(),
        legend.background = element_blank(),
        plot.title = element_text(family = 'Rubik', face = 'bold'),
        text = element_text(family = 'Rubik'),
        plot.background = element_blank()) +
  labs(title = 'Map of Indonesian Islamic Schools',
       subtitle = 'Number of Islamic Schools per Province',
       caption = 'Data of Kementerian Agama Republik Indonesia, 2019/2020')

As displayed above, both the map of Indonesian Islamic schools and map of Indonesian Muslims shares a lot of similarities. Hence, there is also possibility of another correlation. The graph displayed below, alongside with the numbers from the Pearson Correlation test, prove the presence of the correlation since the pattern of the data follows the correlation line and the p-value of the correlation is far below alpha (.05).

cor.test(log(idn_masjid_pend$Total.y), log(idn_masjid_pend$Islam))
## 
##  Pearson's product-moment correlation
## 
## data:  log(idn_masjid_pend$Total.y) and log(idn_masjid_pend$Islam)
## t = 9.415, df = 32, p-value = 9.702e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.7308648 0.9267169
## sample estimates:
##       cor 
## 0.8571764
ggplot(idn_masjid_pend) +
  aes(x = Total.y, y = Islam) +
  geom_jitter() +
  scale_color_brewer(palette = "Dark2", 
                     direction = 1) +
  scale_x_continuous(trans = 'log') +
  scale_y_continuous(trans = 'log') +
  xlab("# of Islamic Schools") + 
  ylab('# of Muslims') +
  ggthemes::theme_fivethirtyeight() +
  theme(legend.position = 'none', 
        title = element_text(family = 'Rubik', face = 'bold'),
        text = element_text(family = 'Rubik')) +
  labs(title = 'Correlation Plot',
       subtitle = 'Number of Muslims and Islamic Schools') +
  stat_smooth(method = 'lm', formula = y~x, geom = 'smooth')

It is very likely that the Muslims community in Indonesia also allocates the charity to build a system of formal Islamic education. The number of Islamic schools described in this writing is a total number of schools that serve the early childhood education program, primary educational level, until the secondary educational level equivalent to senior high school.

All in all, correlation plot above shows the multicollinearities of all the variables used in this writing. Data released by Ministry of Religious Affairs helped us to look deeper into the Muslim Communities in Indonesia. The development of Islamic Community in Indonesia goes hand in hand with the provision of religious education facilities and mosques.