{"id":21803794,"url":"https://github.com/smaranjitghose/tiktok_analytics","last_synced_at":"2025-10-09T12:05:02.132Z","repository":{"id":119391915,"uuid":"440628187","full_name":"smaranjitghose/TikTok_Analytics","owner":"smaranjitghose","description":"Real-Time TikTok Data Analytics on an interactive dashboard with python","archived":false,"fork":false,"pushed_at":"2021-12-21T20:19:44.000Z","size":80,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T20:04:21.303Z","etag":null,"topics":["dashboard","data-science","data-visualization","exploratory-data-analysis","heroku","plotly","python","python3","streamlit","tiktok","tiktok-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smaranjitghose.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-21T19:25:01.000Z","updated_at":"2025-07-15T11:59:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"785caed3-ad2d-45b2-8935-93d25ace3cc3","html_url":"https://github.com/smaranjitghose/TikTok_Analytics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smaranjitghose/TikTok_Analytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaranjitghose%2FTikTok_Analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaranjitghose%2FTikTok_Analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaranjitghose%2FTikTok_Analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaranjitghose%2FTikTok_Analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smaranjitghose","download_url":"https://codeload.github.com/smaranjitghose/TikTok_Analytics/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaranjitghose%2FTikTok_Analytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001441,"owners_count":26083078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","data-science","data-visualization","exploratory-data-analysis","heroku","plotly","python","python3","streamlit","tiktok","tiktok-api"],"created_at":"2024-11-27T11:51:11.365Z","updated_at":"2025-10-09T12:05:02.087Z","avatar_url":"https://github.com/smaranjitghose.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TikTok Analytics\n\nThis project is built to simulate a real world scenario where a market team of a company would require analytics data from TikTok to make decisions about penetrating the platform with it's presence.\n\n\n\u003e NOTE📌:\n\u003e\n\u003e This project was built using community maintained open source software and is intended only for educational purposes\n\n\n\n## Usage⚒️:\n\n\n## Project Workflow Timeline🏗️ :\n\n1. Analyse TikTok Platform\n  \n\u003e Insight: TikTok prevents automated scrapping natively by using signed requests\n\n2. Alternatives for getting data with least amount of resources (time and money):\n\n    - [Python TikTok API [Unofficial]](https://github.com/davidteather/TikTok-Api) ✅\n    - [Tik API](https://tikapi.io/)\n3. Creating virtual environment for project\n\n```\nconda create --name tiktok python=3.9\n```\n\n4. Activate virtual environment and install dependencies\n\n```\nconda activate tiktok\nconda install TikTokApi pandas streamlit\n```\n\n5. Create an empty directory and initialize it as a git repository\n\n```\nmkdir tiktok_analytics\ncd tiktok_analytics\ngit init\n```\n\n6. Get TikTok Cookie Data\n    1. Open Google Chrome (similar for Brave or Mozilla Firefox or Edge)\n    2. Visit [TikTok's website](https://www.tiktok.com/)\n    3. Inspect the Website [CTRL + Shift + I]\n    4. Click on the *Applications* tab\n    5. Move to the *Storage* section\n    6. Select *Cookies*\n    7. Copy the value for s_v_web_id\n\n7. Fetch Data using API\n\u003e Insight: Initialize API with test end points rather than production end points\n\n8. Store Raw Data as JSON\n\n9. Perform Exploratory Data Analysis on raw JSON data \n\n10. Write Scripts for [Pre-Processing](./src/process_data.py) Data\n\n11. Save Cleaned Data as Dataframe\n\n12. Build Basic [Dashboard](./app.py) [Use Streamlit]\n\n13. Make Visualizations: [Use Ploty]\n    - Top videos trending in the hashtag\n    - Top creators for the hastag\n    - Length of videos for the hastag\n    - Reach of videos for the hashtag\n\n14. Add Feature to get hashtag data in real time\n\n\u003e Insight: There is a conflict in the asynchronous functioning of streamlit and Tiktok API. \n\u003e Workaround: Instead of declaring a function to fetch and process the data, execute it in a separate script (Use subprocess)\n\n\n15. Create a requirements.txt file\n\n16. Make a remote repository on GitHub, Add Remote to local repository and push the commits to GitHub\n```\ngit remote add origin htttps://www.github.com/your_user_name/your_repo_name.git\ngit remote --verbose\ngit add .\ngit commit -m \"v1.0.0\"\ngit push origin master\n```\n\n\u003e It is assumed that you commited your changes progressively while building the project\n\n15. Create [shell script](./setup.sh) and [Procfile](./Procfile) to host dashboard on Heroku\n\n\u003e Install Heroku CLI if not done already\n\n16. Create an instance of Heroku Dyno, push the dashboard source, build and deploy it.\n\n17. Add Cronjonb\n\n18. Dockerize\n\n19. Test on Google Cloud Platform or AWS\n\n20. Build Documentation Website\n\n\n## Tech Stack\n\n\n## References\n\n## License 📜\n\n\n\n[\u003cp align = 'center'\u003e\u003cimg src = 'https://media.giphy.com/media/XfD8VJDUurgMjNEP72/giphy.gif' width = 40%\u003e\u003c/p\u003e](./LICENSE)\n\n\n## Code of Conduct\n\n\n## Contribution Guidelines🤝🏼:\n\nThe project owner warmly welcomes any:\n    - feature suggestions\n    - code quality improvements\n    - UI Enhancements\n    - Addition of Components to DevOps Pipeline\n    - Change in Documentation [Not Readme]\n    - Bug Fixes\n\n\n**Built with 💖 by [Smaranjit Ghose](www.github.com/smaranjitghose)**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmaranjitghose%2Ftiktok_analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmaranjitghose%2Ftiktok_analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmaranjitghose%2Ftiktok_analytics/lists"}