NFDI4BIOIMAGE / training

https://nfdi4bioimage.github.io/training
Creative Commons Attribution 4.0 International
11 stars 7 forks source link

Tag statistics #130

Open haesleinhuepf opened 4 months ago

haesleinhuepf commented 4 months ago

After merging #127 we should look into #101 again. Reason: The tag statistics look different, after data cleaning.

It might also be cool to have the tag statistics on our website, e.g. as a word cloud. Therefore, we need to execute the code in the notebook as part of a github workflow. Therefore we need to convert the notebook into a python script.

SeverusYixin commented 4 months ago

I didn't get it here, after run the script, the yml files should be rewrite, and for the actions show me that this step have been done. And I run this tag_statistics.ipynb on my local side, it show me the different result like this :

Bioimage Analysis: 131 Research Data Management: 76 Python: 64 Artificial Intelligence: 26 Neubias: 26 Nfdi4Bioimage: 23 Omero: 19 Fair-Principles: 16 Imagej: 16 Napari: 12 Workflow Engine: 12 Deep Learning: 9 Sharing: 7 Meta Data: 6 Bio-Image Analysis: 5 Licensing: 5 Microscopy Image Analysis: 5 Cellprofiler: 4 Bioinformatics: 3 Fiji: 3 Segmentation: 3 Teaching: 3 Citing: 2 Conda: 2 Data Protection: 2 ... Science Communication: 1 Workflow: 1 Zarr: 1 Zenodo: 1 Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

SeverusYixin commented 2 months ago

@haesleinhuepf Seems this is also finished.

haesleinhuepf commented 2 months ago

Not really. I'm still interested in getting this:

It might also be cool to have the tag statistics on our website, e.g. as a word cloud.

SeverusYixin commented 2 months ago

It looks like you want the introduction to the tag statistics to look like a word cloud. Am I right? 1

haesleinhuepf commented 1 month ago

Yes! git-bob please think about how to write python code for visualizing a word-cloud from a dictionary of python string:int pairs. The number represents how often the string appeared in our dataset and the word-cloud should show popular words accordingly.

haesleinhuepf commented 4 weeks ago

git-bob comment

github-actions[bot] commented 4 weeks ago

This message was generated by git-bob (version: 0.11.0, model: github_models:gpt-4o, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

To create a word cloud from a dictionary of tag counts, you can use the following Python code. Make sure to install the wordcloud library first by running pip install wordcloud.

from wordcloud import WordCloud
import matplotlib.pyplot as plt

# Dictionary of tag statistics
tag_stats = {
    'Bioimage Analysis': 131, 
    'Research Data Management': 76,
    'Python': 64,
    # Add the rest of your tags...
}

# Generate word cloud
wordcloud = WordCloud(width=800, height=400, background_color='white').generate_from_frequencies(tag_stats)

# Display the word cloud
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.show()

This code will generate and display a word cloud based on your tag statistics. You can integrate this into your GitHub workflow to automatically generate and update the word cloud with new data.

SeverusYixin commented 1 day ago

Also add it to the old Version