Skip to content

Commit

Permalink
modified readme; re-adding index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhasp committed Jul 22, 2013
1 parent e550720 commit 8d8715a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 22 deletions.
5 changes: 3 additions & 2 deletions Poverty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ 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.

Data Sources:
PovertyEstimates2001.csv: Derived from [2006 CBS report on Small Area Estimates of Poverty, Caloric Intake and Malnutrition in Nepal](http://cbs.gov.np/wp-content/uploads/2012/Others/SAE%20of%20Poverty,%20Caloric%20Intake%20and%20Malnutrition%20in%20Nepal.pdf), pages D1-D3 in Appendix D. Kavre is expanded to Kavrepalanchok in csv.
PovertyEstimates2011.csv: Derived from [Small Area Estimates of Poverty](http://cbs.gov.np/wp-content/uploads/2013/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf), with two district spelling changes by author.
--
* PovertyEstimates2001.csv: Derived from [2006 CBS report on Small Area Estimates of Poverty, Caloric Intake and Malnutrition in Nepal](http://cbs.gov.np/wp-content/uploads/2012/Others/SAE%20of%20Poverty,%20Caloric%20Intake%20and%20Malnutrition%20in%20Nepal.pdf), pages D1-D3 in Appendix D. Kavre is expanded to Kavrepalanchok in csv.
* PovertyEstimates2011.csv: Derived from [Small Area Estimates of Poverty](http://cbs.gov.np/wp-content/uploads/2013/06/Small%20Area%20Estimates%20of%20Poverty,%202011.pdf), with two district spelling changes by author.
74 changes: 54 additions & 20 deletions Poverty/index.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<link href="http://kevinburke.bitbucket.org/markdowncss/markdown.css" rel="stylesheet"></link>

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.
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. This html is generated automatically using R markdown; see the [git repository](https://github.com/prabhasp/NepalMaps/tree/gh-pages/Poverty) to see the data and to get the rmd file.

## 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).
Lets load up the data and the "NepalMapUtils" library. This works fine if you do a [setwd](http://www.statmethods.net/interface/workspace.html) to inside the `Poverty` folder within the [NepalMaps](http://github.com/prabhasp/NepalMaps) repository.


```r
poverty <- read.csv("SmallAreaPovertyEstimation.csv")
# setwd(...) here
poverty11 <- read.csv("PovertyEstimates2011.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]
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. [(See 2006 report for definitions)](http://cbs.gov.np/wp-content/uploads/2012/Others/SAE%20of%20Poverty,%20Caloric%20Intake%20and%20Malnutrition%20in%20Nepal.pdf).

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


```r
names(poverty)
names(poverty11)
```

```
Expand All @@ -30,53 +31,86 @@ names(poverty)
```

```r
names(poverty) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.",
names(poverty11) <- c("District", "Population", "PovertyIncidence", "S.E-P.I.",
"PovertyGap", "S.E-P.G.", "PovertySeverity", "S.E-P.S.")
```


And now the 2001 data, which has been modified to have the exact same columns already:


```r
poverty2001 <- read.csv("PovertyEstimates2001.csv")
```


## 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")
npchoropleth(poverty11, "District", "PovertyIncidence")
```

![plot of chunk unnamed-chunk-3](figure/unnamed-chunk-3.png)
![plot of chunk unnamed-chunk-4](figure/unnamed-chunk-4.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"),
meanpoverty <- weighted.mean(poverty11$PovertyIncidence, poverty11$Population)
npchoropleth(poverty11, "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)
![plot of chunk unnamed-chunk-5](figure/unnamed-chunk-5.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).
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 Pokhara-Chitwan area (and larger Gandaki / Lumbini zones), in the very east, and in Sarlahi / Mahottari (wonder why... these districts house neither Birgunj nor Janakpur).

## 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")
poverty11$AbsolutePoor <- poverty11$Population * poverty11$PovertyIncidence
npchoropleth(poverty11, "District", "AbsolutePoor")
```

![plot of chunk unnamed-chunk-5](figure/unnamed-chunk-5.png)
![plot of chunk unnamed-chunk-6](figure/unnamed-chunk-6.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")
npchoropleth(poverty11, "District", "Population")
```

![plot of chunk unnamed-chunk-6](figure/unnamed-chunk-6.png)
![plot of chunk unnamed-chunk-7](figure/unnamed-chunk-7.png)


3. Comparisons with 2001
===

Now, lets us compare the data to the 2001 small area povery estimates. We will first create a new dataframe containing data from both years, then take the difference and map it (while remembering to flip the color scheme, a decrease is poverty incidence is good!):


```r
poverty <- merge(poverty11, poverty2001, by = "District", suffixes = c("_2011",
"_2001"))
poverty$PovertyTenYrChange <- poverty$PovertyIncidence_2011 - poverty$PovertyIncidence_2001
npchoropleth(poverty, "District", "PovertyTenYrChange") + scale_fill_gradient2(low = muted("blue"),
high = muted("red"))
```

```
Scale for 'fill' is already present. Adding another scale for 'fill',
which will replace the existing scale.
```

![plot of chunk unnamed-chunk-8](figure/unnamed-chunk-8.png)


The message here seems to be that most of the country has become less poor, with an exception of an icnrease in poverty in: Mustang / Manang, the Far Western Mountains, and in the central-eastern Terai (Parsa/Bara/Rautahat and Siraha/Saptari).

0 comments on commit 8d8715a

Please sign in to comment.