ySights Documentation
ySights is a Python library for analyzing data generated by YSocial . It provides tools for extracting insights from social media simulation data, including agent behaviors, content dynamics, network structures, and recommendation system effects.
Features
Data Models: Comprehensive data models for agents, posts, and simulation data
Network Analysis: Social network extraction and analysis capabilities
Algorithm Library: Profile analysis and recommendation metrics
Visualization Tools: Rich visualization functions for simulation insights
Sphinx Documentation: Complete API reference with examples
Quick Start
from ysights import YDataHandler
# Initialize data handler
ydh = YDataHandler('path/to/simulation.db')
# Get simulation time range
time_range = ydh.time_range()
print(f"Simulation: rounds {time_range['min_round']} to {time_range['max_round']}")
# Get all agents
agents = ydh.agents()
print(f"Total agents: {len(agents.get_agents())}")
# Extract social network
network = ydh.social_network()
print(f"Network: {network.number_of_nodes()} nodes, {network.number_of_edges()} edges")
Installation
pip install ysights
or from source:
git clone https://github.com/YSocialTwin/ysights.git
cd ysights
pip install -e .
Contents
Tutorials