# Word cloud with data

**URL:** <https://discourse.processing.org/t/word-cloud-with-data/18514>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [March 8, 2020, 10:03pm UTC](https://discourse.processing.org/t/word-cloud-with-data/18514 "2020-03-08T22:03:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anb97871](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@anb97871](https://discourse.processing.org/u/anb97871)\
**Post date:** [March 8, 2020, 10:03pm UTC](https://discourse.processing.org/t/word-cloud-with-data/18514/1 "2020-03-08T22:03:06Z")

</div>

Hi. I am so new to processing and starting a project where I need to upload data from a csv and take data to display with scale and map of the data. It is simple data and have been able to upload the data. A sample of my data is shown below:

| name | male | female |
| --- | --- | --- |
| ALL OCCUPATIONS | 895 | 726 |
| MANAGEMENT | 1486 | 1139 |
| BUSINESS | 1327 | 1004 |
| COMPUTATIONAL | 1503 | 1245 |

Currently my code looks like this:

```auto
Table wordcloud;
void setup() {
  size(100, 100);
wordcloud = loadTable("wordcloud.csv", "header");
  for (TableRow row : wordcloud.rows()) {
    String id = row.getString("name");
    int female = row.getInt("female");
    int male =row.getInt("male");
    println(id + ", occupation pay for females is " + female + "." + " " + id + " occupation pay for males is " +male + ".");
  }
 
}

```

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [March 9, 2020, 8:15am UTC](https://discourse.processing.org/t/word-cloud-with-data/18514/2 "2020-03-09T08:15:31Z")

</div>

First please format code with \</\> button.  
Second is this a school project? Anyway you should do some work yourself, there is a Wordcloud library that you should find useful.
