[R-sig-Geo] mapping of administrative areas to postal codes

Shaun Walbridge SWalbridge at esri.com
Tue Jan 26 01:20:37 CET 2016


You can extract the data fairly easily using the REST API to pull out
what you want. For example, this URL contains the regions:

http://www.arcgis.com/home/item.html?id=0dd32a9c77b8400ebf60261571b9134b

That data can be downloaded directly in the browser, or using something
like cURL. Note that the data is provided under these terms of use:

https://ref.data.gov.sg/common/terms.aspx

The REST API can take a little time to become familiar with. Here's a
bash script which downloads both the regions and detailed admin
areas using cURL, and converts them to Shapefiles with OGR:

https://gist.github.com/scw/f761b6c5fe2508eeb94c

Cheers,
Shaun

-----Original Message-----
From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Alex Mandel
Sent: Monday, January 25, 2016 6:30 PM
To: Richa Agarwal; Roger.Bivand at nhh.no
Cc: R-mailing list
Subject: Re: [R-sig-Geo] mapping of administrative areas to postal codes

GADM isn't always as current as you might hope (something we're working on with interns).

For Singapore we have an update but I don't think it's released yet.
The source however is
https://www.ura.gov.sg/uramaps/?config=config_preopen.xml&preopen=Planning%20Boundaries
It's a little tricky to extract the data.

FYI, US Post Codes from the Census do not 100% match the Postal Service which does not release their boundaries. Generally in most countries you have buy access to postal code data.


I'll check up on what needs to be done to push the newer version of GADM for Singapore to the public service.

Thanks,
Alex

On 01/25/2016 12:43 PM, Richa Agarwal wrote:
> Thanks very much Roger.
> 
> Guys, Any insights on how can we map postal code in a country to the 
> administrative areas (for which shape files are available at GADM).
> Example: For Singapore for level 1 areas GADM has 5 regions however 
> when I plot them they don't necessarily match with 5 regions explained 
> on say Wikipedia
> 
> https://en.wikipedia.org/wiki/Administrative_divisions_of_Singapore
> 
> 
> 
> On Mon, Jan 25, 2016 at 11:50 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> 
>> On Mon, 25 Jan 2016, Richa Agarwal wrote:
>>
>> Hi Guys,
>>>
>>> Is there a mapping of administrative areas (as available in shape 
>>> files at the GADM website) to postal codes by country? Also is there 
>>> a source for more detailed shapefiles. Example for Singapore the 
>>> detail available on GADM is just level 1.
>>>
>>
>> In the US, five-digit zip codes are part of the US Census boundary 
>> system, and - as public boundaries - are open for download.
>>
>> In most other countries, the boundaries of postal code areas are not 
>> public data, even where the postal service is public, and are usually 
>> only available at substantial cost, and often without permission to 
>> publish maps based on the boundaries.
>>
>> In Norway, a Meteorological Office programmer crowd-sourced point 
>> locations to provide a way of offering weather forecast look-up based 
>> on postcode - but those are not boundaries, and indeed are just the 
>> GPS readings of volunteered data.
>>
>> Even using commercial APIs to give address points probably will not help.
>>
>> Roger
>>
>>
>>> http://www.gadm.org/country
>>>
>>> Thanks
>>> Richa
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>>
>> --
>> Roger Bivand
>> Department of Economics, Norwegian School of Economics, Helleveien 
>> 30, N-5045 Bergen, Norway.
>> voice: +47 55 95 93 55; fax +47 55 95 91 00
>> e-mail: Roger.Bivand at nhh.no
>> http://orcid.org/0000-0003-2392-6140
>> https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
>> http://depsy.org/person/434412
>>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list