Learning SAS? Welcome to the exclusive online community for all SAS learners.

MAPSGFK file in SAS for South Africa (ID3-Suburb)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

MAPSGFK file in SAS for South Africa (ID3-Suburb)

Hello.

There is currently a SAS MAPSGFK file showing longitude, latitude, x, y, ID(municipal), ID1(provincial).

I want to know how i can get ID3(suburbs) level. Any help?


Accepted Solutions
Solution
‎05-18-2015 08:44 AM
SAS Employee
Posts: 967

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Prince12,

With SAS/Graph map datasets, you can combine existing map areas, and then remove the internal boundaries of those new/combined areas using Proc Gremove.

But if you want to get finer (more granular) areas in the map, that is not possible. mapsgfk.south_africa only has the id1 and id2 levels, and there is no way to get a finer granularity than that from the existing map. You would need to obtain such a map from a map supplier (perhaps a government organization or a map vendor), preferably in the form of an ESRI Shapefile, and then import it into SAS using Proc Mapimport.

One alternative to getting the shape/boundary files for the level of granularity you're wanting, is perhaps finding the latitude/longitude of the centroids of the areas, and then plotting a marker/dot/etc at the centroids to represent your data. Some of the "Annotating on a Map" examples in my free eBook might be helpful for that: http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf

View solution in original post


All Replies
Community Manager
Posts: 552

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Hi , thank you for visiting the Analytics U Community. Your peers in here will be better equipped to help you if you can help them understand what you need. Here is an article on the best way to structure an inquiry. Look forward to seeing more posts from you!

Occasional Contributor
Posts: 5

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

So bascally what we have in SAS MAPSGFK table is:

MAPSGFK Municipality (ID) table.JPG

ID:Municipality & ID1: Provincial demarcations respectively. And this produces the below:

MAPSGFK Municipality (ID).JPG

Now I did a Spatial smoothing where i have the latitudes and longitudes of various midpoints of suburbs. Thus i have grouped these suburbs into various territories and I want to show this on the map.

Any help?

Occasional Contributor
Posts: 5

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Thanks Beverly,

So the SAS MAPSGFK table looks like below:

MAPSGFK Municipality (ID) table.JPG

ID: municipality & ID1: provincial respectively. Using an arbitrary response, "population". i could produce below:

MAPSGFK Municipality (ID).JPG

Now I did a spatial smoothing and had various suburb midpoints grouped into territories. How do i show this on the map?

Any help?

Community Manager
Posts: 552

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Hi , are you using SAS/GRAPH through SAS OnDemand for Academics? If so, consider posting your inquiry in the SAS/GRAPH and ODS Graphics Community and including your code.

Solution
‎05-18-2015 08:44 AM
SAS Employee
Posts: 967

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Prince12,

With SAS/Graph map datasets, you can combine existing map areas, and then remove the internal boundaries of those new/combined areas using Proc Gremove.

But if you want to get finer (more granular) areas in the map, that is not possible. mapsgfk.south_africa only has the id1 and id2 levels, and there is no way to get a finer granularity than that from the existing map. You would need to obtain such a map from a map supplier (perhaps a government organization or a map vendor), preferably in the form of an ESRI Shapefile, and then import it into SAS using Proc Mapimport.

One alternative to getting the shape/boundary files for the level of granularity you're wanting, is perhaps finding the latitude/longitude of the centroids of the areas, and then plotting a marker/dot/etc at the centroids to represent your data. Some of the "Annotating on a Map" examples in my free eBook might be helpful for that: http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf

Occasional Contributor
Posts: 5

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

Thanks RobertAllison@SAS,

That pdf link is awesome and an eye opener.For a long time I didn't understand SAS X/Y and Latitude/Longitude. I got a free download of South African suburb data similar to what SAS provides at municipality & Provincial level. This is the link: http://africaopendata.org/dataset/cen if any want's it.

But another challenge is finding a way to ENLARGE OR ZOOM in the MAPS so smaller areas and boundaries can be more visible. Is there a facility in PROC GMAPS to do this?

Thanks again.

 

SAS Employee
Posts: 967

Re: MAPSGFK file in SAS for South Africa (ID3-Suburb)

You can make a SAS map 'bigger' by increasing the goptions xpixels and ypixels, and then the map will auto-size to fill the space.

You can also 'clip' out a certain section of a map using 'proc gproject' and then let that subset of the map auto-size to fill the space, which is basically like zooming in on a section of the map. (this is a bit complex to get just-right though).

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 553 views
  • 7 likes
  • 3 in conversation