chinese-social-data

Load and preprocess Chinese social science survey data into analysis-ready pandas DataFrames.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill chinese-social-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chinese-social-data
Source: https://github.com/Yuuqq/claude-social-science-skills/tree/main/social-science-skills/chinese-social-data
Command: npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill chinese-social-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, jieba, requests, time, re, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

It removes friction in finding, loading, cleaning, harmonizing, and preparing Chinese social science data so you can move from raw files to analysis-ready datasets quickly.

Core Features & Use Cases

  • Survey dataset access & loading: Handles common Chinese survey microdata formats (Stata/SPSS/SAS) and typical encoding issues.
  • Cleaning & harmonization workflows: Converts survey-specific missing-value codes to standard missing values and harmonizes variables across waves (e.g., CGSS).
  • China-specific administrative and text workflows: Supports administrative division code parsing (GB/T 2260) and Chinese text preprocessing (jieba segmentation, stopwords, term dictionary).
  • Social media collection & privacy guardrails: Provides a research-oriented approach for collecting and cleaning social media text while emphasizing PIPL compliance and de-identification.

Quick Start

Load your CGSS or CFPS dataset file, clean its missing-value codes, harmonize key variables across waves, and output an analysis-ready pandas DataFrame for downstream modeling.

Frequently Asked Questions about chinese-social-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load and clean Chinese social survey data like CGSS or CFPS in Python?

To load and clean Chinese social survey data, you can use automated preprocessing workflows that handle Stata, SPSS, and SAS formats, resolve typical encoding issues, and convert survey-specific missing-value codes into standard pandas DataFrame missing values.

What is the best way to harmonize variables across multiple waves of CHARLS or CGSS datasets?

Variable harmonization across dataset waves involves standardizing differing variable names and coding schemes into a unified format, producing an analysis-ready pandas DataFrame that ensures consistent longitudinal tracking for downstream modeling.

How do I parse Chinese administrative division codes (GB/T 2260) for regional data analysis?

Parsing Chinese administrative division codes involves mapping GB/T 2260 numeric codes to their corresponding provincial, municipal, and county-level names using Python, enabling accurate geographic joins for social science research datasets.

Can I preprocess Chinese social media text for research using jieba segmentation and stopwords?

Yes, Chinese social media text preprocessing applies jieba segmentation, stopword removal, and custom term dictionaries to clean raw text data while emphasizing PIPL compliance and de-identification for research-oriented collection workflows.

Does this data preprocessing workflow support ingesting proprietary formats like Stata and SPSS?

Yes, the data preprocessing workflow supports ingesting proprietary formats like Stata, SPSS, and SAS by reading them directly into Python, bypassing manual export steps and resolving encoding conflicts natively to output clean DataFrames.

Why do Chinese survey datasets have non-standard missing values and how are they normalized?

Chinese survey datasets use non-standard missing values like -1 or -2 to denote refusals or inapplicable responses, which are normalized by programmatically replacing these specific codes with standard NaN values for reproducible analysis.