{"id":16737708,"url":"https://github.com/wvengen/d3-wordcloud","last_synced_at":"2025-07-24T22:11:52.165Z","repository":{"id":23519638,"uuid":"26885854","full_name":"wvengen/d3-wordcloud","owner":"wvengen","description":"Plug-and-play wordcloud with D3","archived":false,"fork":false,"pushed_at":"2018-04-16T21:23:22.000Z","size":328,"stargazers_count":83,"open_issues_count":9,"forks_count":66,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-15T01:20:06.700Z","etag":null,"topics":["d3","js","wordcloud"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wvengen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-19T23:01:43.000Z","updated_at":"2024-12-02T13:42:08.000Z","dependencies_parsed_at":"2022-08-22T00:50:30.244Z","dependency_job_id":null,"html_url":"https://github.com/wvengen/d3-wordcloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wvengen/d3-wordcloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wvengen%2Fd3-wordcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wvengen%2Fd3-wordcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wvengen%2Fd3-wordcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wvengen%2Fd3-wordcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wvengen","download_url":"https://codeload.github.com/wvengen/d3-wordcloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wvengen%2Fd3-wordcloud/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266910339,"owners_count":24004865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d3","js","wordcloud"],"created_at":"2024-10-13T00:27:31.850Z","updated_at":"2025-07-24T22:11:51.921Z","avatar_url":"https://github.com/wvengen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Easy Word Cloud using D3\n========================\n\nThere is an amazing [D3](http://www.d3js.org/)\n[wordcloud plugin](https://github.com/jasondavies/d3-cloud)\nfor creating beautiful wordclouds. But it's not trivial for everyone\nto put it to use. This plugin makes it easy to create such a wordcloud.\n\n![](example/example.png)\n\nUsage\n-----\n\nA simple html page with a wordcloud might contain:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eWord Cloud\u003c/title\u003e\n    \u003cscript src=\"lib/d3/d3.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"lib/d3/d3.layout.cloud.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"d3.wordcloud.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id='wordcloud'\u003e\u003c/div\u003e\n    \u003cscript\u003e\n      d3.wordcloud()\n        .size([800, 400])\n        .selector('#wordcloud')\n        .words([{text: 'word', size: 5}, {text: 'cloud', size: 15}])\n        .start();\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThat's all! The following properties are accepted:\n* `selector()` which css selector to create the wordcloud on\n* `element()` an element instead of the previous selector\n* `scale()` a d3 scale for sizing words, e.g. `sqrt`, `log` or `linear`\n* `fill()` a d3 scale for coloring words, e.g. `d3.scale.category20b()`\n* `transitionDuration()` how many milliseconds a resize transation takes\n\nIn addition to this, the following d3-cloud properties are accepted:\n* `size()` dimensions [width, height]\n* `words()` array of `{text: 'word', size: 1}` hashes\n* `font()`\n* `fontStyle()`\n* `fontWeight()`\n* `spiral()`, which can be `archimedean` or `rectangular`\n* `padding()`\n\nExtensions\n* `onwordclick(function(d,i))` provide your own function to call when a word is clicked\n\n```html\n.onwordclick(function(d, i) {\n  window.location = \"https://www.google.co.uk/search?q=\" + d.text;\n})\n```\n\nLinks\n-----\n* The original [d3-cloud](https://github.com/jasondavies/d3-cloud) plugin\n* [d3-wordcloud](https://github.com/shprink/d3js-wordcloud), example of how to use d3-cloud that this plugin is based on\n* [Article on using d3-cloud](https://weblogs.java.net/blog/manningpubs/archive/2014/11/10/d3-making-word-cloud-effective-graphical-object)\n* Java-based [wordle.net](http://wordle.net), which has inspired the d3-cloud plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwvengen%2Fd3-wordcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwvengen%2Fd3-wordcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwvengen%2Fd3-wordcloud/lists"}