Skip to main content

Tool for analyzing and extracting insights from Facebook Messenger conversations

Project description

IMOJIFY

a python library that maps almost every emoji to its color image

it's used to get visual representation of emoji unicode

imojify can be used to solve the problem of plotting emojis as labels in python plotting libraries

Installation

    pip install imojify

Quickstart

Get emoji Image

from PIL import Image

from imojify import imojify

Image.open(imojify.get_img_path('😂'))

output

multiple emoji is also supported

from PIL import Image

from imojify import imojify

Image.open(imojify.get_img_path('😂😂😂😂'))

output

Plotting emojis in matplotlib

from imojify import imojify

from matplotlib import pyplot as plt 

from matplotlib.offsetbox import OffsetImage,AnnotationBbox

def offset_image(cords, emoji, ax):

    img = plt.imread(imojify.get_img_path(emoji))

    im = OffsetImage(img, zoom=0.08)

    im.image.axes = ax

    ab = AnnotationBbox(im, (cords[0], cords[1]),  frameon=False, pad=0)

    ax.add_artist(ab)







emjis = ['😂', '🤣', '😔', '😏','😍', '🥰', '😘']

values =[30, 50, 15, 29, 15, 50, 12]



fig, ax = plt.subplots(figsize=(12,8))

ax.bar(range(len(emjis)), values, width=0.5,align="center")

ax.set_xticks(range(len(emjis)))

ax.set_xticklabels([])

ax.tick_params(axis='x', which='major', pad=26)

ax.set_ylim((0, ax.get_ylim()[1]+10))



for i, e in enumerate(emjis):

    offset_image([i,values[i]+5], e, ax)

output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socialysis-0.0.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socialysis-0.0.0-py3-none-any.whl (4.3 MB view details)

Uploaded Python 3

File details

Details for the file socialysis-0.0.0.tar.gz.

File metadata

  • Download URL: socialysis-0.0.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for socialysis-0.0.0.tar.gz
Algorithm Hash digest
SHA256 68d76d4dd35921ca7c2afb3c1b2cd05c54056a9f1b974d3f64ad543cb160f861
MD5 d492e02d97aa3f86eaf74dfc35b8d1c6
BLAKE2b-256 cfbef981408c53795fc05ce207c51285ee78271a6903abafcde49d142dcf4f45

See more details on using hashes here.

File details

Details for the file socialysis-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: socialysis-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for socialysis-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be763ca70c6845dd0bf2af45516cd2bb4f3293eb46fc469d610ceb4e2dfb7e7c
MD5 c2263728c6595e391ab4b97774f934b6
BLAKE2b-256 ba04ddd0d5818ad20ac8a03d4e532864ed9a3d2025769b2b8798383484d12737

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page