update xy coordinates & code
fix R script
Merge pull request #3 from davharris/master

fix R script & json