I’ve posted quite a few code snippets over time, mainly in SPSS. This page is a brief overview for me to find my stuff. If you are looking for something and a link does not work, let me know. Also I have a few in here that do not have blog posts! So extras if you will.

This page is a current work in progress. Will continuing updating slowly over time.

# SPSS Macros and Code Snippets

## Statistical Oriented Macros

- Aorisitic Macro (Blog Post 1, Blog Post 2) (Macro)
- ROC and Precision Recall Curves (Blog Post) (Macro)
- Restricted Cubic Splines (Blog Post) (Macro)
- Negative Binomial Predictions (Blog Post)
- Generating Negative Binomial Random Variables (Blog Post)
- Randomly sample multinomial probabilities (Macro)
- GINI index and other diversity indexes (Macro)
- Funnel Chart for rates (Blog Post)
- Propensity Score Balance Stats (post FUZZY) – (Blog Post) (Macro)
- Runs test for multiple groups – (Cross Validated Post) (Macro)

## Data Manipulation

- Time and Panel Fill (Blog Post) (Macro)
- EdgeList from long data (Blog Post) (Macro)
- American Community Survey !Updated! (Blog Post)
- Correlation Pairs (Blog Post)
- Bezier Curves (and circular stat helpers) (Blog Post) (Macro)
- Generate Permutations of a Columns (Macro)

## Graphs

- Personal Chart Template (Blog Post) (current chart template)
- Treemap (Blog Post (Macro)
- Spineplot (Blog Post) (Macro)
- Equal Probability Histogram (Blog Post)
- Ellipses (Blog Post) (Macro)
- Stacked Intervals (Blog Post)
- Post clip PDF (ToDo!)

## Python in SPSS Examples

- Connected Components in Graphs (Blog Post)
- Custom distance function for FUZZY (Blog Post)
- SPSS data to python data (Blog Post)
- Python data to SPSS data (Blog Post)
- Graph queries using networkX and SPSSINC TRANS (Blog Post)

## R in SPSS Examples

- Group based trajectory models in SPSS using R (Blog Post)
- Using ggmap to plot crime data (Blog Post)

# Python Code Snippets

- Laplacian Centrality (Blog Post)
- Google Geocoding API (Blog Post)
- Google Places API (Blog Post)
- Google Distance API (Blog Post)
- Google Streetview API (Blog Post)
- Google Reverse Geocoding API (for neighborhood tags) (Blog Post)
- ESRI Geo API for New York State (Blog Post)
- KDTrees (Blog Post)
- emailing (Blog Post)
- American Community Survey data to Pandas (Blog Post)
- dominant set in networkX (ToDo!)

# R Code Snippets

- Ripleys K for fixed areas (Blog Post)
- One sided line buffers using rgeos (Blog Post)
- Graphs for group based trajectory (Blog Post)
- KDE estimates for logistic predictions to probability scale (Blog Post)
- Small Sample test statistics (Blog Post) (R code)
- ggplot rootogram and mixed scales (Blog Post, StackOverflow example)
- inverse distance hacking in spatstat and inline C code (Blog Post) (R functions)