Random Sampling
Generate random samples from uploaded CSV or Excel files
The Random Sampling tool lets you upload a list of records (for example, a list of households or participants) and generate a randomly selected subset for field data collection or follow-up.
When to Use It
- When you need to select a random sample from a list of units
- When you want to create a shorter list for pilot testing
- When you need a reproducible random subset for follow-up surveys
How to Access This Page
Navigation path from the main app
- Log in to the application
- From the sidebar, navigate to Data → Random Sampling
- Or, directly navigate to
/data/samplingin your browser
Permissions or prerequisites
- You must be logged in to access this page
- You need the appropriate permissions (typically
response:exportor full access)
Page Layout
The page has two cards:
1. Upload File
- Drag and drop area or click to browse
- Supported formats:
.csv,.xlsx,.xls(up to 50 MB) - Shows the selected file name and size once uploaded
2. Configure Sample
- Sample Size: Enter the number of records to randomly select
- Output Format: Choose CSV, Excel, or JSON
- Generate Sample: Downloads the sampled file when ready
Step-by-Step: Generate a Random Sample
- Click the upload area or drag your CSV/Excel file into it
- Enter the Sample Size (number of rows to select)
- Select the Output Format (CSV, Excel, or JSON)
- Click Generate Sample
- The sampled file will download automatically when complete
Tips & Notes
- The sampling uses a fixed random seed for reproducibility (as noted in the UI)
- Make sure your file has column headers so the output remains readable
- If you get an error, check that the file format and size are valid
- Large files (up to 50 MB) are supported
