Date: Wed, 16 Aug 2006 16:28:26 -0700
Reply-To: ChrisW75 <9Squirrels@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: ChrisW75 <9Squirrels@GMAIL.COM>
Subject: Re: SAS Map for Canada with postal code info
Content-Type: text/plain; charset="iso-8859-1"
There's no postcode info for Canada as far as I'm aware, however they
do have country maps available for download on the SAS Support site.
Strangely, I actually created a map dataset from MapInfo data the other
day for Australia (not postcode data, but the state maps).
The code I used is below. One thing to note is that this produces a map
of each state individually. If you want all shown together, you need
to pring all the datafiles together first, then run GPROJECT on all the
One GPROJECT you'll need to look up the options, mine is set up to
use Longitude and Latitude in degrees, and we're on the other side of
the world from you. I believe that over there you may not need to use
the EASTLONG option. The data is in the MapInfo interchange format
(.mif file), so if oyu have the info in MapInfo, you should be
filename ACT 'P:\Datasets\Boundary2001\STE\Act\STE01a8.mif';
filename NSW 'P:\Datasets\Boundary2001\STE\NSW\STE01a1.mif';
filename NT 'P:\Datasets\Boundary2001\STE\NT\STE01a7.mif';
infile &STATE. recfm=v lrecl=256 dsd dlm=' ' firstobs=10 truncover;
length state $3 long lat 8 record $80 segment 4;
*informat long lat 14.10;
informat record $char80.;
format long lat 14.10;
retain state "&STATE"
input record $50.;
if record in:('pen','brush') then delete;
if length(record) < 20 then
segment + 1;
points = input(record,8.);
long = input(scan(record,1,' '),14.10);
lat = input(scan(record,2,' '),14.10);
X = long;
Y = lat;
proc gproject data=&STATE._boundary
EASTLONG PROJECT=GNOMON DEGREE;
proc gmap map=&STATE._boundary_proj;
choro state /coutline=BLACK ;
I hope that this helps you (let us know either way)
> I am trying to create a SAS/Graph map showing student enrollment across
> Canada. The data I have contains each student's postal code. Is there
> any information out there matching province/district with postal code
> in Canada?
> Also, we have our school map created in some format which I am sure
> right now, does SAS/Graph map allows importing maps in other format
> (e.g. mapinfo etc.)?
> Any suggestions on this would be highly appreciated.