geo library
Cities, districts and provinces.
Same as the pakdatakit/geo entry point of the npm package.
Functions
-
getDistrictProvince(
String district) → String? -
Returns the province for a Pakistani district name, or
null. -
getDistrictsByProvince(
String province) → List< String> - Returns all districts of a province (case-insensitive), sorted alphabetically.
-
getDivisionOfDistrict(
String district) → String? -
Returns the division a district belonged to in the 2023 census, or
nullif not known. Matching is case-insensitive. -
getDivisions(
[String? province]) → List< String> -
Returns the administrative divisions of Pakistan, or of one
province(case-insensitive), sorted alphabetically. -
getProvince(
String city) → String? - Returns the province for a Pakistani city name.
-
getTehsilDistrict(
String tehsil, [String? province]) → String? -
Returns the district a tehsil (taluka, sub-division) was in at the 2023
census, or
null. Matching is case-insensitive. -
getTehsils(
String district) → List< String> -
Returns the tehsils (talukas, sub-divisions) of a district, sorted
alphabetically. Matching is case-insensitive; former district names such
as
QuettaandSouth Waziristanwork. -
searchCities(
String query) → List< String> - Searches cities by partial, case-insensitive name; sorted alphabetically.
-
searchDistricts(
String query) → List< String> - Searches districts by partial, case-insensitive name; sorted alphabetically.