BookmarkSubscribeRSS Feed
Barite | Level 11

**This is for SAS VA 8.5.2 in a Viya 3.5 environment.**


I am building a map that we are going to use to assist managers in assigning cases to interviewers, and running into a challenge; wondering if SAS VA can support this workflow, or if it's not feasible.


We have two source datasets, Interviewers and Respondents.  Both have lat/long for each, a variable for a strata (interviewers of one strata work respondents of same strata), and some other variables unique to the individual dataset.  In the example below, those are represented by Available and Assigned; in the real data there are others.  These variables cannot be combined into a single variable shared across the datasets (even though in the example data, that would probably be the easiest solution).


What options do we have for enabling showing, for example, all of the interviewers with only respondents selected "Assigned=0"?  Or all of the respondents with only interviewers selected "Available=1"? Or both?  For this purpose, the only solution I've found so far is switching from the button bar to the list (which allows multiple select), but that's not ideal, both because one of our actual filters has one option per record (interviewer name), and it requires the user to intentionally select the "missing" option.  (Of course, we would use a drop-down list not a button bar in that case - using button bars here to make the example easier to see in a picture.)  We also really like the idea of the drop down list due to the ability to type in and get a name autofilled - but that is a single select option, which would be fine if it also allowed missing.


I've thought some about trying to keep the datasets second (not using the "combined" dataset but using both datasets separately), but I don't see that it's possible to do that on a single map, even if I define a relationship between the fields.




Example code:


data fimap.example_interviewers;
  set sashelp.zipcode;
  length type $11;
  keep x y type strata available;
  where mod(zip,580) = 0;
  strata = mod(_n_,8) + 1;
  available = mod(mod(_n_,3)+1,2);

data fimap.example_respondents;
  set sashelp.zipcode;
  length type $11;
  keep x y type strata assigned;
  where mod(zip,53) = 0 and mod(zip,580) ne 0;
  call streaminit(7);
  strata = rand('Integer',1,8);
  assigned = mod(_n_,10) gt 0;

data fimap.example_combined;
  set fimap.example_interviewers fimap.example_respondents;

Example of what the map might look like:




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 1 in conversation