Fixed the dates in the python xml parsing, wrote a few sql queries that will be used by R