Dummy Dataset Generation
Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Creates executable scripts or direct data files for immediate use.
Use when: Creating test data, generating sample datasets, building realistic mock data for development, or populating test environments.
Arguments:
$PRODUCT: The product or system name
$DATASET_TYPE: Type of data (e.g., customer feedback, transactions, user profiles)
$ROWS: Number of rows to generate (default: 100)
$COLUMNS: Specific columns or fields to include
$FORMAT: Output format (CSV, JSON, SQL, Python script)
$CONSTRAINTS: Additional constraints or business rules
Step-by-Step Process
- Identify dataset type - Understand the data domain
- Define column specifications - Names, data types, and value ranges
- Determine row count - How many sample records needed
- Select output format - CSV, JSON, SQL INSERT, or Python script
- Apply realistic patterns - Ensure data looks authentic and valid
- Add business constraints - Respect business logic and relationships
- Generate or script data - Create executable output
- Validate output - Ensure data quality and completeness
Template: Python Script Output
import csv
import json
from datetime import datetime, timedelta
import random
# Configuration
ROWS = $ROWS
FILENAME = "$DATASET_TYPE.csv"
# Column definitions with realistic value generators
columns = {
"id": "auto-increment",
"name": "first_last_name",
"email": "email",
"created_at": "timestamp",
# Add more columns...
}
def generate_dataset():
"""Generate realistic dummy dataset"""
data = []
for i in range(1, ROWS + 1):
record = {
"id": f"U{i:06d}",
# Generate values based on column definitions
}
data.append(record)
return data
def save_as_csv(data, filename):
"""Save dataset as CSV"""
with open(filename, 'w', newline='') as f:
writer = csv.DictWriter(f, fieldnames=data[0].keys())
writer.writeheader()
writer.writerows(data)
if __name__ == "__main__":
dataset = generate_dataset()
save_as_csv(dataset, FILENAME)
print(f"Generated {len(dataset)} records in {FILENAME}")
Example Dataset Specification
Dataset Type: Customer Feedback
Columns:
- feedback_id (auto-increment, U001, U002...)
- customer_name (realistic names)
- email (valid email format)
- feedback_date (dates last 90 days)
- rating (1-5 stars)
- category (Bug, Feature Request, Complaint, Praise)
- text (realistic feedback)
- product (electronics, clothing, home)
Constraints:
- Ratings skewed: 40% 5-star, 30% 4-star, 20% 3-star, 10% 1-2 star
- Bug category only with ratings 1-3
- Feature requests only with ratings 3-5
- Email domains realistic (gmail, yahoo, company.com)
Output Deliverables
- Ready-to-execute Python script OR direct data file
- CSV file with proper headers and formatting
- JSON file with valid structure and types
- SQL INSERT statements for database population
- Data validation and constraint compliance
- Realistic, business-appropriate values
- Documentation of data generation logic
- Quick-start instructions for using the dataset
Output Formats
CSV: Flat tabular format, easy to import into spreadsheets and databases
JSON: Nested structure, ideal for APIs and NoSQL databases
SQL: INSERT statements, directly executable on relational databases
Python Script: Executable generator for custom or large datasets
Source: phuryn/pm-skills → pm-execution/skills/dummy-dataset/SKILL.md
1---
2name: dummy-dataset
3description: "Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos."
4category: data-science-and-ml
5source_repo: phuryn/pm-skills
6source_path: "pm-execution/skills/dummy-dataset/SKILL.md"
7source_url: https://github.com/phuryn/pm-skills/blob/HEAD/pm-execution/skills/dummy-dataset/SKILL.md
8metadata:
9 source: https://skillmd.com/skills/thedixitjain/dummy-dataset
10---
11
12# Dummy Dataset Generation
13
14Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Creates executable scripts or direct data files for immediate use.
15
16**Use when:** Creating test data, generating sample datasets, building realistic mock data for development, or populating test environments.
17
18**Arguments:**
19- `$PRODUCT`: The product or system name
20- `$DATASET_TYPE`: Type of data (e.g., customer feedback, transactions, user profiles)
21- `$ROWS`: Number of rows to generate (default: 100)
22- `$COLUMNS`: Specific columns or fields to include
23- `$FORMAT`: Output format (CSV, JSON, SQL, Python script)
24- `$CONSTRAINTS`: Additional constraints or business rules
25
26## Step-by-Step Process
27
281. **Identify dataset type** - Understand the data domain
292. **Define column specifications** - Names, data types, and value ranges
303. **Determine row count** - How many sample records needed
314. **Select output format** - CSV, JSON, SQL INSERT, or Python script
325. **Apply realistic patterns** - Ensure data looks authentic and valid
336. **Add business constraints** - Respect business logic and relationships
347. **Generate or script data** - Create executable output
358. **Validate output** - Ensure data quality and completeness
36
37## Template: Python Script Output
38
39```python
40import csv
41import json
42from datetime import datetime, timedelta
43import random
44
45# Configuration
46ROWS = $ROWS
47FILENAME = "$DATASET_TYPE.csv"
48
49# Column definitions with realistic value generators
50columns = {
51 "id": "auto-increment",
52 "name": "first_last_name",
53 "email": "email",
54 "created_at": "timestamp",
55 # Add more columns...
56}
57
58def generate_dataset():
59 """Generate realistic dummy dataset"""
60 data = []
61 for i in range(1, ROWS + 1):
62 record = {
63 "id": f"U{i:06d}",
64 # Generate values based on column definitions
65 }
66 data.append(record)
67 return data
68
69def save_as_csv(data, filename):
70 """Save dataset as CSV"""
71 with open(filename, 'w', newline='') as f:
72 writer = csv.DictWriter(f, fieldnames=data[0].keys())
73 writer.writeheader()
74 writer.writerows(data)
75
76if __name__ == "__main__":
77 dataset = generate_dataset()
78 save_as_csv(dataset, FILENAME)
79 print(f"Generated {len(dataset)} records in {FILENAME}")
80```
81
82## Example Dataset Specification
83
84**Dataset Type:** Customer Feedback
85
86**Columns:**
87- feedback_id (auto-increment, U001, U002...)
88- customer_name (realistic names)
89- email (valid email format)
90- feedback_date (dates last 90 days)
91- rating (1-5 stars)
92- category (Bug, Feature Request, Complaint, Praise)
93- text (realistic feedback)
94- product (electronics, clothing, home)
95
96**Constraints:**
97- Ratings skewed: 40% 5-star, 30% 4-star, 20% 3-star, 10% 1-2 star
98- Bug category only with ratings 1-3
99- Feature requests only with ratings 3-5
100- Email domains realistic (gmail, yahoo, company.com)
101
102## Output Deliverables
103
104- Ready-to-execute Python script OR direct data file
105- CSV file with proper headers and formatting
106- JSON file with valid structure and types
107- SQL INSERT statements for database population
108- Data validation and constraint compliance
109- Realistic, business-appropriate values
110- Documentation of data generation logic
111- Quick-start instructions for using the dataset
112
113## Output Formats
114
115**CSV:** Flat tabular format, easy to import into spreadsheets and databases
116
117**JSON:** Nested structure, ideal for APIs and NoSQL databases
118
119**SQL:** INSERT statements, directly executable on relational databases
120
121**Python Script:** Executable generator for custom or large datasets
122
123---
124
125**Source:** [`phuryn/pm-skills`](https://github.com/phuryn/pm-skills) → `pm-execution/skills/dummy-dataset/SKILL.md`