From a6016e0dce6d1491ec1ffd0e724f44f03c5b93bb Mon Sep 17 00:00:00 2001 From: kihuha Date: Tue, 16 Mar 2021 10:52:10 +0300 Subject: [PATCH] Remove public folder --- .gitignore | 6 +- index.d.ts | 73 + public/app.d.ts | 2 - public/app.js | 15 - public/data/country.d.ts | 14 - public/data/country.js | 14 - public/data/countyData.d.ts | 15 - public/data/countyData.js | 381 ----- public/data/index.d.ts | 4 - public/data/index.js | 9 - public/data/subcountyData.d.ts | 17 - public/data/subcountyData.js | 2514 ----------------------------- public/index.d.ts | 1 - public/index.js | 8 - public/routers/counties.d.ts | 2 - public/routers/counties.js | 49 - public/routers/country.d.ts | 2 - public/routers/country.js | 12 - public/test/counties.test.d.ts | 1 - public/test/counties.test.js | 50 - public/test/country.test.d.ts | 1 - public/test/country.test.js | 24 - public/test/subcounties.test.d.ts | 1 - public/test/subcounties.test.js | 121 -- tsconfig.json | 8 +- 25 files changed, 82 insertions(+), 3262 deletions(-) create mode 100644 index.d.ts delete mode 100644 public/app.d.ts delete mode 100644 public/app.js delete mode 100644 public/data/country.d.ts delete mode 100644 public/data/country.js delete mode 100644 public/data/countyData.d.ts delete mode 100644 public/data/countyData.js delete mode 100644 public/data/index.d.ts delete mode 100644 public/data/index.js delete mode 100644 public/data/subcountyData.d.ts delete mode 100644 public/data/subcountyData.js delete mode 100644 public/index.d.ts delete mode 100644 public/index.js delete mode 100644 public/routers/counties.d.ts delete mode 100644 public/routers/counties.js delete mode 100644 public/routers/country.d.ts delete mode 100644 public/routers/country.js delete mode 100644 public/test/counties.test.d.ts delete mode 100644 public/test/counties.test.js delete mode 100644 public/test/country.test.d.ts delete mode 100644 public/test/country.test.js delete mode 100644 public/test/subcounties.test.d.ts delete mode 100644 public/test/subcounties.test.js diff --git a/.gitignore b/.gitignore index e0a0b0a..4ee65db 100644 --- a/.gitignore +++ b/.gitignore @@ -115,4 +115,8 @@ dist .pnp.* # IDE -.idea \ No newline at end of file +.idea + + +# Build +public/ \ No newline at end of file diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..7275f99 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,73 @@ +declare module "data/countyData" { + export interface Details { + male: number; + female: number; + intersex: number; + households: number; + averageHouseholds: number; + popDensity: { + landArea: number; + density: number; + }; + } + export interface County { + [key: string]: Details; + } + export const counties: County; +} +declare module "data/subcountyData" { + interface Details { + male: number; + female: number; + intersex: number; + popDensity: { + landArea: number; + density: number | null; + }; + total: number; + } + export interface SubCounty { + [key: string]: { + [key: string]: Details; + }; + } + export const subCounties: SubCounty; +} +declare module "data/country" { + export const country: { + total: number; + male: number; + female: number; + intersex: number; + populationIn2009: number; + popChange: number; + households: number; + averageHouseholds: number; + popDensity: { + landArea: number; + density: number; + }; + }; +} +declare module "data/index" { + import { counties } from "data/countyData"; + import { subCounties } from "data/subcountyData"; + import { country } from "data/country"; + export { counties, subCounties, country }; +} +declare module "routers/country" { + const router: import("express-serve-static-core").Router; + export default router; +} +declare module "routers/counties" { + const router: import("express-serve-static-core").Router; + export default router; +} +declare module "app" { + const app: import("express-serve-static-core").Express; + export default app; +} +declare module "index" { } +declare module "test/counties.test" { } +declare module "test/country.test" { } +declare module "test/subcounties.test" { } diff --git a/public/app.d.ts b/public/app.d.ts deleted file mode 100644 index af7e741..0000000 --- a/public/app.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const app: import("express-serve-static-core").Express -export default app diff --git a/public/app.js b/public/app.js deleted file mode 100644 index dc056af..0000000 --- a/public/app.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const country_1 = __importDefault(require("./routers/country")); -const counties_1 = __importDefault(require("./routers/counties")); -const app = express_1.default(); -app.get("/", (req, res) => { - return res.json({ test: "Server is running" }); -}); -app.use("/api/v1/country", country_1.default); -app.use("/api/v1/counties", counties_1.default); -exports.default = app; diff --git a/public/data/country.d.ts b/public/data/country.d.ts deleted file mode 100644 index dad35ef..0000000 --- a/public/data/country.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare const country: { - total: number - male: number - female: number - intersex: number - populationIn2009: number - popChange: number - households: number - averageHouseholds: number - popDensity: { - landArea: number - density: number - } -} diff --git a/public/data/country.js b/public/data/country.js deleted file mode 100644 index a629f6b..0000000 --- a/public/data/country.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.country = void 0; -exports.country = { - total: 47564296, - male: 23548056, - female: 24014716, - intersex: 1524, - populationIn2009: 512690, - popChange: 108551, - households: 12143913, - averageHouseholds: 3.9, - popDensity: { landArea: 9123, density: 68 }, -}; diff --git a/public/data/countyData.d.ts b/public/data/countyData.d.ts deleted file mode 100644 index 57de275..0000000 --- a/public/data/countyData.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface Details { - male: number - female: number - intersex: number - households: number - averageHouseholds: number - popDensity: { - landArea: number - density: number - } -} -export interface County { - [key: string]: Details -} -export declare const counties: County diff --git a/public/data/countyData.js b/public/data/countyData.js deleted file mode 100644 index 6988abb..0000000 --- a/public/data/countyData.js +++ /dev/null @@ -1,381 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.counties = void 0; -exports.counties = { - Mombasa: { - male: 610257, - female: 598046, - intersex: 30, - households: 378422, - averageHouseholds: 3.1, - popDensity: { landArea: 219.9, density: 5495 }, - }, - Kwale: { - male: 425121, - female: 441681, - intersex: 18, - households: 173176, - averageHouseholds: 5, - popDensity: { landArea: 8267.1, density: 105 }, - }, - Kilifi: { - male: 704089, - female: 749673, - intersex: 25, - households: 298472, - averageHouseholds: 4.8, - popDensity: { landArea: 12539.7, density: 116 }, - }, - "Tana river": { - male: 158550, - female: 157391, - intersex: 2, - households: 68242, - averageHouseholds: 4.6, - popDensity: { landArea: 37950.5, density: 8 }, - }, - Lamu: { - male: 76103, - female: 67813, - intersex: 4, - households: 37963, - averageHouseholds: 3.7, - popDensity: { landArea: 6253.3, density: 23 }, - }, - "Taita taveta": { - male: 173337, - female: 167327, - intersex: 7, - households: 96429, - averageHouseholds: 3.5, - popDensity: { landArea: 17152, density: 20 }, - }, - Garissa: { - male: 458975, - female: 382344, - intersex: 34, - households: 141394, - averageHouseholds: 5.9, - popDensity: { landArea: 44736, density: 19 }, - }, - Wajir: { - male: 415374, - female: 365840, - intersex: 49, - households: 127932, - averageHouseholds: 6.1, - popDensity: { landArea: 56773.1, density: 14 }, - }, - Mandera: { - male: 434976, - female: 432444, - intersex: 37, - households: 125763, - averageHouseholds: 6.9, - popDensity: { landArea: 25939.8, density: 33 }, - }, - Marsabit: { - male: 243548, - female: 216219, - intersex: 18, - households: 77495, - averageHouseholds: 5.8, - popDensity: { landArea: 70944.1, density: 6 }, - }, - Isiolo: { - male: 139510, - female: 128483, - intersex: 9, - households: 58072, - averageHouseholds: 4.6, - popDensity: { landArea: 25350.6, density: 11 }, - }, - Meru: { - male: 767698, - female: 777975, - intersex: 41, - households: 426360, - averageHouseholds: 3.6, - popDensity: { landArea: 7006.3, density: 221 }, - }, - "Tharaka nithi": { - male: 193764, - female: 199406, - intersex: 7, - households: 109860, - averageHouseholds: 3.6, - popDensity: { landArea: 2564.4, density: 153 }, - }, - Embu: { - male: 304208, - female: 304367, - intersex: 24, - households: 182743, - averageHouseholds: 3.3, - popDensity: { landArea: 2820.7, density: 216 }, - }, - Kitui: { - male: 549003, - female: 587151, - intersex: 33, - households: 262942, - averageHouseholds: 4.3, - popDensity: { landArea: 30429.5, density: 37 }, - }, - Machakos: { - male: 710707, - female: 711191, - intersex: 34, - households: 402466, - averageHouseholds: 3.5, - popDensity: { landArea: 6042.7, density: 235 }, - }, - Makueni: { - male: 489691, - female: 497942, - intersex: 20, - households: 244669, - averageHouseholds: 4, - popDensity: { landArea: 8169.8, density: 121 }, - }, - Nyandarua: { - male: 315022, - female: 323247, - intersex: 20, - households: 179686, - averageHouseholds: 3.5, - popDensity: { landArea: 3285.7, density: 194 }, - }, - Nyeri: { - male: 374288, - female: 384845, - intersex: 31, - households: 248050, - averageHouseholds: 3, - popDensity: { landArea: 3325, density: 228 }, - }, - Kirinyaga: { - male: 302011, - female: 308369, - intersex: 31, - households: 204188, - averageHouseholds: 3, - popDensity: { landArea: 1478.3, density: 413 }, - }, - "Murang'a": { - male: 523940, - female: 532669, - intersex: 31, - households: 318105, - averageHouseholds: 3.3, - popDensity: { landArea: 2524.2, density: 419 }, - }, - Kiambu: { - male: 1187146, - female: 1230454, - intersex: 135, - households: 795241, - averageHouseholds: 3, - popDensity: { landArea: 2538.6, density: 952 }, - }, - Turkana: { - male: 478087, - female: 448868, - intersex: 21, - households: 164519, - averageHouseholds: 5.6, - popDensity: { landArea: 68232.9, density: 14 }, - }, - "West pokot": { - male: 307013, - female: 314213, - intersex: 15, - households: 116182, - averageHouseholds: 5.3, - popDensity: { landArea: 9123.2, density: 68 }, - }, - Samburu: { - male: 156774, - female: 153546, - intersex: 7, - households: 65910, - averageHouseholds: 4.7, - popDensity: { landArea: 21065.1, density: 15 }, - }, - "Trans nzoia": { - male: 489107, - female: 501206, - intersex: 28, - households: 223808, - averageHouseholds: 4.4, - popDensity: { landArea: 2495.2, density: 397 }, - }, - "Uasin Gishu": { - male: 580269, - female: 582889, - intersex: 28, - households: 304943, - averageHouseholds: 3.8, - popDensity: { landArea: 3392.2, density: 343 }, - }, - "Elgeyo/Marakwet": { - male: 227317, - female: 227151, - intersex: 12, - households: 99861, - averageHouseholds: 4.5, - popDensity: { landArea: 3032, density: 150 }, - }, - Nandi: { - male: 441259, - female: 444430, - intersex: 22, - households: 199426, - averageHouseholds: 4.4, - popDensity: { landArea: 2855.8, density: 310 }, - }, - Baringo: { - male: 336322, - female: 330428, - intersex: 13, - households: 142518, - averageHouseholds: 4.7, - popDensity: { landArea: 10976.4, density: 61 }, - }, - Laikipia: { - male: 259440, - female: 259102, - intersex: 18, - households: 149271, - averageHouseholds: 3.4, - popDensity: { landArea: 9532.2, density: 54 }, - }, - Nakuru: { - male: 1077272, - female: 1084835, - intersex: 95, - households: 616046, - averageHouseholds: 3.5, - popDensity: { landArea: 7462.4, density: 290 }, - }, - Narok: { - male: 579042, - female: 578805, - intersex: 26, - households: 241125, - averageHouseholds: 4.8, - popDensity: { landArea: 17950.3, density: 65 }, - }, - Kajiado: { - male: 557098, - female: 560704, - intersex: 38, - households: 316179, - averageHouseholds: 3.5, - popDensity: { landArea: 21871.1, density: 51 }, - }, - Kericho: { - male: 450741, - female: 451008, - intersex: 28, - households: 206036, - averageHouseholds: 4.4, - popDensity: { landArea: 2436.1, density: 370 }, - }, - Bomet: { - male: 434287, - female: 441379, - intersex: 23, - households: 187641, - averageHouseholds: 4.7, - popDensity: { landArea: 2530.9, density: 346 }, - }, - Kakamega: { - male: 897133, - female: 970406, - intersex: 40, - households: 433207, - averageHouseholds: 4.3, - popDensity: { landArea: 3020, density: 618 }, - }, - Vihiga: { - male: 283678, - female: 306323, - intersex: 12, - households: 143365, - averageHouseholds: 4.1, - popDensity: { landArea: 563.8, density: 1047 }, - }, - Bungoma: { - male: 812146, - female: 858389, - intersex: 35, - households: 358796, - averageHouseholds: 4.6, - popDensity: { landArea: 3023.9, density: 552 }, - }, - Busia: { - male: 426252, - female: 467401, - intersex: 28, - households: 198152, - averageHouseholds: 4.5, - popDensity: { landArea: 1696.3, density: 527 }, - }, - Siaya: { - male: 471669, - female: 521496, - intersex: 18, - households: 250698, - averageHouseholds: 3.9, - popDensity: { landArea: 2529.8, density: 393 }, - }, - Kisumu: { - male: 560942, - female: 594609, - intersex: 23, - households: 300745, - averageHouseholds: 3.8, - popDensity: { landArea: 2085.4, density: 554 }, - }, - "Homa bay": { - male: 539560, - female: 592367, - intersex: 23, - households: 262036, - averageHouseholds: 4.3, - popDensity: { landArea: 3152.5, density: 359 }, - }, - Migori: { - male: 536187, - female: 580214, - intersex: 35, - households: 240168, - averageHouseholds: 4.6, - popDensity: { landArea: 2613.5, density: 427 }, - }, - Kisii: { - male: 605784, - female: 661038, - intersex: 38, - households: 308054, - averageHouseholds: 4.1, - popDensity: { landArea: 1323, density: 958 }, - }, - Nyamira: { - male: 290907, - female: 314656, - intersex: 13, - households: 150669, - averageHouseholds: 4, - popDensity: { landArea: 897.3, density: 675 }, - }, - Nairobi: { - male: 2192452, - female: 2204376, - intersex: 245, - households: 1506888, - averageHouseholds: 2.9, - popDensity: { landArea: 703.9, density: 6247 }, - }, -}; diff --git a/public/data/index.d.ts b/public/data/index.d.ts deleted file mode 100644 index e741a48..0000000 --- a/public/data/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { counties } from "./countyData" -import { subCounties } from "./subcountyData" -import { country } from "./country" -export { counties, subCounties, country } diff --git a/public/data/index.js b/public/data/index.js deleted file mode 100644 index 540a979..0000000 --- a/public/data/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.country = exports.subCounties = exports.counties = void 0; -const countyData_1 = require("./countyData"); -Object.defineProperty(exports, "counties", { enumerable: true, get: function () { return countyData_1.counties; } }); -const subcountyData_1 = require("./subcountyData"); -Object.defineProperty(exports, "subCounties", { enumerable: true, get: function () { return subcountyData_1.subCounties; } }); -const country_1 = require("./country"); -Object.defineProperty(exports, "country", { enumerable: true, get: function () { return country_1.country; } }); diff --git a/public/data/subcountyData.d.ts b/public/data/subcountyData.d.ts deleted file mode 100644 index 0a0b35e..0000000 --- a/public/data/subcountyData.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -interface Details { - male: number - female: number - intersex: number - popDensity: { - landArea: number - density: number | null - } - total: number -} -export interface SubCounty { - [key: string]: { - [key: string]: Details - } -} -export declare const subCounties: SubCounty -export {} diff --git a/public/data/subcountyData.js b/public/data/subcountyData.js deleted file mode 100644 index 85aa308..0000000 --- a/public/data/subcountyData.js +++ /dev/null @@ -1,2514 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.subCounties = void 0; -exports.subCounties = { - Mombasa: { - Changamwe: { - total: 131882, - male: 68761, - female: 63121, - intersex: 0, - popDensity: { landArea: 18, density: 7457 }, - }, - Jomvu: { - total: 163415, - male: 83002, - female: 80410, - intersex: 3, - popDensity: { landArea: 37, density: 4432 }, - }, - Kisauni: { - total: 291930, - male: 146748, - female: 145176, - intersex: 6, - popDensity: { landArea: 88, density: 3328 }, - }, - Likoni: { - total: 250358, - male: 126962, - female: 123392, - intersex: 4, - popDensity: { landArea: 40, density: 6187 }, - }, - Mvita: { - total: 154171, - male: 75565, - female: 78601, - intersex: 5, - popDensity: { landArea: 15, density: 10543 }, - }, - Nyali: { - total: 216577, - male: 109219, - female: 107346, - intersex: 12, - popDensity: { landArea: 23, density: 9610 }, - }, - }, - Kwale: { - Kinango: { - total: 94220, - male: 45413, - female: 48806, - intersex: 1, - popDensity: { landArea: 1612, density: 58 }, - }, - "Lunga lunga": { - total: 198423, - male: 97174, - female: 101245, - intersex: 4, - popDensity: { landArea: 2765, density: 72 }, - }, - Matuga: { - total: 194252, - male: 95831, - female: 98419, - intersex: 2, - popDensity: { landArea: 1034, density: 188 }, - }, - Msambweni: { - total: 177690, - male: 89206, - female: 88480, - intersex: 4, - popDensity: { landArea: 412, density: 432 }, - }, - Samburu: { - total: 202235, - male: 97497, - female: 104731, - intersex: 7, - popDensity: { landArea: 2430, density: 83 }, - }, - }, - Kilifi: { - Chonyi: { - total: 62335, - male: 29527, - female: 32807, - intersex: 1, - popDensity: { landArea: 193, density: 324 }, - }, - Ganze: { - total: 143906, - male: 66921, - female: 76981, - intersex: 4, - popDensity: { landArea: 3218, density: 45 }, - }, - Kaloleni: { - total: 193682, - male: 92614, - female: 101063, - intersex: 5, - popDensity: { landArea: 706, density: 274 }, - }, - Kauma: { - total: 22638, - male: 10965, - female: 11673, - intersex: 0, - popDensity: { landArea: 181, density: 125 }, - }, - "Kilifi north": { - total: 178824, - male: 86986, - female: 91836, - intersex: 2, - popDensity: { landArea: 264, density: 676 }, - }, - "Kilifi south": { - total: 206753, - male: 101852, - female: 104897, - intersex: 4, - popDensity: { landArea: 290, density: 712 }, - }, - Magarini: { - total: 191610, - male: 93302, - female: 98308, - intersex: 0, - popDensity: { landArea: 5229, density: 37 }, - }, - Malindi: { - total: 333226, - male: 163351, - female: 169866, - intersex: 9, - popDensity: { landArea: 2263, density: 147 }, - }, - Rabai: { - total: 120813, - male: 58571, - female: 62242, - intersex: 0, - popDensity: { landArea: 208, density: 581 }, - }, - }, - "Tana river": { - "Tana north": { - total: 116757, - male: 59123, - female: 57632, - intersex: 0, - popDensity: { landArea: 13305, density: 9 }, - }, - "Tana delta": { - total: 110640, - male: 55716, - female: 54924, - intersex: 2, - popDensity: { landArea: 15432, density: 7 }, - }, - "Tana river": { - total: 88546, - male: 43711, - female: 44835, - intersex: 0, - popDensity: { landArea: 9167, density: 10 }, - }, - }, - Lamu: { - "Lamu east": { - total: 22258, - male: 11675, - female: 10583, - intersex: 0, - popDensity: { landArea: 2338, density: 10 }, - }, - "Lamu west": { - total: 121662, - male: 64428, - female: 57230, - intersex: 4, - popDensity: { landArea: 3945, density: 31 }, - }, - }, - "Taita taveta": { - Mwatate: { - total: 81659, - male: 41426, - female: 40231, - intersex: 2, - popDensity: { landArea: 2723, density: 30 }, - }, - Taita: { - total: 55959, - male: 28386, - female: 27573, - intersex: 0, - popDensity: { landArea: 478, density: 117 }, - }, - Taveta: { - total: 91222, - male: 47410, - female: 43812, - intersex: 0, - popDensity: { landArea: 6399, density: 14 }, - }, - Voi: { - total: 111831, - male: 56115, - female: 55711, - intersex: 5, - popDensity: { landArea: 7553, density: 15 }, - }, - }, - Garissa: { - Balambala: { - total: 32257, - male: 20277, - female: 11979, - intersex: 1, - popDensity: { landArea: 3684, density: 9 }, - }, - Dadaab: { - total: 185252, - male: 99059, - female: 86185, - intersex: 8, - popDensity: { landArea: 6415, density: 29 }, - }, - Fafi: { - total: 134040, - male: 72617, - female: 61413, - intersex: 10, - popDensity: { landArea: 15050, density: 9 }, - }, - Garissa: { - total: 163914, - male: 83460, - female: 80449, - intersex: 5, - popDensity: { landArea: 3318, density: 49 }, - }, - Hulugho: { - total: 133984, - male: 78081, - female: 55898, - intersex: 5, - popDensity: { landArea: 7737, density: 17 }, - }, - Ijara: { - total: 141591, - male: 80458, - female: 61129, - intersex: 4, - popDensity: { landArea: 2453, density: 58 }, - }, - Lagdera: { - total: 50315, - male: 25023, - female: 25291, - intersex: 1, - popDensity: { landArea: 6096, density: 8 }, - }, - }, - Wajir: { - Buna: { - total: 49886, - male: 26796, - female: 23088, - intersex: 2, - popDensity: { landArea: 3888, density: 13 }, - }, - Eldas: { - total: 89104, - male: 45028, - female: 44069, - intersex: 7, - popDensity: { landArea: 4492, density: 20 }, - }, - Habaswein: { - total: 174134, - male: 94613, - female: 79505, - intersex: 16, - popDensity: { landArea: 10912, density: 16 }, - }, - Tarbaj: { - total: 56637, - male: 26856, - female: 29776, - intersex: 5, - popDensity: { landArea: 9608, density: 6 }, - }, - "Wajir east": { - total: 110654, - male: 59359, - female: 51292, - intersex: 3, - popDensity: { landArea: 4053, density: 27 }, - }, - "Wajir north": { - total: 62206, - male: 31990, - female: 30209, - intersex: 7, - popDensity: { landArea: 4042, density: 15 }, - }, - "Wajir south": { - total: 116814, - male: 64947, - female: 51864, - intersex: 3, - popDensity: { landArea: 10734, density: 11 }, - }, - "Wajir west": { - total: 121828, - male: 65785, - female: 56037, - intersex: 6, - popDensity: { landArea: 9044, density: 13 }, - }, - }, - Mandera: { - "Mandera west": { - total: 98300, - male: 48166, - female: 50130, - intersex: 4, - popDensity: { landArea: 4018, density: 24 }, - }, - Banisa: { - total: 152598, - male: 78301, - female: 74288, - intersex: 9, - popDensity: { landArea: 3944, density: 39 }, - }, - Kotulo: { - total: 72394, - male: 35799, - female: 36593, - intersex: 2, - popDensity: { landArea: 2509, density: 29 }, - }, - Lafey: { - total: 83457, - male: 40476, - female: 42976, - intersex: 5, - popDensity: { landArea: 3795, density: 22 }, - }, - "Mandera central": { - total: 157220, - male: 71688, - female: 85527, - intersex: 5, - popDensity: { landArea: 4032, density: 39 }, - }, - "Mandera east": { - total: 159638, - male: 83538, - female: 76095, - intersex: 5, - popDensity: { landArea: 2506, density: 64 }, - }, - "Mandera north": { - total: 143850, - male: 77008, - female: 66835, - intersex: 7, - popDensity: { landArea: 5138, density: 28 }, - }, - }, - Marsabit: { - Loiyangalani: { - total: 35713, - male: 17659, - female: 18051, - intersex: 3, - popDensity: { landArea: 11789, density: 3 }, - }, - "Marsabit central": { - total: 79181, - male: 40956, - female: 38214, - intersex: 11, - popDensity: { landArea: 2143, density: 37 }, - }, - "Marsabit north": { - total: 54297, - male: 30091, - female: 24205, - intersex: 1, - popDensity: { landArea: 19837, density: 3 }, - }, - "Marsabit south": { - total: 65376, - male: 33215, - female: 32161, - intersex: 0, - popDensity: { landArea: 8447, density: 8 }, - }, - Moyale: { - total: 108949, - male: 56440, - female: 52508, - intersex: 1, - popDensity: { landArea: 3327, density: 33 }, - }, - "North horr": { - total: 71447, - male: 41719, - female: 29726, - intersex: 2, - popDensity: { landArea: 19337, density: 4 }, - }, - Sololo: { - total: 44822, - male: 23468, - female: 21354, - intersex: 0, - popDensity: { landArea: 6064, density: 7 }, - }, - }, - Isiolo: { - Garbatulla: { - total: 99730, - male: 54661, - female: 45068, - intersex: 1, - popDensity: { landArea: 9902, density: 10 }, - }, - Isiolo: { - total: 121066, - male: 60414, - female: 60647, - intersex: 5, - popDensity: { landArea: 2691, density: 45 }, - }, - Merti: { - total: 47206, - male: 24435, - female: 22768, - intersex: 3, - popDensity: { landArea: 12756, density: 4 }, - }, - }, - Meru: { - "Buuri east": { - total: 76598, - male: 38101, - female: 38497, - intersex: 0, - popDensity: { landArea: 333, density: 230 }, - }, - "Buuri west": { - total: 80762, - male: 40496, - female: 40264, - intersex: 2, - popDensity: { landArea: 639, density: 126 }, - }, - "Igembe central": { - total: 221412, - male: 111208, - female: 110200, - intersex: 4, - popDensity: { landArea: 603, density: 367 }, - }, - "Igembe north": { - total: 169317, - male: 83364, - female: 85949, - intersex: 4, - popDensity: { landArea: 1113, density: 152 }, - }, - "Igembe south": { - total: 161646, - male: 80192, - female: 81446, - intersex: 8, - popDensity: { landArea: 255, density: 633 }, - }, - "Imenti north": { - total: 177567, - male: 88506, - female: 89056, - intersex: 5, - popDensity: { landArea: 232, density: 767 }, - }, - "Imenti south": { - total: 206506, - male: 103338, - female: 103162, - intersex: 6, - popDensity: { landArea: 418, density: 494 }, - }, - "Meru central": { - total: 133818, - male: 66920, - female: 66894, - intersex: 4, - popDensity: { landArea: 377, density: 355 }, - }, - "Tigania central": { - total: 104730, - male: 51814, - female: 52916, - intersex: 0, - popDensity: { landArea: 237, density: 441 }, - }, - "Tigania east": { - total: 72549, - male: 35352, - female: 37194, - intersex: 3, - popDensity: { landArea: 511, density: 142 }, - }, - "Tigania west": { - total: 139961, - male: 67715, - female: 72241, - intersex: 5, - popDensity: { landArea: 399, density: 351 }, - }, - "Meru national park": { - total: 385, - male: 283, - female: 102, - intersex: 0, - popDensity: { landArea: 838, density: null }, - }, - "Mt. kenya forest": { - total: 463, - male: 409, - female: 54, - intersex: 0, - popDensity: { landArea: 1060, density: null }, - }, - }, - "Tharaka Nithi": { - "Igambang'ombe": { - total: 53210, - male: 26464, - female: 26745, - intersex: 1, - popDensity: { landArea: 323, density: 165 }, - }, - Maara: { - total: 114894, - male: 57689, - female: 57205, - intersex: 0, - popDensity: { landArea: 266, density: 431 }, - }, - "Meru south": { - total: 91080, - male: 44923, - female: 46155, - intersex: 2, - popDensity: { landArea: 139, density: 656 }, - }, - "Tharaka north": { - total: 58345, - male: 28290, - female: 30053, - intersex: 2, - popDensity: { landArea: 839, density: 70 }, - }, - "Tharaka south": { - total: 75250, - male: 36190, - female: 39058, - intersex: 2, - popDensity: { landArea: 637, density: 118 }, - }, - "Mount kenya forest": { - total: 398, - male: 208, - female: 190, - intersex: 0, - popDensity: { landArea: 360, density: 1 }, - }, - }, - Embu: { - "Embu east": { - total: 129564, - male: 64571, - female: 64991, - intersex: 2, - popDensity: { landArea: 253, density: 512 }, - }, - "Embu north": { - total: 79556, - male: 39665, - female: 39888, - intersex: 3, - popDensity: { landArea: 111, density: 719 }, - }, - "Embu west": { - total: 127100, - male: 63125, - female: 63966, - intersex: 9, - popDensity: { landArea: 158, density: 804 }, - }, - "Mbeere south": { - total: 163476, - male: 83311, - female: 80159, - intersex: 6, - popDensity: { landArea: 1312, density: 125 }, - }, - "Mbeere north": { - total: 108881, - male: 53517, - female: 55360, - intersex: 4, - popDensity: { landArea: 784, density: 139 }, - }, - "Mount kenya forest": { - total: 22, - male: 19, - female: 3, - intersex: 0, - popDensity: { landArea: 203, density: null }, - }, - }, - Kitui: { - Ikutha: { - total: 82964, - male: 39986, - female: 42976, - intersex: 2, - popDensity: { landArea: 9033, density: 9 }, - }, - Katulani: { - total: 47108, - male: 23150, - female: 23957, - intersex: 1, - popDensity: { landArea: 324, density: 146 }, - }, - Kisasi: { - total: 46142, - male: 22646, - female: 23496, - intersex: 0, - popDensity: { landArea: 295, density: 157 }, - }, - "Kitui central": { - total: 105991, - male: 52123, - female: 53863, - intersex: 5, - popDensity: { landArea: 422, density: 251 }, - }, - "Kitui west": { - total: 70871, - male: 33887, - female: 36983, - intersex: 1, - popDensity: { landArea: 416, density: 170 }, - }, - Kyuso: { - total: 76867, - male: 36789, - female: 40077, - intersex: 1, - popDensity: { landArea: 2525, density: 30 }, - }, - "Lower yatta": { - total: 63329, - male: 31701, - female: 31628, - intersex: 0, - popDensity: { landArea: 1191, density: 53 }, - }, - Matinyani: { - total: 47811, - male: 23362, - female: 24448, - intersex: 1, - popDensity: { landArea: 264, density: 181 }, - }, - Migwani: { - total: 79255, - male: 37525, - female: 41726, - intersex: 4, - popDensity: { landArea: 635, density: 125 }, - }, - Mumoni: { - total: 29344, - male: 13748, - female: 15596, - intersex: 0, - popDensity: { landArea: 611, density: 48 }, - }, - Mutitu: { - total: 55287, - male: 26388, - female: 28896, - intersex: 3, - popDensity: { landArea: 4710, density: 12 }, - }, - "Mutitu north": { - total: 21215, - male: 10337, - female: 10877, - intersex: 1, - popDensity: { landArea: 548, density: 39 }, - }, - Mutomo: { - total: 113356, - male: 54819, - female: 58531, - intersex: 6, - popDensity: { landArea: 2853, density: 40 }, - }, - "Mwingi central": { - total: 108713, - male: 52539, - female: 56174, - intersex: 0, - popDensity: { landArea: 1146, density: 95 }, - }, - "Mwingi east": { - total: 85139, - male: 40314, - female: 44820, - intersex: 5, - popDensity: { landArea: 3418, density: 25 }, - }, - Nzambani: { - total: 46788, - male: 22929, - female: 23857, - intersex: 2, - popDensity: { landArea: 320, density: 146 }, - }, - Thagicu: { - total: 15136, - male: 7141, - female: 7994, - intersex: 1, - popDensity: { landArea: 363, density: 42 }, - }, - Tseikuru: { - total: 40871, - male: 19619, - female: 21252, - intersex: 0, - popDensity: { landArea: 1356, density: 30 }, - }, - }, - Machakos: { - "Athi river": { - total: 322499, - male: 164322, - female: 158172, - intersex: 5, - popDensity: { landArea: 835, density: 386 }, - }, - Kalama: { - total: 54462, - male: 26764, - female: 27692, - intersex: 6, - popDensity: { landArea: 480, density: 113 }, - }, - Kangundo: { - total: 97917, - male: 48697, - female: 49219, - intersex: 1, - popDensity: { landArea: 173, density: 565 }, - }, - Kathiani: { - total: 111890, - male: 54910, - female: 56976, - intersex: 4, - popDensity: { landArea: 204, density: 548 }, - }, - Machakos: { - total: 170606, - male: 85486, - female: 85114, - intersex: 6, - popDensity: { landArea: 280, density: 609 }, - }, - Masinga: { - total: 148522, - male: 73519, - female: 75001, - intersex: 2, - popDensity: { landArea: 1407, density: 106 }, - }, - Matungulu: { - total: 161557, - male: 81145, - female: 80407, - intersex: 5, - popDensity: { landArea: 581, density: 278 }, - }, - Mwala: { - total: 181896, - male: 90427, - female: 91466, - intersex: 3, - popDensity: { landArea: 1013, density: 179 }, - }, - Yatta: { - total: 172583, - male: 85437, - female: 87144, - intersex: 2, - popDensity: { landArea: 1062, density: 162 }, - }, - }, - Makueni: { - Kathonzweni: { - total: 79780, - male: 39335, - female: 40442, - intersex: 3, - popDensity: { landArea: 881, density: 91 }, - }, - Kibwezi: { - total: 197000, - male: 98477, - female: 98517, - intersex: 6, - popDensity: { landArea: 3137, density: 63 }, - }, - Kilungu: { - total: 60952, - male: 29019, - female: 31932, - intersex: 1, - popDensity: { landArea: 154, density: 395 }, - }, - Makindu: { - total: 84946, - male: 42204, - female: 42742, - intersex: 0, - popDensity: { landArea: 852, density: 100 }, - }, - Makueni: { - total: 130375, - male: 65418, - female: 64955, - intersex: 2, - popDensity: { landArea: 609, density: 214 }, - }, - "Mbooni east": { - total: 97756, - male: 48152, - female: 49601, - intersex: 3, - popDensity: { landArea: 693, density: 141 }, - }, - "Mbooni west": { - total: 102594, - male: 49434, - female: 53159, - intersex: 1, - popDensity: { landArea: 271, density: 379 }, - }, - Mukaa: { - total: 107549, - male: 54481, - female: 53068, - intersex: 0, - popDensity: { landArea: 804, density: 134 }, - }, - Nzaui: { - total: 126701, - male: 63171, - female: 63526, - intersex: 4, - popDensity: { landArea: 775, density: 163 }, - }, - }, - Nyandarua: { - Kinangop: { - total: 111410, - male: 54727, - female: 56679, - intersex: 4, - popDensity: { landArea: 294, density: 379 }, - }, - "Nyandarua south": { - total: 93870, - male: 46157, - female: 47708, - intersex: 5, - popDensity: { landArea: 314, density: 299 }, - }, - Mirangine: { - total: 67214, - male: 33447, - female: 33766, - intersex: 1, - popDensity: { landArea: 246, density: 274 }, - }, - Kipipiri: { - total: 93855, - male: 46113, - female: 47740, - intersex: 2, - popDensity: { landArea: 456, density: 206 }, - }, - "Nyandarua central": { - total: 75262, - male: 37329, - female: 37931, - intersex: 2, - popDensity: { landArea: 347, density: 217 }, - }, - "Nyandarua west": { - total: 97965, - male: 48752, - female: 49209, - intersex: 4, - popDensity: { landArea: 385, density: 255 }, - }, - "Nyandarua north": { - total: 98698, - male: 48486, - female: 50210, - intersex: 2, - popDensity: { landArea: 528, density: 187 }, - }, - "Aberdare national park": { - total: 15, - male: 11, - female: 4, - intersex: 0, - popDensity: { landArea: 717, density: null }, - }, - }, - Nyeri: { - Tetu: { - total: 80453, - male: 39293, - female: 41155, - intersex: 5, - popDensity: { landArea: 217, density: 372 }, - }, - "Kieni east": { - total: 110376, - male: 55360, - female: 55012, - intersex: 4, - popDensity: { landArea: 449, density: 246 }, - }, - "Kieni west": { - total: 88525, - male: 43843, - female: 44677, - intersex: 5, - popDensity: { landArea: 518, density: 171 }, - }, - "Mathira east": { - total: 99065, - male: 48070, - female: 50992, - intersex: 3, - popDensity: { landArea: 130, density: 760 }, - }, - "Mathira west": { - total: 59895, - male: 29480, - female: 30412, - intersex: 3, - popDensity: { landArea: 162, density: 369 }, - }, - "Nyeri south": { - total: 91081, - male: 44115, - female: 46964, - intersex: 2, - popDensity: { landArea: 169, density: 538 }, - }, - "Mukurwe-ini": { - total: 89137, - male: 43975, - female: 45156, - intersex: 6, - popDensity: { landArea: 179, density: 498 }, - }, - "Nyeri central": { - total: 140338, - male: 69955, - female: 70380, - intersex: 3, - popDensity: { landArea: 168, density: 837 }, - }, - "Mt. kenya forest": { - total: 188, - male: 123, - female: 65, - intersex: 0, - popDensity: { landArea: 611, density: null }, - }, - "Aberdare forest": { - total: 106, - male: 74, - female: 32, - intersex: 0, - popDensity: { landArea: 722, density: null }, - }, - }, - Kirinyaga: { - "Kirinyaga central": { - total: 122740, - male: 60118, - female: 62617, - intersex: 5, - popDensity: { landArea: 153, density: 800 }, - }, - "Kirinyaga east": { - total: 135559, - male: 67037, - female: 68514, - intersex: 8, - popDensity: { landArea: 232, density: 585 }, - }, - "Kirinyaga west": { - total: 114660, - male: 56154, - female: 58502, - intersex: 4, - popDensity: { landArea: 208, density: 552 }, - }, - "Mwea east": { - total: 132554, - male: 66432, - female: 66114, - intersex: 8, - popDensity: { landArea: 303, density: 437 }, - }, - "Mwea west": { - total: 104828, - male: 52228, - female: 52594, - intersex: 6, - popDensity: { landArea: 239, density: 438 }, - }, - "Mount kenya forest": { - total: 70, - male: 42, - female: 28, - intersex: 0, - popDensity: { landArea: 343, density: null }, - }, - }, - "Murang'a": { - "Murang'a east": { - total: 110311, - male: 54665, - female: 55645, - intersex: 1, - popDensity: { landArea: 241, density: 458 }, - }, - Kangema: { - total: 80447, - male: 39582, - female: 40862, - intersex: 3, - popDensity: { landArea: 174, density: 463 }, - }, - Mathioya: { - total: 92814, - male: 45454, - female: 47359, - intersex: 1, - popDensity: { landArea: 178, density: 523 }, - }, - Kahuro: { - total: 88193, - male: 43352, - female: 44834, - intersex: 7, - popDensity: { landArea: 169, density: 521 }, - }, - "Murang'a south": { - total: 184824, - male: 91732, - female: 93087, - intersex: 5, - popDensity: { landArea: 457, density: 405 }, - }, - Gatanga: { - total: 187989, - male: 94437, - female: 93548, - intersex: 4, - popDensity: { landArea: 531, density: 354 }, - }, - Kigumo: { - total: 136921, - male: 67989, - female: 68929, - intersex: 3, - popDensity: { landArea: 244, density: 561 }, - }, - Kandara: { - total: 175098, - male: 86698, - female: 88393, - intersex: 7, - popDensity: { landArea: 235, density: 746 }, - }, - "Aberdare forest": { - total: 43, - male: 31, - female: 12, - intersex: 0, - popDensity: { landArea: 295, density: null }, - }, - }, - Kiambu: { - "Gatundu north": { - total: 109870, - male: 54189, - female: 55678, - intersex: 3, - popDensity: { landArea: 286, density: 384 }, - }, - "Gatundu south": { - total: 122103, - male: 60384, - female: 61714, - intersex: 5, - popDensity: { landArea: 194, density: 631 }, - }, - Githunguri: { - total: 165232, - male: 82037, - female: 83187, - intersex: 8, - popDensity: { landArea: 174, density: 948 }, - }, - Juja: { - total: 300948, - male: 148446, - female: 152480, - intersex: 22, - popDensity: { landArea: 342, density: 880 }, - }, - Kabete: { - total: 199653, - male: 97794, - female: 101845, - intersex: 14, - popDensity: { landArea: 61, density: 3289 }, - }, - Kiambaa: { - total: 236400, - male: 115690, - female: 120695, - intersex: 15, - popDensity: { landArea: 91, density: 2595 }, - }, - Kiambu: { - total: 145903, - male: 69661, - female: 76225, - intersex: 17, - popDensity: { landArea: 98, density: 1483 }, - }, - Kikuyu: { - total: 187122, - male: 90919, - female: 96198, - intersex: 5, - popDensity: { landArea: 173, density: 1082 }, - }, - Lari: { - total: 135303, - male: 67061, - female: 68238, - intersex: 4, - popDensity: { landArea: 432, density: 313 }, - }, - Limuru: { - total: 159314, - male: 79632, - female: 79682, - intersex: 0, - popDensity: { landArea: 285, density: 559 }, - }, - Ruiru: { - total: 371111, - male: 180947, - female: 190144, - intersex: 20, - popDensity: { landArea: 201, density: 1846 }, - }, - "Thika east": { - total: 38956, - male: 19688, - female: 19264, - intersex: 4, - popDensity: { landArea: 110, density: 354 }, - }, - "Thika west": { - total: 245820, - male: 120698, - female: 125104, - intersex: 18, - popDensity: { landArea: 91, density: 2689 }, - }, - }, - Turkana: { - Kibish: { - total: 36769, - male: 18651, - female: 18117, - intersex: 1, - popDensity: { landArea: 10466, density: 4 }, - }, - Loima: { - total: 107795, - male: 54341, - female: 53453, - intersex: 1, - popDensity: { landArea: 9120, density: 12 }, - }, - "Turkana central": { - total: 185305, - male: 93145, - female: 92160, - intersex: 0, - popDensity: { landArea: 6415, density: 29 }, - }, - "Turkana east": { - total: 138526, - male: 76871, - female: 61643, - intersex: 12, - popDensity: { landArea: 11396, density: 12 }, - }, - "Turkana north": { - total: 65218, - male: 32810, - female: 32408, - intersex: 0, - popDensity: { landArea: 7012, density: 9 }, - }, - "Turkana south": { - total: 153736, - male: 78402, - female: 75329, - intersex: 5, - popDensity: { landArea: 7045, density: 22 }, - }, - "Turkana west": { - total: 239627, - male: 123867, - female: 115758, - intersex: 2, - popDensity: { landArea: 16779, density: 14 }, - }, - }, - "West pokot": { - Kipkomo: { - total: 102633, - male: 50923, - female: 51703, - intersex: 7, - popDensity: { landArea: 766, density: 134 }, - }, - "Pokot central": { - total: 119016, - male: 59682, - female: 59331, - intersex: 3, - popDensity: { landArea: 2055, density: 58 }, - }, - "Pokot north": { - total: 134485, - male: 64780, - female: 69702, - intersex: 3, - popDensity: { landArea: 3911, density: 34 }, - }, - "Pokot south": { - total: 80661, - male: 39808, - female: 40851, - intersex: 2, - popDensity: { landArea: 537, density: 150 }, - }, - "West pokot": { - total: 184446, - male: 91820, - female: 92626, - intersex: 0, - popDensity: { landArea: 1855, density: 99 }, - }, - }, - Samburu: { - "Samburu central": { - total: 164942, - male: 83633, - female: 81307, - intersex: 2, - popDensity: { landArea: 3699, density: 45 }, - }, - "Samburu east": { - total: 77994, - male: 38211, - female: 39782, - intersex: 1, - popDensity: { landArea: 10016, density: 8 }, - }, - "Samburu north": { - total: 67391, - male: 34930, - female: 32457, - intersex: 4, - popDensity: { landArea: 7375, density: 9 }, - }, - }, - "Trans nzoia": { - "Trans nzoia west": { - total: 202377, - male: 101198, - female: 101174, - intersex: 5, - popDensity: { landArea: 355, density: 569 }, - }, - "Trans nzoia east": { - total: 229538, - male: 113498, - female: 116029, - intersex: 11, - popDensity: { landArea: 629, density: 365 }, - }, - Kwanza: { - total: 203821, - male: 100234, - female: 103584, - intersex: 3, - popDensity: { landArea: 465, density: 438 }, - }, - Endebess: { - total: 111782, - male: 56090, - female: 55689, - intersex: 3, - popDensity: { landArea: 678, density: 165 }, - }, - Kiminini: { - total: 242823, - male: 118087, - female: 124730, - intersex: 6, - popDensity: { landArea: 367, density: 662 }, - }, - }, - "Uasin gishu": { - Ainabkoi: { - total: 138184, - male: 68348, - female: 69835, - intersex: 1, - popDensity: { landArea: 483, density: 286 }, - }, - Kapseret: { - total: 198499, - male: 99650, - female: 98845, - intersex: 4, - popDensity: { landArea: 299, density: 663 }, - }, - Kesses: { - total: 148798, - male: 74301, - female: 74493, - intersex: 4, - popDensity: { landArea: 748, density: 199 }, - }, - Moiben: { - total: 181338, - male: 90309, - female: 91027, - intersex: 2, - popDensity: { landArea: 770, density: 236 }, - }, - Soy: { - total: 229094, - male: 114082, - female: 115007, - intersex: 5, - popDensity: { landArea: 668, density: 343 }, - }, - Turbo: { - total: 267273, - male: 133579, - female: 133682, - intersex: 12, - popDensity: { landArea: 431, density: 620 }, - }, - }, - "Elgeyo marakwet": { - "Keiyo north": { - total: 99176, - male: 49601, - female: 49574, - intersex: 1, - popDensity: { landArea: 543, density: 183 }, - }, - "Keiyo south": { - total: 120750, - male: 60919, - female: 59827, - intersex: 4, - popDensity: { landArea: 898, density: 134 }, - }, - "Marakwet east": { - total: 97041, - male: 47849, - female: 49190, - intersex: 2, - popDensity: { landArea: 853, density: 114 }, - }, - "Marakwet west": { - total: 137513, - male: 68948, - female: 68560, - intersex: 5, - popDensity: { landArea: 738, density: 186 }, - }, - }, - Nandi: { - Chesumei: { - total: 164133, - male: 80949, - female: 83180, - intersex: 4, - popDensity: { landArea: 475, density: 346 }, - }, - "Nandi central": { - total: 147553, - male: 73291, - female: 74255, - intersex: 7, - popDensity: { landArea: 362, density: 407 }, - }, - "Nandi east": { - total: 119173, - male: 59899, - female: 59271, - intersex: 3, - popDensity: { landArea: 392, density: 304 }, - }, - "Nandi north": { - total: 166171, - male: 82512, - female: 83656, - intersex: 3, - popDensity: { landArea: 606, density: 274 }, - }, - "Nandi south": { - total: 172750, - male: 85718, - female: 87029, - intersex: 3, - popDensity: { landArea: 457, density: 378 }, - }, - Tinderet: { - total: 115931, - male: 58890, - female: 57039, - intersex: 2, - popDensity: { landArea: 557, density: 208 }, - }, - }, - Baringo: { - "Baringo central": { - total: 96951, - male: 48120, - female: 48829, - intersex: 2, - popDensity: { landArea: 786, density: 123 }, - }, - "Baringo north": { - total: 104871, - male: 52369, - female: 52500, - intersex: 2, - popDensity: { landArea: 1629, density: 64 }, - }, - "East pokot": { - total: 79923, - male: 40462, - female: 39459, - intersex: 2, - popDensity: { landArea: 2500, density: 32 }, - }, - Koibatek: { - total: 129535, - male: 65295, - female: 64238, - intersex: 2, - popDensity: { landArea: 939, density: 138 }, - }, - Marigat: { - total: 90955, - male: 45706, - female: 45246, - intersex: 3, - popDensity: { landArea: 1405, density: 65 }, - }, - Mogotio: { - total: 91104, - male: 46014, - female: 45088, - intersex: 2, - popDensity: { landArea: 1375, density: 66 }, - }, - "Tiaty east": { - total: 73424, - male: 38356, - female: 35068, - intersex: 0, - popDensity: { landArea: 2163, density: 34 }, - }, - }, - Laikipia: { - "Laikipia central": { - total: 95594, - male: 47888, - female: 47705, - intersex: 1, - popDensity: { landArea: 1233, density: 78 }, - }, - "Laikipia east": { - total: 102815, - male: 52078, - female: 50732, - intersex: 5, - popDensity: { landArea: 1539, density: 67 }, - }, - "Laikipia north": { - total: 36184, - male: 18067, - female: 18116, - intersex: 1, - popDensity: { landArea: 2550, density: 14 }, - }, - "Laikipia west": { - total: 129263, - male: 65158, - female: 64102, - intersex: 3, - popDensity: { landArea: 3372, density: 38 }, - }, - Nyahururu: { - total: 154704, - male: 76249, - female: 78447, - intersex: 8, - popDensity: { landArea: 813, density: 190 }, - }, - }, - Nakuru: { - Gilgil: { - total: 185209, - male: 92955, - female: 92247, - intersex: 7, - popDensity: { landArea: 1075, density: 172 }, - }, - "Kuresoi north": { - total: 175074, - male: 87472, - female: 87599, - intersex: 3, - popDensity: { landArea: 618, density: 283 }, - }, - "Kuresoi south": { - total: 155324, - male: 78204, - female: 77117, - intersex: 3, - popDensity: { landArea: 591, density: 263 }, - }, - Molo: { - total: 156732, - male: 78129, - female: 78598, - intersex: 5, - popDensity: { landArea: 483, density: 324 }, - }, - Naivasha: { - total: 355383, - male: 179222, - female: 176132, - intersex: 29, - popDensity: { landArea: 1958, density: 181 }, - }, - "Nakuru east": { - total: 193926, - male: 92956, - female: 100960, - intersex: 10, - popDensity: { landArea: 231, density: 840 }, - }, - "Nakuru north": { - total: 218050, - male: 106155, - female: 111880, - intersex: 15, - popDensity: { landArea: 387, density: 563 }, - }, - "Nakuru west": { - total: 198661, - male: 101797, - female: 96854, - intersex: 10, - popDensity: { landArea: 72, density: 2764 }, - }, - Njoro: { - total: 238773, - male: 118361, - female: 120408, - intersex: 4, - popDensity: { landArea: 699, density: 341 }, - }, - Rongai: { - total: 199906, - male: 99976, - female: 99922, - intersex: 8, - popDensity: { landArea: 988, density: 202 }, - }, - Subukia: { - total: 85164, - male: 42045, - female: 43118, - intersex: 1, - popDensity: { landArea: 402, density: 212 }, - }, - }, - Narok: { - "Narok east": { - total: 115323, - male: 58699, - female: 56617, - intersex: 7, - popDensity: { landArea: 2042, density: 56 }, - }, - "Narok north": { - total: 251862, - male: 128024, - female: 123829, - intersex: 9, - popDensity: { landArea: 2159, density: 117 }, - }, - "Narok south": { - total: 238472, - male: 118441, - female: 120029, - intersex: 2, - popDensity: { landArea: 4577, density: 52 }, - }, - "Narok west": { - total: 195287, - male: 97085, - female: 98198, - intersex: 4, - popDensity: { landArea: 5563, density: 35 }, - }, - "Trans mara east": { - total: 111183, - male: 54545, - female: 56637, - intersex: 1, - popDensity: { landArea: 310, density: 359 }, - }, - "Trans mara west": { - total: 245714, - male: 122220, - female: 123491, - intersex: 3, - popDensity: { landArea: 2546, density: 97 }, - }, - "Mau forest": { - total: 32, - male: 28, - female: 4, - intersex: 0, - popDensity: { landArea: 734, density: null }, - }, - }, - Kajiado: { - Isinya: { - total: 210473, - male: 105607, - female: 104860, - intersex: 6, - popDensity: { landArea: 1072, density: 196 }, - }, - "Kajiado central": { - total: 161862, - male: 81514, - female: 80343, - intersex: 5, - popDensity: { landArea: 4239, density: 38 }, - }, - "Kajiado north": { - total: 306596, - male: 150675, - female: 155908, - intersex: 13, - popDensity: { landArea: 111, density: 2773 }, - }, - "Kajiado west": { - total: 182849, - male: 91607, - female: 91237, - intersex: 5, - popDensity: { landArea: 7862, density: 23 }, - }, - Loitokitok: { - total: 191846, - male: 94613, - female: 97225, - intersex: 8, - popDensity: { landArea: 6337, density: 30 }, - }, - Mashuuru: { - total: 64214, - male: 33082, - female: 31131, - intersex: 1, - popDensity: { landArea: 2251, density: 29 }, - }, - }, - Kericho: { - Belgut: { - total: 145072, - male: 72508, - female: 72564, - intersex: 0, - popDensity: { landArea: 264, density: 549 }, - }, - Bureti: { - total: 199470, - male: 98823, - female: 100642, - intersex: 5, - popDensity: { landArea: 321, density: 622 }, - }, - "Kericho east": { - total: 170625, - male: 86671, - female: 83947, - intersex: 7, - popDensity: { landArea: 241, density: 709 }, - }, - Kipkelion: { - total: 122530, - male: 61066, - female: 61460, - intersex: 4, - popDensity: { landArea: 350, density: 350 }, - }, - Londiani: { - total: 137580, - male: 68570, - female: 69000, - intersex: 10, - popDensity: { landArea: 400, density: 344 }, - }, - "Soin sigowet": { - total: 126500, - male: 63103, - female: 63395, - intersex: 2, - popDensity: { landArea: 466, density: 271 }, - }, - }, - Bomet: { - "Bomet east": { - total: 144275, - male: 71095, - female: 73172, - intersex: 8, - popDensity: { landArea: 305, density: 473 }, - }, - Chepalungu: { - total: 164837, - male: 79921, - female: 84912, - intersex: 4, - popDensity: { landArea: 461, density: 358 }, - }, - Konoin: { - total: 163507, - male: 83120, - female: 80384, - intersex: 3, - popDensity: { landArea: 393, density: 417 }, - }, - Sotik: { - total: 227855, - male: 112369, - female: 115482, - intersex: 4, - popDensity: { landArea: 544, density: 419 }, - }, - "Bomet central": { - total: 175215, - male: 87782, - female: 87429, - intersex: 4, - popDensity: { landArea: 286, density: 613 }, - }, - }, - Kakamega: { - Butere: { - total: 154100, - male: 73634, - female: 80463, - intersex: 3, - popDensity: { landArea: 210, density: 734 }, - }, - "Kakamega central": { - total: 188212, - male: 92774, - female: 95432, - intersex: 6, - popDensity: { landArea: 155, density: 1212 }, - }, - "Kakamega east": { - total: 167641, - male: 80853, - female: 86784, - intersex: 4, - popDensity: { landArea: 417, density: 402 }, - }, - "Kakamega north": { - total: 238330, - male: 115511, - female: 122814, - intersex: 5, - popDensity: { landArea: 421, density: 566 }, - }, - "Kakamega south": { - total: 111743, - male: 53219, - female: 58524, - intersex: 0, - popDensity: { landArea: 146, density: 764 }, - }, - Khwisero: { - total: 113476, - male: 53670, - female: 59803, - intersex: 3, - popDensity: { landArea: 146, density: 779 }, - }, - Likuyani: { - total: 152055, - male: 73710, - female: 78341, - intersex: 4, - popDensity: { landArea: 316, density: 481 }, - }, - Lugari: { - total: 122728, - male: 59135, - female: 63593, - intersex: 0, - popDensity: { landArea: 254, density: 483 }, - }, - Matete: { - total: 66172, - male: 31749, - female: 34423, - intersex: 0, - popDensity: { landArea: 103, density: 644 }, - }, - Matungu: { - total: 166940, - male: 78793, - female: 88143, - intersex: 4, - popDensity: { landArea: 276, density: 606 }, - }, - "Mumias east": { - total: 116851, - male: 55895, - female: 60953, - intersex: 3, - popDensity: { landArea: 150, density: 778 }, - }, - "Mumias west": { - total: 115354, - male: 54915, - female: 60438, - intersex: 1, - popDensity: { landArea: 163, density: 706 }, - }, - Navakholo: { - total: 153977, - male: 73275, - female: 80695, - intersex: 7, - popDensity: { landArea: 259, density: 594 }, - }, - }, - Vihiga: { - Emuhaya: { - total: 97141, - male: 46507, - female: 50633, - intersex: 1, - popDensity: { landArea: 89, density: 1091 }, - }, - Vihiga: { - total: 95292, - male: 45788, - female: 49501, - intersex: 3, - popDensity: { landArea: 90, density: 1058 }, - }, - Sabatia: { - total: 131628, - male: 62944, - female: 68683, - intersex: 1, - popDensity: { landArea: 111, density: 1181 }, - }, - Luanda: { - total: 106694, - male: 51525, - female: 55165, - intersex: 4, - popDensity: { landArea: 84, density: 1265 }, - }, - Hamisi: { - total: 159241, - male: 76901, - female: 82337, - intersex: 3, - popDensity: { landArea: 157, density: 1013 }, - }, - "Kakamega forest": { - total: 17, - male: 13, - female: 4, - intersex: 0, - popDensity: { landArea: 32, density: 1 }, - }, - }, - Bungoma: { - Bumula: { - total: 215892, - male: 103368, - female: 112523, - intersex: 1, - popDensity: { landArea: 345, density: 625 }, - }, - "Bungoma central": { - total: 177748, - male: 86302, - female: 91438, - intersex: 8, - popDensity: { landArea: 233, density: 764 }, - }, - "Bungoma east": { - total: 114548, - male: 55775, - female: 58771, - intersex: 2, - popDensity: { landArea: 163, density: 702 }, - }, - "Bungoma north": { - total: 121317, - male: 58790, - female: 62526, - intersex: 1, - popDensity: { landArea: 192, density: 633 }, - }, - "Bungoma south": { - total: 287765, - male: 139705, - female: 148055, - intersex: 5, - popDensity: { landArea: 321, density: 896 }, - }, - Cheptais: { - total: 136035, - male: 67717, - female: 68312, - intersex: 6, - popDensity: { landArea: 223, density: 610 }, - }, - Kimilili: { - total: 162038, - male: 78560, - female: 83475, - intersex: 3, - popDensity: { landArea: 180, density: 902 }, - }, - "Mt elgon": { - total: 78873, - male: 38977, - female: 39893, - intersex: 3, - popDensity: { landArea: 126, density: 624 }, - }, - "Bungoma west": { - total: 119875, - male: 58225, - female: 61649, - intersex: 1, - popDensity: { landArea: 211, density: 568 }, - }, - Tongaren: { - total: 100343, - male: 48685, - female: 51657, - intersex: 1, - popDensity: { landArea: 185, density: 542 }, - }, - "Webuye west": { - total: 152515, - male: 74180, - female: 78331, - intersex: 4, - popDensity: { landArea: 239, density: 638 }, - }, - "Mt elgon forest": { - total: 3621, - male: 1862, - female: 1759, - intersex: 0, - popDensity: { landArea: 606, density: 6 }, - }, - }, - Busia: { - Bunyala: { - total: 85977, - male: 41465, - female: 44511, - intersex: 1, - popDensity: { landArea: 192, density: 447 }, - }, - Busia: { - total: 142408, - male: 69034, - female: 73373, - intersex: 1, - popDensity: { landArea: 196, density: 727 }, - }, - Butula: { - total: 140334, - male: 65136, - female: 75195, - intersex: 3, - popDensity: { landArea: 247, density: 568 }, - }, - Nambale: { - total: 111636, - male: 52900, - female: 58732, - intersex: 4, - popDensity: { landArea: 238, density: 469 }, - }, - Samia: { - total: 107176, - male: 50821, - female: 56341, - intersex: 14, - popDensity: { landArea: 262, density: 408 }, - }, - "Teso north": { - total: 138034, - male: 66412, - female: 71619, - intersex: 3, - popDensity: { landArea: 261, density: 529 }, - }, - "Teso south": { - total: 168116, - male: 80484, - female: 87630, - intersex: 2, - popDensity: { landArea: 303, density: 555 }, - }, - }, - Siaya: { - Siaya: { - total: 224343, - male: 105906, - female: 118433, - intersex: 4, - popDensity: { landArea: 599, density: 375 }, - }, - Gem: { - total: 179792, - male: 85696, - female: 94092, - intersex: 4, - popDensity: { landArea: 405, density: 444 }, - }, - Ugenya: { - total: 134354, - male: 62624, - female: 71726, - intersex: 4, - popDensity: { landArea: 324, density: 415 }, - }, - Ugunja: { - total: 104241, - male: 48912, - female: 55329, - intersex: 0, - popDensity: { landArea: 201, density: 519 }, - }, - Bondo: { - total: 197883, - male: 95962, - female: 101917, - intersex: 4, - popDensity: { landArea: 599, density: 330 }, - }, - Rarieda: { - total: 152570, - male: 72569, - female: 79999, - intersex: 2, - popDensity: { landArea: 402, density: 379 }, - }, - }, - Kisumu: { - "Kisumu east": { - total: 220997, - male: 108304, - female: 112689, - intersex: 4, - popDensity: { landArea: 142, density: 1560 }, - }, - "Kisumu central": { - total: 174145, - male: 84155, - female: 89985, - intersex: 5, - popDensity: { landArea: 37, density: 4737 }, - }, - "Kisumu west": { - total: 172821, - male: 85697, - female: 87121, - intersex: 3, - popDensity: { landArea: 209, density: 827 }, - }, - Seme: { - total: 121667, - male: 57658, - female: 64007, - intersex: 2, - popDensity: { landArea: 268, density: 454 }, - }, - Muhoroni: { - total: 154116, - male: 76770, - female: 77345, - intersex: 1, - popDensity: { landArea: 658, density: 234 }, - }, - Nyando: { - total: 161508, - male: 77121, - female: 84380, - intersex: 7, - popDensity: { landArea: 446, density: 362 }, - }, - Nyakach: { - total: 150320, - male: 71237, - female: 79082, - intersex: 1, - popDensity: { landArea: 327, density: 460 }, - }, - }, - "Homa bay": { - "Homa bay": { - total: 117439, - male: 55756, - female: 61681, - intersex: 2, - popDensity: { landArea: 182, density: 645 }, - }, - Ndhiwa: { - total: 218136, - male: 103706, - female: 114422, - intersex: 8, - popDensity: { landArea: 713, density: 306 }, - }, - "Rachuonyo north": { - total: 178686, - male: 85409, - female: 93273, - intersex: 4, - popDensity: { landArea: 435, density: 410 }, - }, - "Rachuonyo east": { - total: 121822, - male: 57709, - female: 64111, - intersex: 2, - popDensity: { landArea: 251, density: 486 }, - }, - "Rachuonyo south": { - total: 130814, - male: 61663, - female: 69151, - intersex: 0, - popDensity: { landArea: 256, density: 511 }, - }, - Rangwe: { - total: 117732, - male: 55404, - female: 62325, - intersex: 3, - popDensity: { landArea: 274, density: 429 }, - }, - "Suba north": { - total: 124938, - male: 60530, - female: 64406, - intersex: 2, - popDensity: { landArea: 406, density: 307 }, - }, - "Suba south": { - total: 122383, - male: 59383, - female: 62998, - intersex: 2, - popDensity: { landArea: 634, density: 193 }, - }, - }, - Migori: { - Awendo: { - total: 117290, - male: 56348, - female: 60939, - intersex: 3, - popDensity: { landArea: 255, density: 459 }, - }, - "Kuria east": { - total: 96872, - male: 46969, - female: 49894, - intersex: 9, - popDensity: { landArea: 188, density: 516 }, - }, - "Kuria west": { - total: 208513, - male: 101090, - female: 107417, - intersex: 6, - popDensity: { landArea: 396, density: 527 }, - }, - Nyatike: { - total: 176162, - male: 83989, - female: 92164, - intersex: 9, - popDensity: { landArea: 677, density: 260 }, - }, - Rongo: { - total: 124587, - male: 59257, - female: 65329, - intersex: 1, - popDensity: { landArea: 213, density: 584 }, - }, - "Suna east": { - total: 122674, - male: 58977, - female: 63694, - intersex: 3, - popDensity: { landArea: 205, density: 598 }, - }, - "Suna west": { - total: 128890, - male: 61430, - female: 67459, - intersex: 1, - popDensity: { landArea: 288, density: 448 }, - }, - Uriri: { - total: 141448, - male: 68127, - female: 73318, - intersex: 3, - popDensity: { landArea: 392, density: 361 }, - }, - }, - Kisii: { - Etago: { - total: 83787, - male: 40137, - female: 43647, - intersex: 3, - popDensity: { landArea: 108, density: 773 }, - }, - Gucha: { - total: 83740, - male: 39631, - female: 44108, - intersex: 1, - popDensity: { landArea: 82, density: 1020 }, - }, - "Gucha south": { - total: 83623, - male: 40022, - female: 43598, - intersex: 3, - popDensity: { landArea: 95, density: 878 }, - }, - Kenyenya: { - total: 131740, - male: 62859, - female: 68878, - intersex: 3, - popDensity: { landArea: 142, density: 930 }, - }, - "Kisii central": { - total: 166906, - male: 81330, - female: 85573, - intersex: 3, - popDensity: { landArea: 136, density: 1229 }, - }, - "Kisii south": { - total: 135134, - male: 64514, - female: 70615, - intersex: 5, - popDensity: { landArea: 128, density: 1054 }, - }, - "Kitutu central": { - total: 154175, - male: 74608, - female: 79561, - intersex: 6, - popDensity: { landArea: 100, density: 1537 }, - }, - Marani: { - total: 107464, - male: 50598, - female: 56864, - intersex: 2, - popDensity: { landArea: 128, density: 837 }, - }, - "Masaba south": { - total: 122396, - male: 58143, - female: 64248, - intersex: 5, - popDensity: { landArea: 161, density: 759 }, - }, - Nyamache: { - total: 130898, - male: 62113, - female: 68782, - intersex: 3, - popDensity: { landArea: 163, density: 805 }, - }, - Sameta: { - total: 66997, - male: 31829, - female: 35164, - intersex: 4, - popDensity: { landArea: 79, density: 847 }, - }, - }, - Nyamira: { - Borabu: { - total: 73167, - male: 36736, - female: 36431, - intersex: 0, - popDensity: { landArea: 247, density: 296 }, - }, - Manga: { - total: 94209, - male: 44868, - female: 49339, - intersex: 2, - popDensity: { landArea: 111, density: 845 }, - }, - "Masaba north": { - total: 111860, - male: 52884, - female: 58974, - intersex: 2, - popDensity: { landArea: 142, density: 789 }, - }, - "Nyamira north": { - total: 167267, - male: 80314, - female: 86947, - intersex: 6, - popDensity: { landArea: 216, density: 775 }, - }, - "Nyamira south": { - total: 159073, - male: 76105, - female: 82965, - intersex: 3, - popDensity: { landArea: 182, density: 876 }, - }, - }, - Nairobi: { - Dagoretti: { - total: 434208, - male: 217651, - female: 216526, - intersex: 31, - popDensity: { landArea: 29, density: 14908 }, - }, - Embakasi: { - total: 988808, - male: 492476, - female: 496270, - intersex: 62, - popDensity: { landArea: 86, density: 11460 }, - }, - Kamukunji: { - total: 268276, - male: 136670, - female: 131599, - intersex: 7, - popDensity: { landArea: 11, density: 25455 }, - }, - Kasarani: { - total: 780656, - male: 381234, - female: 399385, - intersex: 37, - popDensity: { landArea: 86, density: 9063 }, - }, - Kibra: { - total: 185777, - male: 94199, - female: 91569, - intersex: 9, - popDensity: { landArea: 12, density: 15311 }, - }, - "Lang'ata": { - total: 197489, - male: 96698, - female: 100774, - intersex: 17, - popDensity: { landArea: 217, density: 911 }, - }, - Makadara: { - total: 189536, - male: 96369, - female: 93157, - intersex: 10, - popDensity: { landArea: 12, density: 16150 }, - }, - Mathare: { - total: 206564, - male: 106522, - female: 100028, - intersex: 14, - popDensity: { landArea: 3, density: 68940 }, - }, - Njiru: { - total: 626482, - male: 307642, - female: 318809, - intersex: 31, - popDensity: { landArea: 130, density: 4821 }, - }, - Starehe: { - total: 210423, - male: 109173, - female: 101238, - intersex: 12, - popDensity: { landArea: 21, density: 10205 }, - }, - Westlands: { - total: 308854, - male: 153818, - female: 155021, - intersex: 1, - popDensity: { landArea: 98, density: 3167 }, - }, - }, -}; diff --git a/public/index.d.ts b/public/index.d.ts deleted file mode 100644 index 336ce12..0000000 --- a/public/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {} diff --git a/public/index.js b/public/index.js deleted file mode 100644 index a715b52..0000000 --- a/public/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const app_1 = __importDefault(require("./app")); -const port = process.env.PORT || 3000; -app_1.default.listen(port, () => console.log("server is running")); diff --git a/public/routers/counties.d.ts b/public/routers/counties.d.ts deleted file mode 100644 index 3867f99..0000000 --- a/public/routers/counties.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const router: import("express-serve-static-core").Router -export default router diff --git a/public/routers/counties.js b/public/routers/counties.js deleted file mode 100644 index 0a8d480..0000000 --- a/public/routers/counties.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const data_1 = require("../data"); -const router = express_1.default.Router(); -router.get("/", (req, res) => { - res.status(200).json(data_1.counties); -}); -/** - * This function takes in either the counties object or - * the subcounties object and returns a single county or subcounty from - * the object passed in - * - * @param name string - * @param object Counties or SubCounties object - * @returns County or Subcounty - */ -const getData = (name, object) => { - const county = name[0].toUpperCase() + name.slice(1, name.length).toLowerCase(); - if (county.split("-").length > 1) { - const split = county.split("-"); - const searchString = `${split[0]} ${split[1]}`; - return object[searchString]; - } - else { - return object[county]; - } -}; -router.get("/:county", (req, res) => { - const response = getData(req.params.county, data_1.counties) || { - error: "County not found", - }; - res.status(200).json(response); -}); -router.get("/:county/subcounties", (req, res) => { - const data = getData(req.params.county, data_1.subCounties); - const response = data || { error: "County not found" }; - res.status(200).json(response); -}); -router.get("/:county/subcounties/:subcounty", (req, res) => { - const data = getData(req.params.county, data_1.subCounties); - const result = getData(req.params.subcounty, data); - const response = result || { error: "Sub County not found" }; - res.status(200).json(response); -}); -exports.default = router; diff --git a/public/routers/country.d.ts b/public/routers/country.d.ts deleted file mode 100644 index 3867f99..0000000 --- a/public/routers/country.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const router: import("express-serve-static-core").Router -export default router diff --git a/public/routers/country.js b/public/routers/country.js deleted file mode 100644 index 8efc950..0000000 --- a/public/routers/country.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const data_1 = require("../data"); -const router = express_1.default.Router(); -router.get("/", (req, res) => { - res.send(data_1.country); -}); -exports.default = router; diff --git a/public/test/counties.test.d.ts b/public/test/counties.test.d.ts deleted file mode 100644 index 336ce12..0000000 --- a/public/test/counties.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {} diff --git a/public/test/counties.test.js b/public/test/counties.test.js deleted file mode 100644 index 233ed96..0000000 --- a/public/test/counties.test.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertest_1 = __importDefault(require("supertest")); -const app_1 = __importDefault(require("../app")); -test("Should fetch specific county data", async () => { - // lowercase - const res = await supertest_1.default(app_1.default).get("/api/v1/counties/nairobi").expect(200); - expect(res.body).toMatchObject({ - male: 2192452, - female: 2204376, - intersex: 245, - households: 1506888, - averageHouseholds: 2.9, - popDensity: { - landArea: 703.9, - density: 6247, - }, - }); - //uppercase - const res2 = await supertest_1.default(app_1.default).get("/api/v1/counties/NAIROBI").expect(200); - expect(res2.body).toMatchObject({ - male: 2192452, - female: 2204376, - intersex: 245, - total: 4397073, - households: 1506888, - averageHouseholds: 2.9, - popDensity: { - landArea: 703.9, - density: 6247, - }, - }); - //mixedcase - const res3 = await supertest_1.default(app_1.default).get("/api/v1/counties/Nairobi").expect(200); - expect(res3.body).toMatchObject({ - male: 2192452, - female: 2204376, - intersex: 245, - total: 4397073, - households: 1506888, - averageHouseholds: 2.9, - popDensity: { - landArea: 703.9, - density: 6247, - }, - }); -}); diff --git a/public/test/country.test.d.ts b/public/test/country.test.d.ts deleted file mode 100644 index 336ce12..0000000 --- a/public/test/country.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {} diff --git a/public/test/country.test.js b/public/test/country.test.js deleted file mode 100644 index 8220bc4..0000000 --- a/public/test/country.test.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertest_1 = __importDefault(require("supertest")); -const app_1 = __importDefault(require("../app")); -test("Should fetch the country data", async () => { - const res = await supertest_1.default(app_1.default).get("/api/v1/country").expect(200); - expect(res.body).toMatchObject({ - total: 47564296, - male: 23548056, - female: 24014716, - intersex: 1524, - households: 12143913, - averageHouseholds: 3.9, - popDensity: { - landArea: 9123, - density: 68, - }, - populationIn2009: 512690, - popChange: 108551, - }); -}); diff --git a/public/test/subcounties.test.d.ts b/public/test/subcounties.test.d.ts deleted file mode 100644 index 336ce12..0000000 --- a/public/test/subcounties.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {} diff --git a/public/test/subcounties.test.js b/public/test/subcounties.test.js deleted file mode 100644 index 7d8e06c..0000000 --- a/public/test/subcounties.test.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertest_1 = __importDefault(require("supertest")); -const app_1 = __importDefault(require("../app")); -describe("Subcounties", () => { - it("Should get all the subcounties in a county", async () => { - const kiambuSubCounties = { - "Gatundu north": { - total: 109870, - male: 54189, - female: 55678, - intersex: 3, - popDensity: { landArea: 286, density: 384 }, - }, - "Gatundu south": { - total: 122103, - male: 60384, - female: 61714, - intersex: 5, - popDensity: { landArea: 194, density: 631 }, - }, - Githunguri: { - total: 165232, - male: 82037, - female: 83187, - intersex: 8, - popDensity: { landArea: 174, density: 948 }, - }, - Juja: { - total: 300948, - male: 148446, - female: 152480, - intersex: 22, - popDensity: { landArea: 342, density: 880 }, - }, - Kabete: { - total: 199653, - male: 97794, - female: 101845, - intersex: 14, - popDensity: { landArea: 61, density: 3289 }, - }, - Kiambaa: { - total: 236400, - male: 115690, - female: 120695, - intersex: 15, - popDensity: { landArea: 91, density: 2595 }, - }, - Kiambu: { - total: 145903, - male: 69661, - female: 76225, - intersex: 17, - popDensity: { landArea: 98, density: 1483 }, - }, - Kikuyu: { - total: 187122, - male: 90919, - female: 96198, - intersex: 5, - popDensity: { landArea: 173, density: 1082 }, - }, - Lari: { - total: 135303, - male: 67061, - female: 68238, - intersex: 4, - popDensity: { landArea: 432, density: 313 }, - }, - Limuru: { - total: 159314, - male: 79632, - female: 79682, - intersex: 0, - popDensity: { landArea: 285, density: 559 }, - }, - Ruiru: { - total: 371111, - male: 180947, - female: 190144, - intersex: 20, - popDensity: { landArea: 201, density: 1846 }, - }, - "Thika east": { - total: 38956, - male: 19688, - female: 19264, - intersex: 4, - popDensity: { landArea: 110, density: 354 }, - }, - "Thika west": { - total: 245820, - male: 120698, - female: 125104, - intersex: 18, - popDensity: { landArea: 91, density: 2689 }, - }, - }; - const res = await supertest_1.default(app_1.default) - .get("/api/v1/counties/kiambu/subcounties") - .expect(200); - expect(res.body).toMatchObject(kiambuSubCounties); - }); - it("Should get the specific subcounty in a county", async () => { - const thikaWest = { - total: 245820, - male: 120698, - female: 125104, - intersex: 18, - popDensity: { landArea: 91, density: 2689 }, - }; - const res = await supertest_1.default(app_1.default) - .get("/api/v1/counties/kiambu/subcounties/thika-west") - .expect(200); - expect(res.body).toMatchObject(thikaWest); - }); -}); diff --git a/tsconfig.json b/tsconfig.json index b073957..f56b8c9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": [ "ES2019" @@ -12,16 +12,16 @@ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declaration": true /* Generates corresponding '.d.ts' file. */, // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outFile": "index.js" /* Concatenate and emit output to single file. */, "outDir": "./public" /* Redirect output structure to the directory. */, // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ + // "noEmit": true, "emitDeclarationOnly": true/* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */