Sample 68118: Display symbols on a choropleth map
This sample demonstrates how to overlay a choropleth map on an OpenStreetMap map with symbols placed at the locations of area codes for selected ZIP codes in specific states. To run this sample, SAS/GRAPH® software and the SAS® 9.4M7 (TS1M7) release are required.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample demonstrates how to overlay a choropleth map on an OpenStreetMap map with symbols placed at the locations of area codes for selected ZIP codes in specific states. To run this sample, SAS/GRAPH software and the SAS 9.4M7 (TS1M7) release are required.
title "The Location of 27### Zip Codes by Area Code";
proc sgmap mapdata=mapsgfk.us_states
maprespdata=sashelp.us_data (where=(statename in ('North Carolina' 'South Carolina' 'Virginia')))
plotdata=sashelp.zipcode (where=(zip between 27000 and 28000));
/* Specify the colors for the marker symbols. */
styleattrs datacontrastcolors=(cx006f79 cxca6c00 cx90b328);
/* Include the OpenStreetMap tiles. Note: This statement
requires an internet connection. */
openstreetmap;
choromap population_2010 / id=statecode mapid=statecode
colormodel=(cx99d3d9 cxd3e1a9)
transparency=0.3 leveltype=quantile name="pop";
scatter x=x y=y / group=areacode name="area"
markerattrs=(symbol=circle);
/* Define the legend for the marker symbols. */
keylegend "area" / title="Area Code";
/* Define the legend for the area fills. */
keylegend "pop" / title="Population";
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample demonstrates how to overlay a choropleth map on an OpenStreetMap map with symbols placed at the locations of area codes for selected ZIP codes in specific states. To run this sample, SAS/GRAPH
® software and the SAS
® 9.4M7 (TS1M7) release are required.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGMAP
|
Date Modified: | 2021-07-30 10:47:20 |
Date Created: | 2021-07-02 15:57:19 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4_M7 | | 9.4 TS1M7 | |
z/OS 64-bit | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft® Windows® for x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8 Enterprise x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8 Pro 32-bit | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8 Pro x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 8.1 Pro x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows 10 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2008 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2008 R2 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2008 for x64 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2012 Datacenter | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2012 R2 Std | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2012 Std | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2016 | 9.4_M7 | | 9.4 TS1M7 | |
Microsoft Windows Server 2019 | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Enterprise 32 bit | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Enterprise x64 | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Home Premium 32 bit | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Home Premium x64 | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Professional 32 bit | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Professional x64 | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Ultimate 32 bit | 9.4_M7 | | 9.4 TS1M7 | |
Windows 7 Ultimate x64 | 9.4_M7 | | 9.4 TS1M7 | |
64-bit Enabled AIX | 9.4_M7 | | 9.4 TS1M7 | |
64-bit Enabled Solaris | 9.4_M7 | | 9.4 TS1M7 | |
HP-UX IPF | 9.4_M7 | | 9.4 TS1M7 | |
Linux for x64 | 9.4_M7 | | 9.4 TS1M7 | |
Solaris for x64 | 9.4_M7 | | 9.4 TS1M7 | |