Join the cosine and jaccard output files on the key-key pair, and convert it to dataframe:
val data = cosineRDD.join(jaccardRDD).toDF("cosine","jaccard")
data.write.parquet("/user/alexeys/correlations_3state")
Launch spark-shell session with histogrammar pre-loaded: