Description Usage Arguments Value Examples
View source: R/wordcloud_map.R
Plot a map with wordclouds for the selected NUTS level and its regions.
1 2 3 4 5 6 7 8 9 10 11 12 | wordcloud_map(
dataframe,
country,
level_nuts,
name_column_words,
name_column_frequency,
name_column_nuts,
max_word_size = 4,
rm_outside = TRUE,
scale = "10",
png_path = "False"
)
|
dataframe |
The dataframe containing the input data. |
country |
The corresponding ISO 3166-2 code of the chosen country. See wikipedia.org/wiki/ISO_3166-1_alpha-3 for a list of all country codes. |
level_nuts |
The NUTS level to which the NUTS codes correspond. Must be either '1', '2' or '3'. |
name_column_words |
The name of the column in 'dataframe' containing the words. |
name_column_frequency |
The name of the column in 'dataframe' containing the frequencies. |
name_column_nuts |
The name of the column in 'dataframe' containing the NUTS codes. |
max_word_size |
The maximum size of the words in the wordcloud. At the minimum value '1' all the words are equally sized. Default is '4'. |
rm_outside |
Whether to remove words that could not be fitted in the wordcloud area. If set to 'FALSE', these words will be stacked on top of each other at the centre of each region. Default is 'TRUE'. |
scale |
The desired scale of the regions to be used as the shape of the wordcloud. Must be either '"03"', '"10"', '"20"' or '"60"'. Default is '"10"'. |
png_path |
Path where the png image will be saved to, keeping the original aspect ratio of the country. Default is '"False"'. |
A ggplot object with the wordclouds for each region present in 'dataframe'.
1 2 3 4 5 6 7 8 | ## Not run:
companies_DEU <- data("companies_DEU")
wordcloud_map(companies_DEU, "DEU", 1, "name", "employees", "code")
companies_ITA <- data("companies_ITA")
wordcloud_map(companies_ITA, "ITA", 2, "name", "employees", "code", max_word_size = 10, rm_outside = F)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.