02-17-2016 02:18 PM
I am attempting to create a county-level choropleth map of the United States in SAS Visual Analytics. Although there are default options for state-level choropleth maps and ZIP-level choropleth maps in SAS Visual Analytics, there is not an option for county-level choropleth maps.
Note that there appears to be a session at the upcoming SAS Global Forum on this exact topic:
Since I would prefer not to have to wait a few months for a solution to this problem, does anyone currently know how to create a county-level choropleth map in SAS Visual Analytics?
Thank you very much.
02-18-2016 10:42 AM
You have asked and you shall receive. Included is a snippet of the paper which corresponds to your request to map by county. Once these changes have been made, you can use county name or FIPS code with the 'Geography' data type.
Included are examples:
Subdivision (State, Province Names)*
Subdivision (State, Province) SAS Map ID Values*
Be sure to stop by the SAS Solutions OnDemand booth in Vegas and say Hi!
Director, Analytic Integration Consulting
02-19-2016 09:05 AM
Thanks Angela for sharing your paper!
It should be noted that officially VA does not support adding custom regions, from a technical support perspective.
12-22-2016 08:44 PM - edited 12-22-2016 08:46 PM
Hi Angela (anybody else - please also free to comment!).
I have attempted to add custom regions using your paper downloaded from the SAS Global Forum 2016 site referenced above (and also the paper attached by @mtoledo on the Import shapefile in SAS Visual Analytics v7.1 topic).
I am using SAS VA7.3 and wanted to check first of all, whether any changes need to be made so that custom regions work in this version of SAS? If not, I wouldn't mind any tips on what can be wrong ...
I have made a dataset AU_STAT1 - which contains Australian statistical area level 4 data and placed it in the MAPSGFK library and been given read and write access to it. I have also updated attrlookup and centlookup. I am able to create bubble charts based on a test dataset so my conclusion is that attrlookup and centlookup are working fine. However, I cannot create region charts, so my conclusion is that SAS VA can't find (either through miscommunication or otherwise) the datasets that I created that are referenced to in the mapname field of centlookup. Are you able to think of what could be wrong?
We have restarted all SAS services, but also want to check if this is still necessary? - as changes were seen in attrlookup and centlookup in valib before restarting.
Edit: I attempted to attach my versions of centlookup, attrlookup and au_stat1 (however received an error message that the contents of the file did not match the file type ... )
Any help will be greatly appreciated.
12-23-2016 04:35 AM
When you plot a buble map do you actually see those bubles inside the region, i mean can you see state / county map as background or bubles are plotted to a gray background?
If you are getting bulbes in a gray background, I suggest you to check the coodirnate system that your original shape file is using. SAS VA works with WSG8. If you need to convert to it, you can use the GPROJECT procedure.
proc gproject data=[PROC MAPIMPORT OUTPUT] out=NEW_TABLE
proc gproject data=[PROC MAPIMPORT OUTPUT] out=NEW_TABLE
from="+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=0.99982 +x_0=600000 +y_0=750000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" to="EPSG:4326";
* EPSG:4326 = WSG84
12-27-2016 06:51 PM
The bubble map shows the country as follows:
I currently have x and y the same as longitude and latitude, but have created a dataset (ready for upload to the server) in which I create x and y by projecting longitude and latitude as follows:
proc gproject data=temp OUT=FP_polygon_proj degrees; id sa4_code11 ; run;
(This loses longitude and latitude and so I merge with the original dataset (temp) to have longitude and latitude in addition to x and y)
Unfortunately, our sas administrator is away and so I have no way to test this new dataset (no access to upload :-( until after New Years ...
I have also attached an Excel file with extracts of the polygon data (AU_STAT1), ATTRLOOOKUP and CENTLOOKUP with master data and data for one region.
Hopefully changing x and y works.. Otherwise, in one of the referenced papers, the name had to end with 1, it wouldn't now have to start with "VA" as well would it? It seems all map names in centlookup start and end with 'VA' and '1', respectively ... I am at a loose end at what else to try!
01-02-2017 08:51 AM
01-09-2017 11:30 PM
Note that if I read in MAPSGFK.AU_STAT1 (now AUSTAT41) and plot the longitude and latitude (by defining IDNAME as a custom region) for a subset of the data (two IDNames) I can see the bubbles in the correct places (i.e. defining a region) so it seems the longitude and latitude are correct ....
01-03-2017 10:13 AM
Your dataset seems to be ok. To display regions in VA you need to do as follows:
Create a sample data set.E.g
ID IDNAME Value
"AX-208" "Melbourne - Inner South" 1231
It should work.
01-09-2017 09:38 PM
Thanks Marcel - I had created a test dataset and tested as you prescribed - but unfortunately I cannot see any region (unfortunately even with the projected coordinates ).. only bubbles.
01-10-2017 09:45 AM
Marcel's instructions should work.
Is it possible that you are seeing bubbles because the wrong type of mapping report object is displayed? That is, rather than using an autochart, specifically select a "Geo Region Map".
01-10-2017 05:02 PM
Just to clarify - the bubbles I see when the bubble map is selected (either via the automap or Geo Map, Map Style "Bubbles" , only the background map is what I see when I select the region map (via Geo Map, Map Style "Regions")
01-10-2017 11:32 PM
I am adding this reply so that I can help if possible.
I am actively working on exactly the same problem, luckily, I am an administrator as well, so hopefully I can try a few thinngs as I go.
I thought I had everything all setup, but still not seeing regions, even though the data I have successfully and beautifully produces GMAP output.
I am not entirely clear under what circumstances I need to restart my SAS VA web service though.
At this stage, I am assuming every time I change anything in the MAPSGFK library that might affect the exisiting metadata.
I also have a custom Maps library, but VA doesn;t seem to see any of that.
I am currently running my GREDUCE on some ESRI Shape files, so I will keep you posted with any progress.
(SAS VA 7.3 Linux Distributed)