Skip to main content

Library for TikTok graph analysis

Project description

Whichtok

Contributor Covenant

Whichtok is a library to construct social graphs from TikTok data. The library is currently a WIP, and contributions are greatly appreciated.

Installation

Install Whichtok and its dependencies with the package manager pip:

pip3 install whichtok TikTokApi python-igraph cairocffi

Whichtok uses TikTok-Api to scrape video and user data from TikTok and igraph for graph construction and manipulation. cairocffi is a dependency of igraph necessary for graph visualizations.

Why Whichtok?

Social media platforms such as Instagram and Twitter match people to content using a social graph. Users follow other users to view and interact with their posts and may adjust who follow to tailor their feed to their interests. Unlike other platforms, however, TikTok matches content to users using an interest graph.

TikTok does allow users to follow other users, but its primary feature is not a following feed. Instead, TikTok uses its For You page to learn what content users are interested in and deliver similar content to user feeds. Through the For You page, TikTok constructs an interest graph without ever requiring explicit user direction. The algorithm is trained using signals such as whether a user likes a video or how much time a user spends watching it before swiping to the next one. The longer a user spends on TikTok, the more personalized the algorithm’s recommendations become, as the algorithm literally responds to the desires of their subconscious. Eugene Wei describes the effects of the TikTok For You page in more detail in this blog post.

TikTok is able to pinpoint user preferences and deliver relevant content with such precision and accuracy that its algorithm has gained an air of mystique (compounded by a lack of popular understanding of its inner workings and lack of clarity and transparency on the part of TikTok—see shadowbanning practices that have recently come to light). Anyhow, TikTok's unique FYP has won the app a massive following, and it is home to many subcultures or niches, entered via the FYP and governed by its influence. All fall under the umbrella term ‘alt TikTok’ and even prize themselves as obscure, oddly specific, and even elusive.

Whichtok enables developers to examine such communities. By constructing and analyzing social graphs from user interactions, we can begin to ask questions like how does a social media platform based on interests group people into subcultures? What niches exist? To what extent does TikTok isolate different communities? How do users from different communities interact? What does ‘membership’ in different communities look like? Does TikTok’s partitioning of users into subcultures limit and constrict discourse or simply help people find a shared space?

How does it work?

Whichtok scrapes data from TikTok users and constructs a corresponding graph. Graph functionalities are still under development, but each user will be represented as a node. The weight of an edge between two users will be determined by the amount that the users interact with each other and the amount that they interact with the same or similar content (approximating the extent to which they ‘share space’ on TikTok). Applying network analysis algorithms to this social graph can allow us to investigate TikTok’s social landscape.

Contributions

CONTRIBUTING.md contains contribution guidelines and the tasks and features which I'm currently working on.

License

MIT

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

whichtok-0.0.3.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

whichtok-0.0.3-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file whichtok-0.0.3.tar.gz.

File metadata

  • Download URL: whichtok-0.0.3.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for whichtok-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f11dac7cbdcd1a89efef6e9543dbf48a9d6f94ed2908e38807b36c35eac2550a
MD5 852e27b44d95837a28408655f7c78fa0
BLAKE2b-256 335bd2d06184fb8748c4f8156c00c4168537eae4584d72049ced66dfe5656eea

See more details on using hashes here.

File details

Details for the file whichtok-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: whichtok-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for whichtok-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f903ee034a4b0d7f21a67f2a477a041e4c34769bc2d86ceae22d8cec001e927a
MD5 a65e58d254e02639574d6091a2996736
BLAKE2b-256 37595cd53881d4f6fd22b7e4995aa542a9179335e9bccf007a72cb4d737699e7

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