Emojis are the easiest way to show emotion through text. We all use them very often.
Have you ever wondered which emojis are most commonly used on HIVE? I did. As a small weekend project i decided to find that out.
At first,i needed a dataset in order to start analysis. I got latest 100k content from hivemind with the query below and saved into a csv.
SELECT body from hive_posts_cache ORDER BY post_id desc LIMIT 100000;
Dataset consist of mixed posts+comments.
This small piece of python script does the job:
import operator
import csv
import emoji
def extract_emojis(s):
return ''.join(c for c in s if c in emoji.UNICODE_EMOJI)
with open('data.csv', 'r') as file:
content = file.read()
emojis = extract_emojis(content)
group = {}
total = 0
for e in emojis:
total += 1
if e in group:
group[e] += 1
else:
group[e] =1
sorted_group = sorted(group.items(), key=operator.itemgetter(1), reverse=True)
print('Total: {}'.format(total))
print("""
| Emoji | Name | Count | Percent |
| -------- | -------- | -------- | -------- |""")
for i in sorted_group[0:40]:
[em, count] = i
name = emoji.demojize(em).replace(':', '')
perc = 100 * count/total
print('|{} | {} | {} | {}% |'.format(em, name, count, '{:.2f}'.format(perc)))
20,127 emojis matched in total.
Here is list of the most used 40 emojis:
Emoji | Name | Count | Percent |
---|---|---|---|
👍 | thumbs_up | 1554 | 7.72% |
😊 | smiling_face_with_smiling_eyes | 1316 | 6.54% |
😂 | face_with_tears_of_joy | 1041 | 5.17% |
😉 | winking_face | 858 | 4.26% |
😁 | beaming_face_with_smiling_eyes | 797 | 3.96% |
🙂 | slightly_smiling_face | 753 | 3.74% |
😍 | smiling_face_with_heart-eyes | 752 | 3.74% |
❤ | red_heart | 749 | 3.72% |
😀 | grinning_face | 652 | 3.24% |
🤣 | rolling_on_the_floor_laughing | 583 | 2.90% |
🤗 | hugging_face | 561 | 2.79% |
🎉 | party_popper | 419 | 2.08% |
🙏 | folded_hands | 408 | 2.03% |
🥳 | partying_face | 363 | 1.80% |
🍍 | pineapple | 327 | 1.62% |
😎 | smiling_face_with_sunglasses | 301 | 1.50% |
😅 | grinning_face_with_sweat | 295 | 1.47% |
😄 | grinning_face_with_smiling_eyes | 251 | 1.25% |
😘 | face_blowing_a_kiss | 249 | 1.24% |
👏 | clapping_hands | 248 | 1.23% |
👌 | OK_hand | 229 | 1.14% |
🥰 | smiling_face_with_3_hearts | 221 | 1.10% |
👋 | waving_hand | 205 | 1.02% |
💕 | two_hearts | 198 | 0.98% |
♥ | heart_suit | 194 | 0.96% |
😃 | grinning_face_with_big_eyes | 193 | 0.96% |
✅ | white_heavy_check_mark | 191 | 0.95% |
🍻 | clinking_beer_mugs | 166 | 0.82% |
🏼 | medium_light_skin_tone | 158 | 0.79% |
☺ | smiling_face | 147 | 0.73% |
😆 | grinning_squinting_face | 144 | 0.72% |
📸 | camera_with_flash | 139 | 0.69% |
💪 | flexed_biceps | 139 | 0.69% |
🌺 | hibiscus | 138 | 0.69% |
✌ | victory_hand | 135 | 0.67% |
🔥 | fire | 131 | 0.65% |
🤙 | call_me_hand | 128 | 0.64% |
💖 | sparkling_heart | 115 | 0.57% |
🙌 | raising_hands | 115 | 0.57% |
💥 | collision | 114 | 0.57% |
According to the results, i can say that generally positive content is published on HIVE.
You can find source code here.
Hive on!