diff --git a/Poverty/README.md b/Poverty/README.md new file mode 100644 index 0000000..047948c --- /dev/null +++ b/Poverty/README.md @@ -0,0 +1,4 @@ +SmallAreaPovertyMapping +=== + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in blog posts. This project extends his ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html) blog post, by maping maps of the data Chandan bar-charts for us. CSV data was digitized from a [pdf produced by the Central Bureau of Statistics](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections by author. diff --git a/Poverty/SmallAreaPovertyEstimation.csv b/Poverty/SmallAreaPovertyEstimation.csv new file mode 100644 index 0000000..fd75e7e --- /dev/null +++ b/Poverty/SmallAreaPovertyEstimation.csv @@ -0,0 +1 @@ +District,Population,FGT(0),S.E.FGT(0),FGT(1),S.E.FGT(1),FGT(2),S.E.FGT(2) Achham,256102,0.472,0.102,0.127,0.04,0.047,0.018 Arghakhanchi,196873,0.288,0.05,0.069,0.016,0.024,0.007 Baglung,266622,0.229,0.04,0.053,0.012,0.018,0.005 Baitadi,250065,0.457,0.101,0.123,0.039,0.046,0.018 Bajhang,194515,0.568,0.112,0.162,0.05,0.063,0.024 Bajura,134062,0.641,0.105,0.199,0.055,0.082,0.029 Banke,484592,0.264,0.073,0.066,0.025,0.024,0.011 Bara,680094,0.299,0.019,0.072,0.007,0.025,0.003 Bardiya,422812,0.287,0.082,0.071,0.026,0.025,0.011 Bhaktapur,296705,0.125,0.014,0.029,0.004,0.01,0.002 Bhojpur,181203,0.244,0.028,0.048,0.007,0.014,0.003 Chitawan,567992,0.089,0.011,0.017,0.003,0.005,0.001 Dadeldhura,140779,0.433,0.101,0.118,0.039,0.045,0.018 Dailekh,260826,0.358,0.1,0.088,0.034,0.031,0.014 Dang,547926,0.251,0.08,0.059,0.026,0.02,0.011 Darchula,132081,0.53,0.109,0.152,0.048,0.059,0.024 Dhading,333978,0.188,0.018,0.038,0.005,0.012,0.002 Dhankuta,161288,0.159,0.019,0.029,0.005,0.008,0.002 Dhanusa,752253,0.231,0.018,0.046,0.005,0.014,0.002 Dolakha,184931,0.26,0.03,0.057,0.009,0.018,0.004 Dolpa,36110,0.428,0.106,0.11,0.039,0.04,0.017 Doti,206671,0.489,0.101,0.135,0.042,0.052,0.02 Gorkha,268862,0.204,0.039,0.049,0.011,0.018,0.005 Gulmi,279005,0.256,0.048,0.059,0.015,0.02,0.006 Humla,49914,0.56,0.103,0.166,0.048,0.067,0.024 Ilam,287734,0.073,0.011,0.012,0.002,0.003,0.001 Jajarkot,170090,0.377,0.104,0.09,0.035,0.031,0.014 Jhapa,807308,0.106,0.011,0.019,0.003,0.005,0.001 Jumla,107395,0.49,0.113,0.131,0.045,0.049,0.021 Kailali,765487,0.336,0.091,0.084,0.031,0.03,0.013 Kalikot,135939,0.579,0.101,0.168,0.047,0.066,0.023 Kanchanpur,447645,0.314,0.08,0.08,0.028,0.029,0.012 Kapilbastu,568692,0.355,0.052,0.089,0.018,0.032,0.008 Kaski,480851,0.04,0.011,0.008,0.003,0.003,0.001 Kathmandu,1688131,0.076,0.006,0.015,0.002,0.005,0.001 Kavrepalanchok,375040,0.139,0.019,0.025,0.005,0.007,0.002 Khotang,205176,0.25,0.027,0.05,0.007,0.015,0.003 Lalitpur,453466,0.076,0.008,0.015,0.002,0.005,0.001 Lamjung,166141,0.168,0.033,0.039,0.009,0.013,0.004 Mahottari,621023,0.162,0.029,0.035,0.009,0.011,0.004 Makwanpur,414476,0.279,0.02,0.073,0.008,0.027,0.004 Manang,5827,0.369,0.056,0.099,0.02,0.038,0.009 Morang,958579,0.165,0.011,0.033,0.003,0.01,0.001 Mugu,54789,0.471,0.115,0.125,0.045,0.047,0.021 Mustang,11585,0.4,0.055,0.109,0.02,0.042,0.009 Myagdi,109598,0.286,0.044,0.073,0.015,0.027,0.007 Nawalparasi,638836,0.17,0.031,0.038,0.009,0.013,0.003 Nuwakot,275344,0.203,0.019,0.042,0.005,0.013,0.002 Okhaldhunga,146782,0.205,0.023,0.041,0.006,0.012,0.002 Palpa,258842,0.216,0.038,0.052,0.012,0.018,0.005 Panchthar,190394,0.114,0.02,0.019,0.004,0.005,0.001 Parbat,145657,0.127,0.029,0.025,0.007,0.008,0.002 Parsa,592108,0.292,0.02,0.071,0.007,0.025,0.003 Pyuthan,226128,0.322,0.087,0.079,0.029,0.028,0.012 Ramechhap,201202,0.256,0.023,0.056,0.007,0.018,0.003 Rasuwa,42125,0.316,0.043,0.072,0.015,0.024,0.006 Rautahat,680659,0.334,0.018,0.083,0.006,0.029,0.003 Rolpa,221170,0.26,0.087,0.056,0.025,0.018,0.009 Rukum,207279,0.263,0.092,0.058,0.026,0.019,0.01 Rupandehi,873314,0.173,0.029,0.041,0.009,0.014,0.004 Salyan,241685,0.288,0.088,0.063,0.026,0.021,0.01 Sankhuwasabha,158139,0.21,0.031,0.041,0.008,0.012,0.003 Saptari,637071,0.395,0.019,0.1,0.008,0.036,0.004 Sarlahi,765959,0.177,0.018,0.036,0.005,0.011,0.002 Sindhuli,292988,0.383,0.031,0.099,0.012,0.036,0.006 Sindhupalchok,285652,0.254,0.031,0.054,0.009,0.017,0.004 Siraha,634844,0.346,0.019,0.08,0.007,0.027,0.003 Solukhumbu,105080,0.257,0.03,0.057,0.009,0.019,0.004 Sunsari,750319,0.12,0.014,0.022,0.004,0.006,0.001 Surkhet,343160,0.305,0.085,0.075,0.029,0.026,0.012 Syangja,288097,0.118,0.027,0.024,0.007,0.007,0.002 Tanahu,320532,0.148,0.028,0.033,0.008,0.011,0.003 Taplejung,126404,0.27,0.034,0.055,0.01,0.017,0.004 Terhathum,100805,0.146,0.02,0.025,0.005,0.007,0.002 Udayapur,315251,0.259,0.022,0.058,0.007,0.019,0.003 \ No newline at end of file diff --git a/Poverty/cache/__packages b/Poverty/cache/__packages new file mode 100644 index 0000000..787f5eb --- /dev/null +++ b/Poverty/cache/__packages @@ -0,0 +1,23 @@ +knitr +reshape2 +scales +ggplot2 +maptools +lattice +grid +foreign +rgeos +sp +lubridate +RCurl +bitops +plyr +stringr +RJSONIO +stats +graphics +grDevices +utils +datasets +methods +base diff --git a/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData new file mode 100644 index 0000000..29dc638 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData differ diff --git a/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb new file mode 100644 index 0000000..75f36fd Binary files /dev/null and b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb differ diff --git a/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx new file mode 100644 index 0000000..48e6e67 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx differ diff --git a/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData b/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData new file mode 100644 index 0000000..a4dc10e Binary files /dev/null and b/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData differ diff --git a/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdb b/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdb new file mode 100644 index 0000000..e69de29 diff --git a/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx b/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx differ diff --git a/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData b/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData new file mode 100644 index 0000000..92f4c97 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData differ diff --git a/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdb b/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdb new file mode 100644 index 0000000..e69de29 diff --git a/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx b/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx differ diff --git a/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData new file mode 100644 index 0000000..01db546 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData differ diff --git a/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb new file mode 100644 index 0000000..1de3ba5 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb differ diff --git a/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx new file mode 100644 index 0000000..6fc23ef Binary files /dev/null and b/Poverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx differ diff --git a/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData new file mode 100644 index 0000000..e87bc9b Binary files /dev/null and b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData differ diff --git a/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb new file mode 100644 index 0000000..0d5e156 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb differ diff --git a/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx new file mode 100644 index 0000000..82ef8f2 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx differ diff --git a/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData b/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData new file mode 100644 index 0000000..9322c20 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData differ diff --git a/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdb b/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdb new file mode 100644 index 0000000..e69de29 diff --git a/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx b/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/Poverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx differ diff --git a/Poverty/figure/unnamed-chunk-11.png b/Poverty/figure/unnamed-chunk-11.png new file mode 100644 index 0000000..6e9422d Binary files /dev/null and b/Poverty/figure/unnamed-chunk-11.png differ diff --git a/Poverty/figure/unnamed-chunk-12.png b/Poverty/figure/unnamed-chunk-12.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-12.png differ diff --git a/Poverty/figure/unnamed-chunk-13.png b/Poverty/figure/unnamed-chunk-13.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-13.png differ diff --git a/Poverty/figure/unnamed-chunk-14.png b/Poverty/figure/unnamed-chunk-14.png new file mode 100644 index 0000000..fbb5d6c Binary files /dev/null and b/Poverty/figure/unnamed-chunk-14.png differ diff --git a/Poverty/figure/unnamed-chunk-2.png b/Poverty/figure/unnamed-chunk-2.png new file mode 100644 index 0000000..077a2e1 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-2.png differ diff --git a/Poverty/figure/unnamed-chunk-21.png b/Poverty/figure/unnamed-chunk-21.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-21.png differ diff --git a/Poverty/figure/unnamed-chunk-22.png b/Poverty/figure/unnamed-chunk-22.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-22.png differ diff --git a/Poverty/figure/unnamed-chunk-3.png b/Poverty/figure/unnamed-chunk-3.png new file mode 100644 index 0000000..b0bc05d Binary files /dev/null and b/Poverty/figure/unnamed-chunk-3.png differ diff --git a/Poverty/figure/unnamed-chunk-31.png b/Poverty/figure/unnamed-chunk-31.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-31.png differ diff --git a/Poverty/figure/unnamed-chunk-32.png b/Poverty/figure/unnamed-chunk-32.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/Poverty/figure/unnamed-chunk-32.png differ diff --git a/Poverty/figure/unnamed-chunk-4.png b/Poverty/figure/unnamed-chunk-4.png new file mode 100644 index 0000000..41bcc0e Binary files /dev/null and b/Poverty/figure/unnamed-chunk-4.png differ diff --git a/Poverty/figure/unnamed-chunk-5.png b/Poverty/figure/unnamed-chunk-5.png new file mode 100644 index 0000000..e079e1d Binary files /dev/null and b/Poverty/figure/unnamed-chunk-5.png differ diff --git a/Poverty/figure/unnamed-chunk-6.png b/Poverty/figure/unnamed-chunk-6.png new file mode 100644 index 0000000..af89bad Binary files /dev/null and b/Poverty/figure/unnamed-chunk-6.png differ diff --git a/Poverty/index.html b/Poverty/index.html new file mode 100644 index 0000000..5a389d0 --- /dev/null +++ b/Poverty/index.html @@ -0,0 +1,252 @@ + + + + + + +Poverty by District in Nepal, mapped + + + + + + + + + + + + + + + + +

Poverty by District in Nepal, mapped

+ +

Chandan Sapkota, who one of my friend Bigyan calls the “Ezra Klein of Nepal”, produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about “Poverty by District in Nepal”, I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from link in article to the CBS source (thanks Chandan for linking to the data source!), with two district spelling corrections done by author.

+ +

So lets load the data and the “NepalMapUtils” R file to get started.

+ +

0. Data preparation

+ +

Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the “SmallAreaPoverty” folder within NepalMaps.

+ +
poverty <- read.csv("SmallAreaPovertyEstimation.csv")
+source("../NepalMapUtils.R")
+
+ +

We will do one tranformation before proceeding, which is to rename our columns. In the dataset, “FGT(0)” (which loads in R as FGT.0. because R doesn't like parentheses) is the poverty incidence metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the poverty gap, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is poverty severity, the squared distance for those below hte line, which gives more weight to the very poor. [source]

+ +

So lets go ahead and rename our columns to these understandable names:

+ +
names(poverty)
+
+ +
## [1] "District"   "Population" "FGT.0."     "S.E.FGT.0." "FGT.1."    
+## [6] "S.E.FGT.1." "FGT.2."     "S.E.FGT.2."
+
+ +
names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", 
+    "PovertyGap", "S.E-P.G.", "PovertySeverity", "S.E-P.S.")
+
+ +

1. Poverty Incidence (2011)

+ +

Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches).

