compile scatter plot js so it can be included properly