View sankey.csv
source target value
Barry Elvis 2
Frodo Elvis 2
Frodo Sarah 8
Barry Alice 2
Elvis Sarah 2
Elvis Alice 12
Sarah Alice 4
View sas_vbs_xml_xlsx.sas
/*Sourced from here:
http://support.sas.com/kb/43/496.html
*/
options noxwait noxsync;
%macro convert_files(default=,ext=);
data _null_;
file "'&default\temp.vbs'";
View flare-labeled.json
{
"name": "flare",
"description": "flare",
"children": [
{
"name": "analytic",
"description": "analytics",
"children": [
{
"name": "cluster",
View SAS_combine_multiple_rows_into_one.sas
*create sample data for demonstration;
data have;
infile cards dlm='09'x;
input OrgID Product $ States $;
cards;
1 football DC
1 football VA
1 football MD
2 football CA
3 football NV
View SAS_Create_an_anonymized_key.sas
/*This program demonstrates how to create a basic anonymized
key for a unique identifier. Ensure you set the value in CALL
STREAMINIT()/RANDOM_SEED macro variable to ensure you can
replicate the keys if needed*/
%let random_seed = 30;
*list of unique values;
proc sql;
create table unique_list as
View sas_moving_averages_proc_means.sas
proc sql noprint;
select min(period) into :min_period TRIMMED
from have;
select max(period) into :max_period TRIMMED
from have;
quit;
%put &min_period;
%put &max_period;
View sas_proc_sort_duplicate_keys
/*This example demonstrates how to get a list of duplicates based on the key variables.
KEY variables are placed in the BY statement.
Any 'duplicates' according to the KEY variables are kept in the OUT= dataset
*/
*Generate sample data with duplicate KEY;
data class;
set sashelp.class sashelp.class(obs=5);
run;
View sas_categorize_variable
data class;
set sashelp.class;
length category $20.;
bmi = 703*(weight/(height**2));
if bmi < 18 then
category='Under Weight';
else if 18 <= BMI < 25 then
category='Normal';
else if 25 <= BMI < 30 then
View sas_format_proc_means_summary
/*Note that if you apply formats to your date they get grouped according to the format, so having a SAS date is advantageous.
Here's a quick example that shows the calculating of yearly statistics from a data set.*/
proc means data=sashelp.stocks min max mean;
class date;
format date year4.;
var open high low;
run;
View sas_macro_variables_loop
/*Demo to show how to loop through a list of macro variables*/
proc sql noprint;
select name into :name1-
from sashelp.class;
quit;
%macro demo;
%do i=1 %to 10;
%put name&i=&&name&i;