Shiny application for processing and donating social media platform data
| .gitignore | ||
| .Rbuildignore | ||
| app.R | ||
| backend.R | ||
| dd-shiny.Rproj | ||
| file_input_area.R | ||
| LICENSE.md | ||
| messages_de.R | ||
| messages_en.R | ||
| README.md | ||
| thankyou.md | ||
| thankyou_de.md | ||
| welcome.md | ||
| welcome_de.md | ||
Platform Data Donation App
A Shiny application for processing and donating social media platform data with selective activity controls and anonymous user identification.
Features
- Selective Donation: Choose which activity types to donate via checkboxes
- Anonymous User ID: Automatically generated from file hash (overrideable via URL)
- Multiple Data Types: Processes video browsing, search history, likes, and comments
- Data Preview: Collapsible sections showing sample data before donation
- Privacy-focused: All data saved anonymously with configurable user IDs
Installation
# Install required packages
install.packages(c("shiny", "bslib", "markdown", "shinyjs", "tidyverse"))
# Run the app
shiny::runApp()
Usage
- Upload: Drop your TikTok JSON file in the file input area
- Review: Browse the available data types in the "Select Data" tab
- Select: Check/uncheck activities you want to donate
- Donate: Click "Donate Selected Data" to save your contribution
User ID System
- Default: Generated from file hash (10-character anonymous ID)
- Override: Use
?id=YOUR_IDURL parameter to specify custom ID - Format: Files saved as
data/{user_id}_activities.tsv
File Requirements
- TikTok JSON export files
- Use
jq 'paths as $p | getpath($p) | select(type == "array" and length > 0) | ($p | join("."))' user_data.jsonto get the currently valid field names.
Output
Data is saved in TSV format with the following structure:
timestamp: Activity timestampactivity: Activity type namecontent_id: Content identifier (when applicable)- Additional fields specific to each activity type
Privacy & Security
- Files are processed locally in the browser
- User IDs are anonymized hashes, not personal information
- Data is only saved upon explicit user consent
- No external connections or third-party services
Development
# For development with hot reload
shiny::runApp(reload = TRUE)
# Test with custom user ID
# Navigate to: http://localhost:8000/?id=test_user_123
License
License: MIT. Developed by the Computational Communication Research Group, JGU Mainz.