+ +
npchoropleth(poverty, "District", "PovertyIncidence")
+
+ +

plot of chunk unnamed-chunk-3

+ +

A second map, coloring those that are above the mean (weighted by population) as blue and those below as red:

+ +
meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population)
+npchoropleth(poverty, "District", "PovertyIncidence") + scale_fill_gradient2(low = muted("blue"), 
+    midpoint = meanpoverty, mid = "white", high = muted("red"))
+
+ +

plot of chunk unnamed-chunk-4

+ +

In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj).

+ +

2. Absolute poor (2011)

+ +

The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look:

+ +
poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence
+npchoropleth(poverty, "District", "AbsolutePoor")
+
+ +

plot of chunk unnamed-chunk-5

+ +

The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there.

+ +

For reference, a population sketch to remind us where people live in Nepal:

+ +
npchoropleth(poverty, "District", "Population")
+
+ +

plot of chunk unnamed-chunk-6

+ + + + diff --git a/Poverty/index.md b/Poverty/index.md new file mode 100644 index 0000000..bc07bb4 --- /dev/null +++ b/Poverty/index.md @@ -0,0 +1,82 @@ +Poverty by District in Nepal, mapped +--- + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html), I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from [link in article to the CBS source](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections done by author. + +So lets load the data and the "NepalMapUtils" R file to get started. + +## 0. Data preparation + +Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the "SmallAreaPoverty" folder within [NepalMaps](http://github.com/prabhasp/NepalMaps). + +```r +poverty <- read.csv("SmallAreaPovertyEstimation.csv") +source("../NepalMapUtils.R") +``` + + +We will do one tranformation before proceeding, which is to rename our columns. In the dataset, "FGT(0)" (which loads in R as `FGT.0.` because R doesn't like parentheses) is the _poverty incidence_ metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the _poverty gap_, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is _poverty severity_, the squared distance for those below hte line, which gives more weight to the very poor. [source] + +So lets go ahead and rename our columns to these understandable names: + + +```r +names(poverty) +``` + +``` +## [1] "District" "Population" "FGT.0." "S.E.FGT.0." "FGT.1." +## [6] "S.E.FGT.1." "FGT.2." "S.E.FGT.2." +``` + +```r +names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", + "PovertyGap", "S.E-P.G.", "PovertySeverity", "S.E-P.S.") +``` + + +## 1. Poverty Incidence (2011) + + Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches). + +```r +npchoropleth(poverty, "District", "PovertyIncidence") +``` + +![plot of chunk unnamed-chunk-3](figure/unnamed-chunk-3.png) + + +A second map, coloring those that are above the mean (weighted by population) as blue and those below as red: + +```r +meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population) +npchoropleth(poverty, "District", "PovertyIncidence") + scale_fill_gradient2(low = muted("blue"), + midpoint = meanpoverty, mid = "white", high = muted("red")) +``` + +![plot of chunk unnamed-chunk-4](figure/unnamed-chunk-4.png) + + +In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj). + +## 2. Absolute poor (2011) + +The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look: + +```r +poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence +npchoropleth(poverty, "District", "AbsolutePoor") +``` + +![plot of chunk unnamed-chunk-5](figure/unnamed-chunk-5.png) + +The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there. + +For reference, a population sketch to remind us where people live in Nepal: + +```r +npchoropleth(poverty, "District", "Population") +``` + +![plot of chunk unnamed-chunk-6](figure/unnamed-chunk-6.png) + diff --git a/Poverty/index.rmd b/Poverty/index.rmd new file mode 100644 index 0000000..8970864 --- /dev/null +++ b/Poverty/index.rmd @@ -0,0 +1,53 @@ +Poverty by District in Nepal, mapped +--- + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html), I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from [link in article to the CBS source](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections done by author. + +So lets load the data and the "NepalMapUtils" R file to get started. + +## 0. Data preparation + +Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the "SmallAreaPoverty" folder within [NepalMaps](http://github.com/prabhasp/NepalMaps). +```{r echo=T, comment=NA, fig.height=6, fig.width=10, cache=TRUE} +poverty <- read.csv("SmallAreaPovertyEstimation.csv") +source("../NepalMapUtils.R") +``` + +We will do one tranformation before proceeding, which is to rename our columns. In the dataset, "FGT(0)" (which loads in R as `FGT.0.` because R doesn't like parentheses) is the _poverty incidence_ metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the _poverty gap_, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is _poverty severity_, the squared distance for those below hte line, which gives more weight to the very poor. [source] + +So lets go ahead and rename our columns to these understandable names: + +```{r} +names(poverty) +names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", "PovertyGap", + "S.E-P.G." , "PovertySeverity", "S.E-P.S.") +``` + +## 1. Poverty Incidence (2011) + + Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches). +```{r echo=T, comment=NA, fig.height=7., fig.width=12, cache=TRUE} +npchoropleth(poverty, 'District', 'PovertyIncidence') +``` + +A second map, coloring those that are above the mean (weighted by population) as blue and those below as red: +```{r echo=T, comment=NA, fig.height=7., fig.width=12, cache=TRUE, message=F} +meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population) +npchoropleth(poverty, 'District', 'PovertyIncidence') + scale_fill_gradient2(low=muted('blue'), midpoint=meanpoverty, mid='white', high=muted('red')) +``` + +In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj). + +## 2. Absolute poor (2011) + +The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look: +```{r echo=T, comment=NA, fig.height=7.2, fig.width=12, cache=TRUE} +poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence +npchoropleth(poverty, 'District', 'AbsolutePoor') +``` +The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there. + +For reference, a population sketch to remind us where people live in Nepal: +```{r echo=T, comment=NA, fig.height=7.2, fig.width=12, cache=TRUE} +npchoropleth(poverty, 'District', 'Population') +``` \ No newline at end of file diff --git a/SmallAreaPoverty/README.md b/SmallAreaPoverty/README.md new file mode 100644 index 0000000..047948c --- /dev/null +++ b/SmallAreaPoverty/README.md @@ -0,0 +1,4 @@ +SmallAreaPovertyMapping +=== + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in blog posts. This project extends his ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html) blog post, by maping maps of the data Chandan bar-charts for us. CSV data was digitized from a [pdf produced by the Central Bureau of Statistics](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections by author. diff --git a/SmallAreaPoverty/SmallAreaPovertyEstimation.csv b/SmallAreaPoverty/SmallAreaPovertyEstimation.csv new file mode 100644 index 0000000..fd75e7e --- /dev/null +++ b/SmallAreaPoverty/SmallAreaPovertyEstimation.csv @@ -0,0 +1 @@ +District,Population,FGT(0),S.E.FGT(0),FGT(1),S.E.FGT(1),FGT(2),S.E.FGT(2) Achham,256102,0.472,0.102,0.127,0.04,0.047,0.018 Arghakhanchi,196873,0.288,0.05,0.069,0.016,0.024,0.007 Baglung,266622,0.229,0.04,0.053,0.012,0.018,0.005 Baitadi,250065,0.457,0.101,0.123,0.039,0.046,0.018 Bajhang,194515,0.568,0.112,0.162,0.05,0.063,0.024 Bajura,134062,0.641,0.105,0.199,0.055,0.082,0.029 Banke,484592,0.264,0.073,0.066,0.025,0.024,0.011 Bara,680094,0.299,0.019,0.072,0.007,0.025,0.003 Bardiya,422812,0.287,0.082,0.071,0.026,0.025,0.011 Bhaktapur,296705,0.125,0.014,0.029,0.004,0.01,0.002 Bhojpur,181203,0.244,0.028,0.048,0.007,0.014,0.003 Chitawan,567992,0.089,0.011,0.017,0.003,0.005,0.001 Dadeldhura,140779,0.433,0.101,0.118,0.039,0.045,0.018 Dailekh,260826,0.358,0.1,0.088,0.034,0.031,0.014 Dang,547926,0.251,0.08,0.059,0.026,0.02,0.011 Darchula,132081,0.53,0.109,0.152,0.048,0.059,0.024 Dhading,333978,0.188,0.018,0.038,0.005,0.012,0.002 Dhankuta,161288,0.159,0.019,0.029,0.005,0.008,0.002 Dhanusa,752253,0.231,0.018,0.046,0.005,0.014,0.002 Dolakha,184931,0.26,0.03,0.057,0.009,0.018,0.004 Dolpa,36110,0.428,0.106,0.11,0.039,0.04,0.017 Doti,206671,0.489,0.101,0.135,0.042,0.052,0.02 Gorkha,268862,0.204,0.039,0.049,0.011,0.018,0.005 Gulmi,279005,0.256,0.048,0.059,0.015,0.02,0.006 Humla,49914,0.56,0.103,0.166,0.048,0.067,0.024 Ilam,287734,0.073,0.011,0.012,0.002,0.003,0.001 Jajarkot,170090,0.377,0.104,0.09,0.035,0.031,0.014 Jhapa,807308,0.106,0.011,0.019,0.003,0.005,0.001 Jumla,107395,0.49,0.113,0.131,0.045,0.049,0.021 Kailali,765487,0.336,0.091,0.084,0.031,0.03,0.013 Kalikot,135939,0.579,0.101,0.168,0.047,0.066,0.023 Kanchanpur,447645,0.314,0.08,0.08,0.028,0.029,0.012 Kapilbastu,568692,0.355,0.052,0.089,0.018,0.032,0.008 Kaski,480851,0.04,0.011,0.008,0.003,0.003,0.001 Kathmandu,1688131,0.076,0.006,0.015,0.002,0.005,0.001 Kavrepalanchok,375040,0.139,0.019,0.025,0.005,0.007,0.002 Khotang,205176,0.25,0.027,0.05,0.007,0.015,0.003 Lalitpur,453466,0.076,0.008,0.015,0.002,0.005,0.001 Lamjung,166141,0.168,0.033,0.039,0.009,0.013,0.004 Mahottari,621023,0.162,0.029,0.035,0.009,0.011,0.004 Makwanpur,414476,0.279,0.02,0.073,0.008,0.027,0.004 Manang,5827,0.369,0.056,0.099,0.02,0.038,0.009 Morang,958579,0.165,0.011,0.033,0.003,0.01,0.001 Mugu,54789,0.471,0.115,0.125,0.045,0.047,0.021 Mustang,11585,0.4,0.055,0.109,0.02,0.042,0.009 Myagdi,109598,0.286,0.044,0.073,0.015,0.027,0.007 Nawalparasi,638836,0.17,0.031,0.038,0.009,0.013,0.003 Nuwakot,275344,0.203,0.019,0.042,0.005,0.013,0.002 Okhaldhunga,146782,0.205,0.023,0.041,0.006,0.012,0.002 Palpa,258842,0.216,0.038,0.052,0.012,0.018,0.005 Panchthar,190394,0.114,0.02,0.019,0.004,0.005,0.001 Parbat,145657,0.127,0.029,0.025,0.007,0.008,0.002 Parsa,592108,0.292,0.02,0.071,0.007,0.025,0.003 Pyuthan,226128,0.322,0.087,0.079,0.029,0.028,0.012 Ramechhap,201202,0.256,0.023,0.056,0.007,0.018,0.003 Rasuwa,42125,0.316,0.043,0.072,0.015,0.024,0.006 Rautahat,680659,0.334,0.018,0.083,0.006,0.029,0.003 Rolpa,221170,0.26,0.087,0.056,0.025,0.018,0.009 Rukum,207279,0.263,0.092,0.058,0.026,0.019,0.01 Rupandehi,873314,0.173,0.029,0.041,0.009,0.014,0.004 Salyan,241685,0.288,0.088,0.063,0.026,0.021,0.01 Sankhuwasabha,158139,0.21,0.031,0.041,0.008,0.012,0.003 Saptari,637071,0.395,0.019,0.1,0.008,0.036,0.004 Sarlahi,765959,0.177,0.018,0.036,0.005,0.011,0.002 Sindhuli,292988,0.383,0.031,0.099,0.012,0.036,0.006 Sindhupalchok,285652,0.254,0.031,0.054,0.009,0.017,0.004 Siraha,634844,0.346,0.019,0.08,0.007,0.027,0.003 Solukhumbu,105080,0.257,0.03,0.057,0.009,0.019,0.004 Sunsari,750319,0.12,0.014,0.022,0.004,0.006,0.001 Surkhet,343160,0.305,0.085,0.075,0.029,0.026,0.012 Syangja,288097,0.118,0.027,0.024,0.007,0.007,0.002 Tanahu,320532,0.148,0.028,0.033,0.008,0.011,0.003 Taplejung,126404,0.27,0.034,0.055,0.01,0.017,0.004 Terhathum,100805,0.146,0.02,0.025,0.005,0.007,0.002 Udayapur,315251,0.259,0.022,0.058,0.007,0.019,0.003 \ No newline at end of file diff --git a/SmallAreaPoverty/cache/__packages b/SmallAreaPoverty/cache/__packages new file mode 100644 index 0000000..787f5eb --- /dev/null +++ b/SmallAreaPoverty/cache/__packages @@ -0,0 +1,23 @@ +knitr +reshape2 +scales +ggplot2 +maptools +lattice +grid +foreign +rgeos +sp +lubridate +RCurl +bitops +plyr +stringr +RJSONIO +stats +graphics +grDevices +utils +datasets +methods +base diff --git a/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData new file mode 100644 index 0000000..29dc638 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb new file mode 100644 index 0000000..75f36fd Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdb differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx new file mode 100644 index 0000000..48e6e67 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-1_9c56e492c5999ab0a24c891c803fb79c.rdx differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData b/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData new file mode 100644 index 0000000..a4dc10e Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdb b/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdb new file mode 100644 index 0000000..e69de29 diff --git a/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx b/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-2_0436749b53ec305b78b6cbb9e09a0928.rdx differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData b/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData new file mode 100644 index 0000000..92f4c97 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdb b/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdb new file mode 100644 index 0000000..e69de29 diff --git a/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx b/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-3_96b0deea954d7c0065f4c4194368a472.rdx differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData new file mode 100644 index 0000000..01db546 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb new file mode 100644 index 0000000..1de3ba5 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdb differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx new file mode 100644 index 0000000..6fc23ef Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-4_9ac3502335e592636d6d89c936b74f28.rdx differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData new file mode 100644 index 0000000..e87bc9b Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb new file mode 100644 index 0000000..0d5e156 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdb differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx new file mode 100644 index 0000000..82ef8f2 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-5_092c44c9820aa337e4c1283ab9116235.rdx differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData b/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData new file mode 100644 index 0000000..9322c20 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.RData differ diff --git a/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdb b/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdb new file mode 100644 index 0000000..e69de29 diff --git a/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx b/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx new file mode 100644 index 0000000..20ca487 Binary files /dev/null and b/SmallAreaPoverty/cache/unnamed-chunk-6_3f9c79f100502aca839bb6a5bd80d741.rdx differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-11.png b/SmallAreaPoverty/figure/unnamed-chunk-11.png new file mode 100644 index 0000000..6e9422d Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-11.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-12.png b/SmallAreaPoverty/figure/unnamed-chunk-12.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-12.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-13.png b/SmallAreaPoverty/figure/unnamed-chunk-13.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-13.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-14.png b/SmallAreaPoverty/figure/unnamed-chunk-14.png new file mode 100644 index 0000000..fbb5d6c Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-14.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-2.png b/SmallAreaPoverty/figure/unnamed-chunk-2.png new file mode 100644 index 0000000..077a2e1 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-2.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-21.png b/SmallAreaPoverty/figure/unnamed-chunk-21.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-21.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-22.png b/SmallAreaPoverty/figure/unnamed-chunk-22.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-22.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-3.png b/SmallAreaPoverty/figure/unnamed-chunk-3.png new file mode 100644 index 0000000..b0bc05d Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-3.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-31.png b/SmallAreaPoverty/figure/unnamed-chunk-31.png new file mode 100644 index 0000000..24bcc10 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-31.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-32.png b/SmallAreaPoverty/figure/unnamed-chunk-32.png new file mode 100644 index 0000000..f835969 Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-32.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-4.png b/SmallAreaPoverty/figure/unnamed-chunk-4.png new file mode 100644 index 0000000..41bcc0e Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-4.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-5.png b/SmallAreaPoverty/figure/unnamed-chunk-5.png new file mode 100644 index 0000000..e079e1d Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-5.png differ diff --git a/SmallAreaPoverty/figure/unnamed-chunk-6.png b/SmallAreaPoverty/figure/unnamed-chunk-6.png new file mode 100644 index 0000000..af89bad Binary files /dev/null and b/SmallAreaPoverty/figure/unnamed-chunk-6.png differ diff --git a/SmallAreaPoverty/index.html b/SmallAreaPoverty/index.html new file mode 100644 index 0000000..5a389d0 --- /dev/null +++ b/SmallAreaPoverty/index.html @@ -0,0 +1,252 @@ + + + + + + +Poverty by District in Nepal, mapped + + + + + + + + + + + + + + + + +

Poverty by District in Nepal, mapped

+ +

Chandan Sapkota, who one of my friend Bigyan calls the “Ezra Klein of Nepal”, produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about “Poverty by District in Nepal”, I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from link in article to the CBS source (thanks Chandan for linking to the data source!), with two district spelling corrections done by author.

+ +

So lets load the data and the “NepalMapUtils” R file to get started.

+ +

0. Data preparation

+ +

Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the “SmallAreaPoverty” folder within NepalMaps.

+ +
poverty <- read.csv("SmallAreaPovertyEstimation.csv")
+source("../NepalMapUtils.R")
+
+ +

We will do one tranformation before proceeding, which is to rename our columns. In the dataset, “FGT(0)” (which loads in R as FGT.0. because R doesn't like parentheses) is the poverty incidence metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the poverty gap, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is poverty severity, the squared distance for those below hte line, which gives more weight to the very poor. [source]

+ +

So lets go ahead and rename our columns to these understandable names:

+ +
names(poverty)
+
+ +
## [1] "District"   "Population" "FGT.0."     "S.E.FGT.0." "FGT.1."    
+## [6] "S.E.FGT.1." "FGT.2."     "S.E.FGT.2."
+
+ +
names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", 
+    "PovertyGap", "S.E-P.G.", "PovertySeverity", "S.E-P.S.")
+
+ +

1. Poverty Incidence (2011)

+ +

Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches).

