The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Introduction to pkmapr

library(pkmapr)

Installation

Install pkmapr from GitHub:

remotes::install_github("abdullahumer1101/pkmapr")

Or:

# install.packages("pkmapr", repos = "https://abdullahumer1101.r-universe.dev")

Your first map

Get province boundaries and create a quick map:

provinces <- get_provinces()
pk_map(provinces)

Look up names before joining

Always check official names before filtering or joining:

# All provinces with their codes
pk_dictionary("provinces")

# Districts in Punjab
pk_dictionary("districts", province = "Punjab")

# Tehsils in Lahore district
pk_dictionary("tehsils", district = "Lahore")

Join your own data

library(dplyr)

# Example: district-level data
my_data <- data.frame(
  district_code = c("PK603", "PK604"),
  value = c(42, 37)
)

districts <- get_districts() |>
  pk_join(my_data, by = "district_code")

# Map the result
pk_map(districts, fill = "value", title = "My Values")

Interactive maps

pk_map_interactive(districts, 
                    fill = "value",
                    popup = c("district_name", "value"))

Next steps

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.