This is an example of how to do window analysis with Spark