+ +
npchoropleth(poverty, "District", "PovertyIncidence")
+
+ +

plot of chunk unnamed-chunk-3

+ +

A second map, coloring those that are above the mean (weighted by population) as blue and those below as red:

+ +
meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population)
+npchoropleth(poverty, "District", "PovertyIncidence") + scale_fill_gradient2(low = muted("blue"), 
+    midpoint = meanpoverty, mid = "white", high = muted("red"))
+
+ +

plot of chunk unnamed-chunk-4

+ +

In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj).

+ +

2. Absolute poor (2011)

+ +

The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look:

+ +
poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence
+npchoropleth(poverty, "District", "AbsolutePoor")
+
+ +

plot of chunk unnamed-chunk-5

+ +

The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there.

+ +

For reference, a population sketch to remind us where people live in Nepal:

+ +
npchoropleth(poverty, "District", "Population")
+
+ +

plot of chunk unnamed-chunk-6

+ + + + diff --git a/SmallAreaPoverty/index.md b/SmallAreaPoverty/index.md new file mode 100644 index 0000000..bc07bb4 --- /dev/null +++ b/SmallAreaPoverty/index.md @@ -0,0 +1,82 @@ +Poverty by District in Nepal, mapped +--- + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html), I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from [link in article to the CBS source](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections done by author. + +So lets load the data and the "NepalMapUtils" R file to get started. + +## 0. Data preparation + +Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the "SmallAreaPoverty" folder within [NepalMaps](http://github.com/prabhasp/NepalMaps). + +```r +poverty <- read.csv("SmallAreaPovertyEstimation.csv") +source("../NepalMapUtils.R") +``` + + +We will do one tranformation before proceeding, which is to rename our columns. In the dataset, "FGT(0)" (which loads in R as `FGT.0.` because R doesn't like parentheses) is the _poverty incidence_ metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the _poverty gap_, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is _poverty severity_, the squared distance for those below hte line, which gives more weight to the very poor. [source] + +So lets go ahead and rename our columns to these understandable names: + + +```r +names(poverty) +``` + +``` +## [1] "District" "Population" "FGT.0." "S.E.FGT.0." "FGT.1." +## [6] "S.E.FGT.1." "FGT.2." "S.E.FGT.2." +``` + +```r +names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", + "PovertyGap", "S.E-P.G.", "PovertySeverity", "S.E-P.S.") +``` + + +## 1. Poverty Incidence (2011) + + Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches). + +```r +npchoropleth(poverty, "District", "PovertyIncidence") +``` + +![plot of chunk unnamed-chunk-3](figure/unnamed-chunk-3.png) + + +A second map, coloring those that are above the mean (weighted by population) as blue and those below as red: + +```r +meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population) +npchoropleth(poverty, "District", "PovertyIncidence") + scale_fill_gradient2(low = muted("blue"), + midpoint = meanpoverty, mid = "white", high = muted("red")) +``` + +![plot of chunk unnamed-chunk-4](figure/unnamed-chunk-4.png) + + +In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj). + +## 2. Absolute poor (2011) + +The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look: + +```r +poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence +npchoropleth(poverty, "District", "AbsolutePoor") +``` + +![plot of chunk unnamed-chunk-5](figure/unnamed-chunk-5.png) + +The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there. + +For reference, a population sketch to remind us where people live in Nepal: + +```r +npchoropleth(poverty, "District", "Population") +``` + +![plot of chunk unnamed-chunk-6](figure/unnamed-chunk-6.png) + diff --git a/SmallAreaPoverty/index.rmd b/SmallAreaPoverty/index.rmd new file mode 100644 index 0000000..8970864 --- /dev/null +++ b/SmallAreaPoverty/index.rmd @@ -0,0 +1,53 @@ +Poverty by District in Nepal, mapped +--- + +Chandan Sapkota, who one of my friend Bigyan calls the "Ezra Klein of Nepal", produces amazing analysis about Nepal, taking data sources from the obscure reports of government institutions and writing them up in accessible blog posts. When he posted about ["Poverty by District in Nepal"](http://sapkotac.blogspot.com/2013/07/poverty-by-district-in-nepal.html), I thought that I'd map the poverty, since it is hard for me to place all the districts in Nepal, and I wanted to see what the visual spread of poverty was. CSV data was digitized from [link in article to the CBS source](http://cbs.gov.np/wp-content/uploads/2014/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf) (thanks Chandan for linking to the data source!), with two district spelling corrections done by author. + +So lets load the data and the "NepalMapUtils" R file to get started. + +## 0. Data preparation + +Lets load up the data and our map convenience functions. This works fine if you do a [setwd] to inside the "SmallAreaPoverty" folder within [NepalMaps](http://github.com/prabhasp/NepalMaps). +```{r echo=T, comment=NA, fig.height=6, fig.width=10, cache=TRUE} +poverty <- read.csv("SmallAreaPovertyEstimation.csv") +source("../NepalMapUtils.R") +``` + +We will do one tranformation before proceeding, which is to rename our columns. In the dataset, "FGT(0)" (which loads in R as `FGT.0.` because R doesn't like parentheses) is the _poverty incidence_ metric, defined as proportion of individuals living in that area who are in households with an average per capita expenditure below the poverty line. FGT(1) is the _poverty gap_, which is the average distance below the poverty line, being zero for those individuals above the line, and FGT(2) is _poverty severity_, the squared distance for those below hte line, which gives more weight to the very poor. [source] + +So lets go ahead and rename our columns to these understandable names: + +```{r} +names(poverty) +names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.", "PovertyGap", + "S.E-P.G." , "PovertySeverity", "S.E-P.S.") +``` + +## 1. Poverty Incidence (2011) + + Lets make a quick map of it (note that I haven't paid attention to map projections: these are sketches). +```{r echo=T, comment=NA, fig.height=7., fig.width=12, cache=TRUE} +npchoropleth(poverty, 'District', 'PovertyIncidence') +``` + +A second map, coloring those that are above the mean (weighted by population) as blue and those below as red: +```{r echo=T, comment=NA, fig.height=7., fig.width=12, cache=TRUE, message=F} +meanpoverty <- weighted.mean(poverty$PovertyIncidence, poverty$Population) +npchoropleth(poverty, 'District', 'PovertyIncidence') + scale_fill_gradient2(low=muted('blue'), midpoint=meanpoverty, mid='white', high=muted('red')) +``` + +In the second map, you can really see how (1) the far west and the western moutains are really hurting and (2) prosperity is pretty spatial: swaths of prosperity in the Kathmandu valley, the Gandaki-Narayani anchal area (with Kaski (where Pokhara is) and Chitwan dominating), in the very east, and in Sarlahi / Mahottari (probably from Birgunj). + +## 2. Absolute poor (2011) + +The next thing to look at, as Chandan did, is the number of absolute poor, which is easily calculable given that population is nicely included in this dataset. Lets have a look: +```{r echo=T, comment=NA, fig.height=7.2, fig.width=12, cache=TRUE} +poverty$AbsolutePoor <- poverty$Population * poverty$PovertyIncidence +npchoropleth(poverty, 'District', 'AbsolutePoor') +``` +The absolute poor are concentrated in swatches of the Tarai, and you see quite a bit of absolute poor in the far west, even though populations are smaller, because of such a high concentration of the poor there. Note that the Kathmandu valley doesn't fare all that well, even though there is relative prosperity there; it just has a LOT of people living there. + +For reference, a population sketch to remind us where people live in Nepal: +```{r echo=T, comment=NA, fig.height=7.2, fig.width=12, cache=TRUE} +npchoropleth(poverty, 'District', 'Population') +``` \ No newline at end of file