finished function to create JSON for interactive vis