GithubHelp home page GithubHelp logo

khunreus / d3wordcloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbkunst/d3wordcloud

0.0 1.0 0.0 8.02 MB

:cloud: htmlwidgets for D3js Word Cloud Layout

Home Page: http://rpubs.com/jbkunst/133106

R 100.00%

d3wordcloud's Introduction

d3wordcloud

travis-status version downloads

What is it?

d3wordcloud is a wrapper for the Word Cloud Layout by Jason Davies based on htmlwidgets.

How it works?!

The main function d3wordcloud needs only words and freqs. Just like the old good wordcloud package. See demo here.

library("d3wordcloud")
words <- c("I", "love", "this", "package", "but", "I", "don't", "like", "use", "wordclouds")
freqs <- sample(seq(length(words)))

d3wordcloud(words, freqs)

How can you get it?

I know! you already know how to install it

devtools::install_github("jbkunst/d3wordcloud")

Parameters

There are parameter for make your word cloud like you like/want:

  • words: The words
  • freqs: Their frequencies
  • padding: The separation between words. Default value is 0.
  • colors: The color for wordcloud, if the length of words, and colors are the same, then each word will have its own color, in other case a grandien between the colors is generated (the order is important here).
  • size.scale: The scale to use for scale the words sizes (freqs). Options are linear, sqrt and log. Default value is linear.
  • color.scale: The scale to use for scale the colors according to sizes (freqs). Options are linear, sqrt and log. Default value is linear.
  • font: The font to use in thw the word cloud. Default value is Open Sans.
  • spiral: The way to construct the wordcloud. Options are archimedean and rectangular. Default value is archimedean.
  • rotate.min: Minimum angle for (random) rotation. Default value is -30.
  • rotate.max: Maximum angle for (random) rotation. Default value is 30.
  • tooltip: Do you want tooltips showing the frequecny on cursor hover? ;)
  • label: Alternate text for tooltip to display.
  • rangesizefont A 2 length numeric vector indicating the size of text (this is usefull if you have sentences instead of words).

You can see this parameter in action here http://rpubs.com/jbkunst/133106.

Demo

Check here https://jbkunst.shinyapps.io/d3wordcloud.

Sometimes I exceed the hours on the basic plan in shiniapps.io. You can always can view here: http://rpubs.com/jbkunst/133106.

An old demo gif:

shinyappdemo

References

Similar packages

  • rWordCloud. A package with similar functionalities.

Recommendations

d3wordcloud's People

Contributors

jbkunst avatar mrjoh3 avatar timelyportfolio avatar csese avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.