r2d3 (version 1.0)

D3WordCloud: D3 Word Cloud

Description

Creates a html file containing json data and a D3.js Word cloud. It works with the jsonWordCloud function

Usage

D3WordCloud(JSON, file_out)

Arguments

JSON
A json object
file_out
the location and name for the output html file

References

https://github.com/jasondavies/d3-cloud

Examples

Run this code
words=c("big", "data", "machine", "learning", "wordcloud", "R", "d3js", "algorithm", "analytics", "science", "API")
freq=c(50, 50, 30, 30, 100, 10, 10, 10, 5, 5, 5 )
json<-jsonWordCloud(words, freq)
D3WordCloud(json, file_out="word_cloud.html")

Run the code above in your browser using DataCamp Workspace