Skip to content

Commit 056e1de

Browse files
committed
add Natural Earth GIS data
1 parent 7952728 commit 056e1de

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This repository contains Python 3 modules that retrieve, clean, subset and other
66
* `chip` — China Household Income Project
77
* `chfs` — China Household Finance Survey
88
* `cn_nbs` — National Bureau of Statistics of China
9+
* `naturalearth`[Natural Earth](http://naturalearthdata.com) GIS
910

1011
The modules are independent but have a roughly similar [API](https://en.wikipedia.org/wiki/Application_programming_interface). Each module…
1112
- contains a method like `load_ceic()` that returns data in a clean, Pythonic form.

naturalearth/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.cpg
2+
*.dbf
3+
*.prj
4+
*.shp
5+
*.shx
6+
*.README.html
7+
*.VERSION.txt

naturalearth/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BASE_URL="http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/"
2+
3+
all: chn_provinces.shp
4+
5+
chn_provinces.shp: ne_10m_admin_1_states_provinces.shp
6+
ogr2ogr \
7+
-lco ENCODING=UTF-8 \
8+
-where "adm0_a3 ='CHN'" \
9+
$@ $<
10+
11+
%.shp: %.zip
12+
unzip -j $<
13+
14+
%.zip:
15+
curl -L -O $(BASE_URL)$@

0 commit comments

Comments
 (0)