This vignette introduces the masjid
dataset included in
the bruneimap package, which provides spatial data for
masjids (mosques) across Brunei. The dataset includes essential
information such as the name, geographic coordinates (latitude and
longitude), and district of each masjid.
library(tidyverse)
#> Error in get(paste0(generic, ".", class), envir = get_method_env()) :
#> object 'type_sum.accel' not found
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#> ✔ dplyr 1.1.4 ✔ readr 2.1.5
#> ✔ forcats 1.0.0 ✔ stringr 1.5.1
#> ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
#> ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
#> ✔ purrr 1.0.2
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
#> ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(bruneimap)
#> Loading required package: sf
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
library(sf)
glimpse(masjid)
#> Rows: 121
#> Columns: 13
#> $ name <chr> "Balai Ibadat Kg. Melilas", "Balai Ibadat Kg. Merangking", …
#> $ kampong <chr> "Kg. Melilas", "Kg. Merangking", "Kg. Sukang", "Kg. Long Ma…
#> $ mukim <chr> "Mukim Melilas", "Mukim Bukit Sawat", "Mukim Sukang", "Muki…
#> $ district <chr> "Belait", "Belait", "Belait", "Tutong", "Brunei-Muara", "Br…
#> $ latitude <dbl> 114.6605, 114.5780, 114.6246, 114.6353, 114.8957, 114.9425,…
#> $ longitude <dbl> 4.257784, 4.522569, 4.311368, 4.560621, 4.900171, 4.881970,…
#> $ officiated <dbl> NA, NA, NA, 1998, NA, NA, NA, NA, NA, NA, NA, NA, 1979, NA,…
#> $ used <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, 1994, NA, NA, NA, NA, N…
#> $ completed <dbl> 1994, NA, 1994, NA, 1988, NA, 1989, NA, NA, NA, 1994, 1992,…
#> $ capacity <dbl> 40, 180, 40, 150, 550, 100, 500, 300, 100, 150, 160, 120, 2…
#> $ type <chr> "balai ibadat", "balai ibadat", "balai ibadat", "balai ibad…
#> $ category <chr> "Balai Ibadat", "Balai Ibadat", "Balai Ibadat", "Balai Ibad…
#> $ notes <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
We can visualise the locations of masjids across Brunei Below is an example where the masjids are overlaid on Brunei’s kampong boundaries:
ggplot() +
geom_sf(data = kpg_sf, fill = NA) +
geom_point(data = masjid, aes(latitude, longitude), inherit.aes = FALSE) +
theme_bw()
#> Warning: Removed 24 rows containing missing values or values outside the scale range
#> (`geom_point()`).