| Type: | Package |
| Title: | Spatial Data for Sri Lanka |
| Version: | 1.0.0 |
| Description: | Provides spatial datasets representing administrative and electoral boundaries in Sri Lanka. The package includes administrative divisions, electoral polling divisions, and their associated district classifications. Spatial data are provided as simple features ('sf') objects to support geographical visualisation, spatial analysis, and integration with electoral and administrative datasets. |
| URL: | https://github.com/Amalan-ConStat/SLspatial,https://amalan-constat.github.io/SLspatial/ |
| BugReports: | https://github.com/Amalan-ConStat/SLspatial/issues |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Language: | en-US |
| LazyData: | true |
| Depends: | R (≥ 4.1.0) |
| Imports: | sf |
| Suggests: | covr, dplyr, ggplot2, knitr, rmarkdown, testthat (≥ 3.0.0) |
| Config/roxygen2/version: | 8.1.1 |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-31 10:55:15 UTC; amala |
| Author: | Amalan Mahendran [aut, cre] |
| Maintainer: | Amalan Mahendran <amalan0595@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-18 10:00:27 UTC |
Sri Lanka Administrative Division Boundaries
Description
Spatial polygon boundaries for 323 administrative divisions across the 25 administrative districts and 22 electoral districts of Sri Lanka.
Usage
SLAdminDivisions
Format
An sf object with 323 rows and 6 columns:
- DistCode
Administrative district code.
- District
Administrative district name.
- EDistrict
Corresponding electoral district name.
- DivCode
Administrative division code.
- Division
Administrative division name.
- geometry
Spatial polygon geometry.
Details
Administrative district and division names are retained from the original spatial data source. Electoral district names have been assigned to correspond with the 22 electoral districts in the 2024 Sri Lankan presidential election dataset.
Source
GADM administrative boundary data. https://gadm.org/
Sri Lanka Administrative District Boundaries
Description
Administrative district boundaries for Sri Lanka, with district labels aligned with the naming convention used in the election datasets.
Usage
data(SLAdministrativeDistricts)
Format
An sf data frame with 25 features and four columns.
- SourceID
Administrative district identifier from the source boundary dataset. This is not an electoral district number.
- SourceName
Original administrative district name from the source boundary dataset.
- District
District name aligned with the election datasets. Capitalisation is preserved.
- geometry
Administrative district polygon geometry. The coordinate reference system is retained from the source dataset.
Details
The layer contains 25 administrative districts. Original identifiers and names are retained in SourceID and SourceName.
In District, Ampara is labelled Digamadulla, Kandy is labelled Mahanuwara, Moneragala is labelled Monaragala, and Nuwara Eliya is labelled Nuwara-Eliya. These are label changes; the administrative geometries are unchanged.
Administrative districts differ from electoral districts. Jaffna and Kilinochchi are separate administrative districts. Mannar, Mullaitivu, and Vavuniya are also retained separately.
This layer represents the boundaries supplied by the source dataset. It should not automatically be interpreted as the boundary configuration applicable to every historical election.
Examples
if (requireNamespace("sf", quietly = TRUE)) {
data(SLAdministrativeDistricts)
sf::st_drop_geometry(SLAdministrativeDistricts)
plot(sf::st_geometry(SLAdministrativeDistricts),
main = "Sri Lanka: Administrative Districts")
}
Sri Lanka Country Boundary
Description
Country boundary polygons for Sri Lanka, without internal administrative or electoral divisions.
Usage
data(SLBoundary)
Format
An sf data frame with one feature and four columns.
- Country
Country name: Sri Lanka.
- ISO2
Two-letter country code: LK.
- ISO3
Three-letter country code: LKA.
- geometry
MULTIPOLYGON geometry in WGS84 (EPSG:4326).
Examples
if (requireNamespace("sf", quietly = TRUE)) {
data(SLBoundary)
plot(sf::st_geometry(SLBoundary), main = "Sri Lanka")
}
Sri Lanka Electoral District Boundaries
Description
Electoral district boundaries derived from administrative district polygons, with names aligned with the election datasets.
Usage
data(SLElectoralDistricts)
Format
An sf data frame with 22 features and two columns.
- District
Electoral district name matching the naming convention used in the election datasets. Capitalisation is preserved.
- geometry
Electoral district polygon geometry derived by merging administrative district polygons. The coordinate reference system is retained from the source dataset.
Details
The layer is derived from SLAdministrativeDistricts. Jaffna and Kilinochchi are merged to form the Jaffna electoral district. Mannar, Mullaitivu, and Vavuniya are merged to form the Vanni electoral district. The remaining districts retain their administrative boundaries.
Internal boundaries between merged administrative districts are removed. The resulting features are ordered to match the electoral district order used during data preparation.
This is a derived spatial layer, rather than an independently supplied official electoral-boundary dataset. Its historical applicability depends on the version of the underlying administrative boundaries.
District can be used to join district-level election results. Select one reporting level before joining to avoid repeating geometries across polling-division, postal-vote, and district-total records.
Source
Derived from the administrative boundary dataset used for SLAdministrativeDistricts.
See Also
SLAdministrativeDistricts,
SLBoundary
Examples
if (requireNamespace("sf", quietly = TRUE)) {
data(SLElectoralDistricts)
sf::st_drop_geometry(SLElectoralDistricts)
plot(sf::st_geometry(SLElectoralDistricts),
main = "Sri Lanka: Electoral Districts")
}
Sri Lanka Electorate Boundaries
Description
Spatial polygon boundaries for the 160 electorates (polling divisions) across the 22 electoral districts of Sri Lanka.
Usage
SLElectorate
Format
An sf object with 160 rows and 5 columns:
- ElecCode
Electoral electorate code.
- District
Electoral district name.
- Electorate
Standardised electorate (polling division) name.
- OrigName
Original name in the spatial dataset.
- geometry
Spatial polygon geometry.
Details
Electorates names have been standardised using the 2024 Sri Lankan presidential election dataset. The original names from the spatial source are retained.