Package 'SLspatial'

Title: Spatial Data for Sri Lanka
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.
Authors: Amalan Mahendran [aut, cre]
Maintainer: Amalan Mahendran <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2026-11-05 01:45:40 UTC
Source: https://github.com/Amalan-ConStat/SLspatial

Help Index


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.

Source

https://github.com/nuuuwan/sl-topojson