diff --git a/README.md b/README.md index 11f5840..8a27312 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ modules: [homebrew]: https://brew.sh/ -### Running scripts that require client cedentials +### Running scripts that require client credentials To successfully run scripts that require client credentials, you will need to follow these steps: @@ -159,4 +159,4 @@ The documentation within the project is licensed under a [Creative Commons Attribution 4.0 International License][cc-by]. [cc-by-png]: https://licensebuttons.net/l/by/4.0/88x31.png#floatleft "CC BY 4.0 license button" -[cc-by]: https://creativecommons.org/licenses/by/4.0/ "Creative Commons Attribution 4.0 International License" \ No newline at end of file +[cc-by]: https://creativecommons.org/licenses/by/4.0/ "Creative Commons Attribution 4.0 International License" diff --git a/analyze/data_analysis.py b/analyze/data_analysis.py index 4160a1e..485c87e 100644 --- a/analyze/data_analysis.py +++ b/analyze/data_analysis.py @@ -92,19 +92,16 @@ def tags_frequency(csv_path, column_names): # customized = {"p", "d", "b"} # stopwords = stopwords.union(customized) - for word in list_tags: - # Splitting each tag into its constituent words - tokens = word.split() - # Converting each word to lower case - for i in range(len(tokens)): - tokens[i] = tokens[i].lower() - # Adding each word to text - text += " ".join(tokens) + " " - for word in list2: - tokens = word.split() - for j in range(len(tokens)): - tokens[j] = tokens[j].lower() - text += " ".join(tokens) + " " + # Initialize an empty list to store lowercase words + lowercase_words = [] + + # Iterate over each tag in list_tags and list2 + for tag in list_tags + list2: + # Split the tag into words, convert to lowercase,& append to the list. + lowercase_words.extend([word.lower() for word in tag.split()]) + + # Join the lowercase words with a space separator + text = ' '.join(lowercase_words) # Creating the word cloud tags_word_cloud = WordCloud( diff --git a/analyze/wordCloud_plots/license1_wordCloud.png b/analyze/wordCloud_plots/license1_wordCloud.png index 433f0fc..d1a0885 100644 Binary files a/analyze/wordCloud_plots/license1_wordCloud.png and b/analyze/wordCloud_plots/license1_wordCloud.png differ