Venn diagram comparisons of sets- quick way to see overlap or lack there of

venn diagram

Venn diagram comparisons of sets

I often need to determine what items are in set A and Set B, in Set A and not in Set B and in B and not in Set A. Excel and other tools can do this but it takes time to open it up and configure the file. I wrote an AutoHotKey script which is very easy to get the Union, etc. and is very flexible.   The script can be downloaded below but I recommend first watching the video to understand exactly what is going on.



Venn Diagram / Compare sets Utility

Compare Sets Utility


Venn Diagram / AutoHotkey Compare Sets code

Using Hotstrings to help utilized custom SPSS scripts

SPSS ScriptsUsing Hotstrings from AutoHotKey help write your code is a great, easy, way to greatly improve your speed!  This example demonstrates me using hotstrings for writing most of which are actually custom SPSS scripts) which typically affect the look of output.  The newer versions of AutoHotKey now utilized Python for their scripting.  Most of mine were written in SAX Basic.  I’d post the code but it is unlikely they will work for you.

Scripts are easy to use and adaptable to make output much more meaningful and in a format ready to be used. AutoHotKey helps write syntax to utilize the scripts.

SPSS Scripts

Custom SPSS Scripts and AutoHotKey


Sample Scripts Library | Raynald’s SPSS Tools

Visual Basic-like language, embedded into SPSS for Windows. Use scripts samples to solve tasks related to interface and output manipulation.

Free SPSS Scripts

Use this script to rename some or all of the variables in your spss dataset. This script uses search and replace for effective renaming. Rename all your variables  …

Regular Expressions to automate metrics is an investment everyone should do!

regular expressions to automate metrics

Regular Expressions

Regular Expressions to automate metrics

I’ve written a script that logs into our vendor website and exports the recent email campaigns then breaks them out by region, campaign type, Business Unit, etc. and links them back to our SharePoint site for more information.  The script relies on a regular expression to automate metrics on our long string name and parse-out sections by examining patterns in the Naming convention.

My script first logs into our tool (SilverPop) and performs web scraping to capture the data and dumps it to a local HTML file.  I then use Excel to import the HTML file and start parsing the naming convention with the regular expression.   After all the columns are created I replace some of the short abbreviations with longer, easier to understand, words.   Then I insert functions aggregating the metrics by Type of campaign, Region, Language etc.   After that I break out four regions.  All in all it takes about 10 minutes to run but saves me about 40 hours worth of work.  The below video demonstrates the regular expressions to automate metrics in action

Automating email metrics

SPSS macro to flip ordinal variable labels so they graph well in Excel

SPSS macroEven though I do nearly all my analysis in SPSS, I still prefer to use Excel to graph my data.  Unfortunately Excel inverts the legend when graphing. Creating a new variable, or re-coding the old one, is time consuming and errors can creep in. This SPSS macro to invert an ordinal variable with very little work.  Saves an amazing amount of time!

It also has a built-in way to filter out too small a sample size.


SPSS macro

The below video demonstrates the usage of the SPSS macro.

Inverting an Ordinal Variable that has value labels