Skip to content

Commit

Permalink
Merge pull request #69 from siddheshhr/main
Browse files Browse the repository at this point in the history
Updated the data_analysis.py to improve performance & readability of code.Fixed spelling mistake  in README.md
  • Loading branch information
TimidRobot authored Mar 7, 2024
2 parents b2b5cb9 + ce2604f commit 7c58cec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
[cc-by]: https://creativecommons.org/licenses/by/4.0/ "Creative Commons Attribution 4.0 International License"
23 changes: 10 additions & 13 deletions analyze/data_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Binary file modified analyze/wordCloud_plots/license1_wordCloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c58cec

Please sign in to comment.