mirror of
https://github.com/hanzoai/skills.git
synced 2026-11-19 00:47:36 +00:00
hanzoskills.com/llms.txt now opens with the install line, the API reference index and the company index, so an agent that lands on any one of the three can find the rest. robots.txt claimed 537 documents while llms.txt counts 920. The number is gone from robots.txt; llms.txt derives it. public/ is regenerated from scripts/site.py, which it had fallen behind: the copy-prompt menu and agent bar were in the generator and not in the committed pages. tests/site.mjs passes against the result. Co-authored-by: Hanzo Dev <[email protected]>
917 lines
40 KiB
HTML
917 lines
40 KiB
HTML
<!doctype html>
|
|
<html lang="en"><head>
|
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>research-data-collection</title>
|
|
<meta name="color-scheme" content="dark">
|
|
<style>
|
|
/* Committed to one visual world: a dark instrument panel. No light variant —
|
|
the dot field and the hairline rules only read on black, and a naive
|
|
inversion would wash both out. Every colour is painted explicitly so the page
|
|
never borrows a host background. */
|
|
@font-face{font-family:'Zen';src:url('/fonts/Zen-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
|
|
@font-face{font-family:'Zen';src:url('/fonts/Zen-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
|
|
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
|
|
@font-face{font-family:'Zen Mono';src:url('/fonts/ZenMono-Italic-Variable.woff2') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
|
|
@font-face{font-family:'Zen Pixel Square';src:url('/fonts/ZenPixel-Square.woff2') format('woff2');font-style:normal;font-display:swap}
|
|
|
|
:root{
|
|
--ink:#f4f4f2; --soft:#9c9c98; --faint:#6a6a66; --ground:#000; --panel:#0a0a0a;
|
|
--line:#232323; --line-hi:#3a3a3a; --accent:#f4f4f2;
|
|
--font-zen-sans:'Zen',-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
|
|
--font-zen-mono:'Zen Mono',ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace;
|
|
--font-zen-pixel-square:'Zen Pixel Square',monospace;
|
|
--mono:var(--font-zen-mono);
|
|
--sans:var(--font-zen-sans);
|
|
/* Controls are pills and surfaces are soft, as on hanzo.ai. */
|
|
--r:999px; --r-soft:14px;
|
|
}
|
|
*{box-sizing:border-box}
|
|
html{-webkit-text-size-adjust:100%}
|
|
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--sans);
|
|
font-size:16px;line-height:1.65;-webkit-font-smoothing:antialiased}
|
|
.wrap{max-width:60rem;margin:0 auto;padding:0 1.75rem}
|
|
|
|
/* The dot field. A halftone made of one repeating radial-gradient, faded out
|
|
along the diagonal by a mask so it reads as a wave rather than wallpaper. */
|
|
/* No overflow clip here: the dot field is inset to the box already, and a clip
|
|
would cut off the copy-prompt menu. */
|
|
.hero{position:relative;border-bottom:1px solid var(--line)}
|
|
.hero::before{content:"";position:absolute;inset:0;
|
|
background-image:radial-gradient(var(--line-hi) 1px, transparent 1px);
|
|
background-size:7px 7px;
|
|
-webkit-mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
|
|
mask-image:linear-gradient(115deg,#000 0%,rgba(0,0,0,.55) 38%,transparent 72%);
|
|
pointer-events:none}
|
|
.hero .wrap{position:relative;padding-top:5.5rem;padding-bottom:4rem}
|
|
|
|
nav{border-bottom:1px solid var(--line)}
|
|
nav .in{max-width:60rem;margin:0 auto;padding:1.1rem 1.75rem;display:flex;
|
|
justify-content:space-between;align-items:center;gap:1rem}
|
|
.brand{font-family:var(--mono);font-size:.85rem;letter-spacing:.14em;
|
|
text-transform:uppercase;color:var(--ink);text-decoration:none;
|
|
display:inline-flex;align-items:center;gap:.6rem}
|
|
.brand i{font-style:normal;color:var(--faint)}
|
|
.mark{width:1.15em;height:1.15em;display:block;flex:0 0 auto}
|
|
nav a.up{font-family:var(--mono);font-size:.72rem;letter-spacing:.14em;
|
|
text-transform:uppercase;color:var(--soft);text-decoration:none}
|
|
nav a.up:hover{color:var(--ink)}
|
|
|
|
h1{font-family:var(--mono);font-size:clamp(2rem,5.4vw,3.4rem);line-height:1.12;
|
|
letter-spacing:-.02em;margin:0 0 1.1rem;font-weight:500;text-wrap:balance}
|
|
h1 em{font-style:normal;color:var(--faint)}
|
|
.lede{color:var(--soft);font-size:1.05rem;max-width:52ch;margin:0 0 2.25rem}
|
|
|
|
.btns{display:flex;flex-wrap:wrap;gap:.7rem;margin:0 0 .5rem;align-items:center}
|
|
.btn{display:inline-flex;align-items:center;gap:.5rem;font-family:var(--mono);
|
|
font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
|
|
padding:.8rem 1.4rem;border:1px solid var(--line-hi);border-radius:var(--r);
|
|
color:var(--ink);text-decoration:none;background:transparent;cursor:pointer;
|
|
line-height:1.2;font-weight:400}
|
|
.btn:hover{background:#141414;text-decoration:none;border-color:var(--soft)}
|
|
.btn.solid{background:var(--ink);color:#000;border-color:var(--ink)}
|
|
.btn.solid:hover{background:#d8d8d4}
|
|
.btn .chev{width:.7em;height:.7em;flex:0 0 auto;transition:transform .15s ease}
|
|
.btn[aria-expanded="true"] .chev{transform:rotate(180deg)}
|
|
|
|
/* Copy-prompt selector. Each row copies the prompt for its own target. */
|
|
.copy{position:relative;display:inline-flex}
|
|
.menu{position:absolute;top:calc(100% + .5rem);left:0;z-index:20;min-width:21rem;
|
|
background:var(--panel);border:1px solid var(--line-hi);border-radius:var(--r-soft);
|
|
padding:.4rem;display:flex;flex-direction:column;
|
|
box-shadow:0 12px 32px rgba(0,0,0,.75)}
|
|
.menu[hidden]{display:none}
|
|
.mi{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;
|
|
padding:.62rem .8rem;border:0;border-radius:calc(var(--r-soft) - .35rem);
|
|
background:transparent;color:var(--ink);font-family:var(--mono);font-size:.76rem;
|
|
letter-spacing:.04em;text-decoration:none;cursor:pointer;line-height:1.3;
|
|
white-space:nowrap}
|
|
.mi:hover,.mi:focus-visible{background:#181818;outline:none}
|
|
.mi .mark{width:1.05rem;height:1.05rem;color:var(--soft)}
|
|
.mi:hover .mark{color:var(--ink)}
|
|
.mi u{margin-left:auto;color:var(--faint);text-decoration:none;font-size:.68rem;
|
|
letter-spacing:.1em;text-transform:uppercase}
|
|
|
|
/* Works-with bar: one scrolling row, name and mark per agent. */
|
|
.strip{border-bottom:1px solid var(--line);background:var(--panel)}
|
|
.strip .in{max-width:60rem;margin:0 auto;padding:.9rem 1.75rem;display:flex;
|
|
align-items:center;gap:1.25rem;font-family:var(--mono);font-size:.72rem;
|
|
letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
|
|
.strip b{color:var(--soft);font-weight:400;flex:0 0 auto;
|
|
border-right:1px solid var(--line);padding-right:1.25rem;align-self:stretch;
|
|
display:flex;align-items:center}
|
|
.bar{display:flex;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0;
|
|
overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;
|
|
-webkit-overflow-scrolling:touch;
|
|
-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent);
|
|
mask-image:linear-gradient(90deg,#000 calc(100% - 3rem),transparent)}
|
|
.bar::-webkit-scrollbar{display:none}
|
|
.agent{display:inline-flex;align-items:center;gap:.45rem;flex:0 0 auto;
|
|
padding:.4rem .85rem;border:1px solid var(--line);border-radius:var(--r);
|
|
color:var(--soft);white-space:nowrap;scroll-snap-align:start;
|
|
text-decoration:none;background:var(--ground)}
|
|
.agent:hover{color:var(--ink);border-color:var(--line-hi);text-decoration:none}
|
|
.agent .mark{width:.95rem;height:.95rem}
|
|
|
|
h2{font-family:var(--mono);font-size:1.1rem;letter-spacing:-.01em;margin:2.75rem 0 .75rem;font-weight:500}
|
|
h3{font-size:1rem;margin:2rem 0 .5rem;font-weight:600}
|
|
h4,h5,h6{font-size:.94rem;margin:1.5rem 0 .5rem;font-weight:600}
|
|
p{margin:0 0 1rem;max-width:70ch}
|
|
ul,ol{margin:0 0 1rem;padding-left:1.35rem;max-width:70ch}
|
|
li{margin:.22rem 0}
|
|
a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;
|
|
text-decoration-color:var(--line-hi)}
|
|
a:hover{text-decoration-color:var(--ink)}
|
|
a:focus-visible{outline:1px solid var(--ink);outline-offset:3px}
|
|
code{font-family:var(--mono);font-size:.85em;background:var(--panel);
|
|
border:1px solid var(--line);border-radius:5px;padding:.1em .36em}
|
|
pre{background:var(--panel);border:1px solid var(--line);padding:1rem 1.1rem;
|
|
border-radius:var(--r-soft);overflow-x:auto;margin:0 0 1.25rem}
|
|
pre code{background:none;border:0;padding:0;font-size:.82rem;line-height:1.7}
|
|
blockquote{margin:0 0 1rem;padding-left:1rem;border-left:1px solid var(--line-hi);color:var(--soft)}
|
|
hr{border:0;border-top:1px solid var(--line);margin:2.5rem 0}
|
|
table{border-collapse:collapse;width:100%;margin:0 0 1.25rem;font-size:.92rem;
|
|
display:block;overflow-x:auto}
|
|
th,td{border:1px solid var(--line);padding:.5rem .7rem;text-align:left}
|
|
|
|
.curl{display:block;background:var(--panel);border:1px solid var(--line);
|
|
border-radius:var(--r-soft);padding:.95rem 1.1rem;font-family:var(--mono);
|
|
font-size:.8rem;color:var(--soft);overflow-x:auto;margin:0 0 2.5rem;
|
|
white-space:pre;line-height:1.9}
|
|
.curl b{color:var(--ink);font-weight:400}
|
|
.curl i{font-style:normal;color:var(--faint)}
|
|
|
|
/* index */
|
|
#q{width:100%;padding:.85rem 1.2rem;font-family:var(--mono);font-size:.85rem;color:var(--ink);
|
|
background:var(--panel);border:1px solid var(--line);border-radius:var(--r);margin:0 0 .6rem}
|
|
#q::placeholder{color:var(--faint);text-transform:uppercase;letter-spacing:.1em;font-size:.72rem}
|
|
#q:focus{outline:none;border-color:var(--soft)}
|
|
#count{color:var(--faint);font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;
|
|
text-transform:uppercase;margin:0 0 2rem}
|
|
.cat{margin:2.5rem 0 .5rem;font-family:var(--mono);font-size:.7rem;letter-spacing:.16em;
|
|
text-transform:uppercase;color:var(--faint);border-bottom:1px solid var(--line);
|
|
padding-bottom:.45rem}
|
|
.row{display:block;padding:.6rem .9rem;margin:0 -.9rem;border-bottom:1px solid var(--line);
|
|
border-radius:var(--r-soft);text-decoration:none}
|
|
.row:hover{background:#0a0a0a}
|
|
.nm{font-family:var(--mono);font-size:.84rem;color:var(--ink);display:block}
|
|
.ds{color:var(--soft);font-size:.9rem;display:block;margin-top:.12rem}
|
|
footer{margin-top:4rem;padding:2rem 0 4rem;border-top:1px solid var(--line);
|
|
color:var(--faint);font-size:.85rem}
|
|
footer a{color:var(--soft)}
|
|
.fmap{display:grid;gap:1.75rem;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));
|
|
margin:0 0 2rem;font-size:.85rem}
|
|
.fmap b{display:block;font-family:var(--mono);font-size:.68rem;letter-spacing:.16em;
|
|
text-transform:uppercase;color:var(--faint);font-weight:400;margin:0 0 .6rem;
|
|
border-bottom:1px solid var(--line);padding-bottom:.4rem}
|
|
.fmap a{display:inline-block;color:var(--ink);text-decoration:none;margin:.3rem .35rem 0 0}
|
|
.fmap a:hover{text-decoration:underline}
|
|
.fmap div{color:var(--faint);line-height:1.5}
|
|
.fend{border-top:1px solid var(--line);padding-top:1.25rem;font-size:.82rem}
|
|
|
|
@media (max-width:640px){
|
|
.hero .wrap{padding-top:3.25rem;padding-bottom:2.75rem}
|
|
.btns{gap:.5rem}
|
|
.btn{padding:.75rem 1.15rem;font-size:.68rem}
|
|
.copy,.copy .btn{width:100%;justify-content:center}
|
|
.menu{left:0;right:0;min-width:0}
|
|
.strip .in{flex-direction:column;align-items:flex-start;gap:.6rem;padding:.9rem 1.75rem}
|
|
.strip b{border-right:0;padding-right:0}
|
|
.bar{width:100%}
|
|
}
|
|
</style>
|
|
<link rel="alternate" type="text/markdown" href="/research-data-collection.md">
|
|
|
|
<link rel="icon" href="/favicon.svg">
|
|
<link rel="canonical" href="https://hanzoskills.com/research-data-collection">
|
|
</head>
|
|
<!-- Reading this with a machine? Every page here is also plain markdown.
|
|
This one: https://hanzoskills.com/research-data-collection.md
|
|
Index: https://hanzoskills.com/llms.txt
|
|
Corpus: https://hanzoskills.com/all.md
|
|
Append .md to any path for the markdown twin. -->
|
|
<body>
|
|
<nav><div class="in">
|
|
<a class="brand" href="/"><svg class="mark" viewBox="0 0 67 67" fill="currentColor" aria-hidden="true"><path d="M22.21 67V44.6369H0V67H22.21Z"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/><path d="M22.21 0H0V22.3184H22.21V0Z"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/></svg> HANZO<i>SKILLS</i></a>
|
|
<a class="up" href="/">All skills</a>
|
|
</div></nav>
|
|
|
|
<div class="wrap">
|
|
<h1>research-data-collection</h1><p class="lede">Master data collection methods including survey design, interview protocols, observation techniques, and measurement instruments</p><h1>Data Collection Skill</h1>
|
|
<h2>When to Use This Skill</h2>
|
|
<p>Use this skill when you need to:</p>
|
|
<ul><li>Design surveys and questionnaires</li><li>Create interview protocols</li><li>Plan observation studies</li><li>Develop measurement instruments</li><li>Ensure data quality</li><li>Train data collectors</li><li>Manage fieldwork</li><li>Handle missing data and errors</li></ul>
|
|
<h2>Core Collection Methods</h2>
|
|
<h3>1. Survey Design</h3>
|
|
<p><strong>Survey Construction Framework</strong>:</p>
|
|
<pre><code class="lang-python">from dataclasses import dataclass
|
|
from typing import List, Optional, Dict
|
|
from enum import Enum
|
|
|
|
class QuestionType(Enum):
|
|
LIKERT = "likert"
|
|
MULTIPLE_CHOICE = "multiple_choice"
|
|
OPEN_ENDED = "open_ended"
|
|
RANKING = "ranking"
|
|
SEMANTIC_DIFFERENTIAL = "semantic_differential"
|
|
MATRIX = "matrix"
|
|
|
|
@dataclass
|
|
class SurveyQuestion:
|
|
"""Define a survey question"""
|
|
id: str
|
|
text: str
|
|
type: QuestionType
|
|
required: bool
|
|
options: Optional[List[str]] = None
|
|
scale_range: Optional[tuple] = None
|
|
scale_labels: Optional[Dict[int, str]] = None
|
|
validation: Optional[str] = None
|
|
skip_logic: Optional[Dict] = None
|
|
|
|
class SurveyInstrument:
|
|
"""Build and validate survey instrument"""
|
|
|
|
def __init__(self, title: str, instructions: str):
|
|
self.title = title
|
|
self.instructions = instructions
|
|
self.sections = {}
|
|
self.current_section = None
|
|
|
|
def add_section(self, section_name: str, description: str):
|
|
"""Add survey section"""
|
|
self.sections[section_name] = {
|
|
'description': description,
|
|
'questions': []
|
|
}
|
|
self.current_section = section_name
|
|
|
|
def add_question(self, question: SurveyQuestion):
|
|
"""Add question to current section"""
|
|
if self.current_section is None:
|
|
raise ValueError("Must create section before adding questions")
|
|
self.sections[self.current_section]['questions'].append(question)
|
|
|
|
def validate_survey(self):
|
|
"""Check survey for common issues"""
|
|
issues = []
|
|
|
|
for section_name, section in self.sections.items():
|
|
questions = section['questions']
|
|
|
|
# Check question count
|
|
if len(questions) > 20:
|
|
issues.append(f"Section '{section_name}' has {len(questions)} "
|
|
"questions (consider splitting)")
|
|
|
|
for q in questions:
|
|
# Check question text length
|
|
if len(q.text) > 150:
|
|
issues.append(f"Question {q.id} is very long "
|
|
f"({len(q.text)} chars)")
|
|
|
|
# Check Likert scale has odd number of points
|
|
if q.type == QuestionType.LIKERT and q.scale_range:
|
|
n_points = q.scale_range[1] - q.scale_range[0] + 1
|
|
if n_points % 2 == 0:
|
|
issues.append(f"Question {q.id}: Even-numbered Likert "
|
|
"scale (consider odd for neutral midpoint)")
|
|
|
|
# Check multiple choice has reasonable number of options
|
|
if q.type == QuestionType.MULTIPLE_CHOICE and q.options:
|
|
if len(q.options) > 7:
|
|
issues.append(f"Question {q.id}: Too many options "
|
|
f"({len(q.options)})")
|
|
|
|
return issues
|
|
|
|
def generate_survey_markdown(self):
|
|
"""Generate human-readable survey"""
|
|
output = f"# {self.title}\n\n"
|
|
output += f"{self.instructions}\n\n"
|
|
|
|
for section_name, section in self.sections.items():
|
|
output += f"## {section_name}\n"
|
|
output += f"*{section['description']}*\n\n"
|
|
|
|
for q in section['questions']:
|
|
output += f"**{q.id}.** {q.text}"
|
|
if q.required:
|
|
output += " *"
|
|
output += "\n\n"
|
|
|
|
if q.type == QuestionType.LIKERT:
|
|
output += f"Scale: {q.scale_range[0]} to {q.scale_range[1]}\n"
|
|
if q.scale_labels:
|
|
for val, label in q.scale_labels.items():
|
|
output += f"- {val}: {label}\n"
|
|
elif q.type == QuestionType.MULTIPLE_CHOICE:
|
|
for i, opt in enumerate(q.options, 1):
|
|
output += f"- [ ] {opt}\n"
|
|
elif q.type == QuestionType.OPEN_ENDED:
|
|
output += "_" * 50 + "\n"
|
|
|
|
output += "\n"
|
|
|
|
output += "\n*Required questions marked with *\n"
|
|
return output
|
|
|
|
# Example survey
|
|
survey = SurveyInstrument(
|
|
title="Remote Work Experience Survey",
|
|
instructions="This survey takes approximately 10 minutes. "
|
|
"Your responses are confidential."
|
|
)
|
|
|
|
survey.add_section("Background", "Tell us about your work situation")
|
|
|
|
survey.add_question(SurveyQuestion(
|
|
id="Q1",
|
|
text="How long have you been working remotely?",
|
|
type=QuestionType.MULTIPLE_CHOICE,
|
|
required=True,
|
|
options=[
|
|
"Less than 6 months",
|
|
"6-12 months",
|
|
"1-2 years",
|
|
"More than 2 years"
|
|
]
|
|
))
|
|
|
|
survey.add_section("Work-Life Balance", "Rate your agreement with these statements")
|
|
|
|
survey.add_question(SurveyQuestion(
|
|
id="Q2",
|
|
text="I can easily separate work time from personal time",
|
|
type=QuestionType.LIKERT,
|
|
required=True,
|
|
scale_range=(1, 5),
|
|
scale_labels={
|
|
1: "Strongly Disagree",
|
|
3: "Neutral",
|
|
5: "Strongly Agree"
|
|
}
|
|
))
|
|
|
|
# Validate and generate
|
|
issues = survey.validate_survey()
|
|
if issues:
|
|
print("Survey Issues:")
|
|
for issue in issues:
|
|
print(f"- {issue}")
|
|
|
|
print(survey.generate_survey_markdown())</code></pre>
|
|
<h3>2. Interview Protocols</h3>
|
|
<p><strong>Structured Interview Framework</strong>:</p>
|
|
<pre><code class="lang-python">from dataclasses import dataclass
|
|
from typing import List, Dict
|
|
import json
|
|
|
|
@dataclass
|
|
class InterviewQuestion:
|
|
"""Define interview question with probes"""
|
|
question: str
|
|
purpose: str
|
|
probes: List[str]
|
|
max_time_minutes: int
|
|
notes_to_interviewer: str = ""
|
|
|
|
class InterviewProtocol:
|
|
"""Create comprehensive interview protocol"""
|
|
|
|
def __init__(self, research_aim: str, duration_minutes: int):
|
|
self.aim = research_aim
|
|
self.duration = duration_minutes
|
|
self.opening = None
|
|
self.questions = []
|
|
self.closing = None
|
|
self.training_notes = []
|
|
|
|
def set_opening(self, script: str):
|
|
"""Set opening script"""
|
|
self.opening = script
|
|
|
|
def add_question(self, question: InterviewQuestion):
|
|
"""Add interview question"""
|
|
self.questions.append(question)
|
|
|
|
def set_closing(self, script: str):
|
|
"""Set closing script"""
|
|
self.closing = script
|
|
|
|
def add_training_note(self, note: str):
|
|
"""Add note for interviewer training"""
|
|
self.training_notes.append(note)
|
|
|
|
def check_timing(self):
|
|
"""Verify questions fit in time allotted"""
|
|
total_time = sum(q.max_time_minutes for q in self.questions)
|
|
overhead = 10 # Opening, closing, buffer
|
|
|
|
if total_time + overhead > self.duration:
|
|
return {
|
|
'fits': False,
|
|
'planned': total_time + overhead,
|
|
'available': self.duration,
|
|
'overage': (total_time + overhead) - self.duration
|
|
}
|
|
return {
|
|
'fits': True,
|
|
'planned': total_time + overhead,
|
|
'available': self.duration,
|
|
'buffer': self.duration - (total_time + overhead)
|
|
}
|
|
|
|
def generate_protocol_document(self):
|
|
"""Generate complete protocol document"""
|
|
doc = f"""
|
|
# Interview Protocol
|
|
|
|
## Research Aim
|
|
{self.aim}
|
|
|
|
## Duration
|
|
{self.duration} minutes
|
|
|
|
## Opening Script ({len(self.opening.split())*0.4:.0f} seconds estimated)
|
|
{self.opening}
|
|
|
|
## Interview Questions
|
|
|
|
"""
|
|
for i, q in enumerate(self.questions, 1):
|
|
doc += f"### Question {i} ({q.max_time_minutes} minutes max)\n\n"
|
|
doc += f"**Question**: {q.question}\n\n"
|
|
doc += f"**Purpose**: {q.purpose}\n\n"
|
|
doc += "**Probes**:\n"
|
|
for probe in q.probes:
|
|
doc += f"- {probe}\n"
|
|
if q.notes_to_interviewer:
|
|
doc += f"\n**Interviewer Notes**: {q.notes_to_interviewer}\n"
|
|
doc += "\n"
|
|
|
|
doc += f"## Closing Script\n{self.closing}\n\n"
|
|
|
|
if self.training_notes:
|
|
doc += "## Interviewer Training Notes\n\n"
|
|
for note in self.training_notes:
|
|
doc += f"- {note}\n"
|
|
|
|
# Add timing check
|
|
timing = self.check_timing()
|
|
doc += f"\n## Timing Analysis\n"
|
|
doc += f"- Planned time: {timing['planned']} minutes\n"
|
|
doc += f"- Available time: {timing['available']} minutes\n"
|
|
if timing['fits']:
|
|
doc += f"- Buffer: {timing['buffer']} minutes\n"
|
|
else:
|
|
doc += f"- **WARNING: Over by {timing['overage']} minutes**\n"
|
|
|
|
return doc
|
|
|
|
def create_interview_log(self):
|
|
"""Create interview tracking log"""
|
|
log = {
|
|
'interviewer': '',
|
|
'participant_id': '',
|
|
'date': '',
|
|
'start_time': '',
|
|
'end_time': '',
|
|
'location': '',
|
|
'recording': {'audio': False, 'video': False},
|
|
'consent_obtained': False,
|
|
'questions_completed': {f"Q{i+1}": False
|
|
for i in range(len(self.questions))},
|
|
'technical_issues': [],
|
|
'notes': '',
|
|
'transcription_status': 'pending'
|
|
}
|
|
return log
|
|
|
|
# Example protocol
|
|
protocol = InterviewProtocol(
|
|
research_aim="Understand how remote workers maintain work-life boundaries",
|
|
duration_minutes=60
|
|
)
|
|
|
|
protocol.set_opening("""
|
|
Thank you for participating in this study. This interview will take about 60 minutes.
|
|
I'll be asking you about your experiences with remote work and work-life balance.
|
|
Please answer openly - there are no right or wrong answers. Everything you share
|
|
will be kept confidential and your name will not appear in any reports.
|
|
|
|
Do I have your permission to audio record this interview? You can ask me to
|
|
stop recording at any time.
|
|
|
|
[Start recording]
|
|
|
|
Do you have any questions before we begin?
|
|
""")
|
|
|
|
protocol.add_question(InterviewQuestion(
|
|
question="Can you walk me through a typical workday? Start from when you wake up.",
|
|
purpose="Understand daily routines and work patterns",
|
|
probes=[
|
|
"What time do you usually start work?",
|
|
"Where do you physically work?",
|
|
"How do you transition into 'work mode'?",
|
|
"When do you typically finish?",
|
|
"How do you signal to yourself and others that work is done?"
|
|
],
|
|
max_time_minutes=10,
|
|
notes_to_interviewer="Listen for spatial, temporal, and social boundaries"
|
|
))
|
|
|
|
protocol.add_question(InterviewQuestion(
|
|
question="Tell me about a time when work and personal life collided. What happened?",
|
|
purpose="Elicit specific boundary violations and coping strategies",
|
|
probes=[
|
|
"How did you feel in that moment?",
|
|
"What did you do?",
|
|
"Looking back, what would you do differently?",
|
|
"Has this happened more than once?"
|
|
],
|
|
max_time_minutes=15,
|
|
notes_to_interviewer="Critical incident technique - get detailed narrative"
|
|
))
|
|
|
|
protocol.set_closing("""
|
|
Those are all my questions. Is there anything else you'd like to share about
|
|
your remote work experience that we didn't cover?
|
|
|
|
[Answer]
|
|
|
|
Thank you so much for your time and insights. Your participation is really valuable.
|
|
As a reminder, everything you've shared is confidential. I'll send you a summary
|
|
of the findings once the study is complete, if you're interested.
|
|
|
|
[Stop recording]
|
|
""")
|
|
|
|
protocol.add_training_note("Use active listening - paraphrase to confirm understanding")
|
|
protocol.add_training_note("Embrace silence - give participants time to think")
|
|
protocol.add_training_note("Follow participant's lead when they share something unexpected")
|
|
|
|
print(protocol.generate_protocol_document())</code></pre>
|
|
<h3>3. Observation Methods</h3>
|
|
<p><strong>Observation Protocol</strong>:</p>
|
|
<pre><code class="lang-python">from dataclasses import dataclass
|
|
from datetime import datetime
|
|
from typing import List, Optional
|
|
from enum import Enum
|
|
|
|
class ObservationType(Enum):
|
|
PARTICIPANT = "participant"
|
|
NON_PARTICIPANT = "non_participant"
|
|
STRUCTURED = "structured"
|
|
UNSTRUCTURED = "unstructured"
|
|
|
|
@dataclass
|
|
class ObservationCategory:
|
|
"""Define what to observe"""
|
|
category: str
|
|
description: str
|
|
indicators: List[str]
|
|
recording_method: str # 'checklist', 'frequency', 'narrative', 'time_sample'
|
|
|
|
class ObservationProtocol:
|
|
"""Design observation study"""
|
|
|
|
def __init__(self, observation_type: ObservationType,
|
|
setting: str, duration_minutes: int):
|
|
self.type = observation_type
|
|
self.setting = setting
|
|
self.duration = duration_minutes
|
|
self.categories = []
|
|
self.sampling_strategy = None
|
|
|
|
def add_category(self, category: ObservationCategory):
|
|
"""Add observation category"""
|
|
self.categories.append(category)
|
|
|
|
def set_sampling_strategy(self, strategy: str, interval: Optional[int] = None):
|
|
"""Define time sampling strategy
|
|
|
|
Args:
|
|
strategy: 'continuous', 'time_sampling', 'event_sampling'
|
|
interval: For time_sampling, seconds between observations
|
|
"""
|
|
self.sampling_strategy = {
|
|
'strategy': strategy,
|
|
'interval': interval
|
|
}
|
|
|
|
def create_observation_sheet(self):
|
|
"""Generate observation recording sheet"""
|
|
sheet = f"""
|
|
# Observation Recording Sheet
|
|
|
|
**Observer**: _______________ **Date**: _______________
|
|
**Setting**: {self.setting}
|
|
**Start Time**: _______________ **End Time**: _______________
|
|
**Observation Type**: {self.type.value}
|
|
|
|
---
|
|
|
|
"""
|
|
for i, cat in enumerate(self.categories, 1):
|
|
sheet += f"## {i}. {cat.category}\n"
|
|
sheet += f"*{cat.description}*\n\n"
|
|
|
|
if cat.recording_method == 'checklist':
|
|
sheet += "**Indicators** (check if observed):\n"
|
|
for indicator in cat.indicators:
|
|
sheet += f"- [ ] {indicator}\n"
|
|
elif cat.recording_method == 'frequency':
|
|
sheet += "**Frequency Count**:\n"
|
|
for indicator in cat.indicators:
|
|
sheet += f"- {indicator}: _____\n"
|
|
elif cat.recording_method == 'time_sample':
|
|
sheet += "**Time Samples** (mark X if present):\n"
|
|
sheet += "| Indicator | "
|
|
sheet += " | ".join([f"T{i}" for i in range(1, 11)])
|
|
sheet += " |\n"
|
|
sheet += "| --- | " + " | ".join(["---"]*10) + " |\n"
|
|
for indicator in cat.indicators:
|
|
sheet += f"| {indicator} | " + " | ".join([" "]*10) + " |\n"
|
|
else: # narrative
|
|
sheet += "**Notes**:\n"
|
|
sheet += "_" * 60 + "\n"
|
|
sheet += "_" * 60 + "\n"
|
|
|
|
sheet += "\n"
|
|
|
|
sheet += """
|
|
---
|
|
|
|
## Field Notes
|
|
[Record contextual details, observer reflections, questions]
|
|
|
|
"""
|
|
return sheet
|
|
|
|
def create_field_notes_template(self):
|
|
"""Generate field notes template"""
|
|
template = """
|
|
# Field Notes Template
|
|
|
|
## Descriptive Notes
|
|
[What did you observe? Be detailed and concrete]
|
|
- Physical setting:
|
|
- Participants:
|
|
- Activities:
|
|
- Interactions:
|
|
- Temporal flow:
|
|
|
|
## Reflective Notes
|
|
[Your thoughts, feelings, questions, hunches]
|
|
- Initial impressions:
|
|
- Surprises:
|
|
- Patterns emerging:
|
|
- Questions raised:
|
|
|
|
## Methodological Notes
|
|
[Notes about the research process]
|
|
- What worked well:
|
|
- Challenges:
|
|
- Adjustments needed:
|
|
- Observer effect concerns:
|
|
|
|
## Analytical Notes
|
|
[Preliminary analysis and connections]
|
|
- Themes:
|
|
- Connections to theory:
|
|
- Ideas for follow-up:
|
|
"""
|
|
return template
|
|
|
|
# Example observation protocol
|
|
obs_protocol = ObservationProtocol(
|
|
observation_type=ObservationType.NON_PARTICIPANT,
|
|
setting="Open office workspace",
|
|
duration_minutes=120
|
|
)
|
|
|
|
obs_protocol.add_category(ObservationCategory(
|
|
category="Collaboration Behaviors",
|
|
description="Spontaneous interactions between coworkers",
|
|
indicators=[
|
|
"Verbal questions/requests",
|
|
"Screen sharing",
|
|
"Walking to colleague's desk",
|
|
"Impromptu meetings",
|
|
"Shared problem-solving"
|
|
],
|
|
recording_method='frequency'
|
|
))
|
|
|
|
obs_protocol.add_category(ObservationCategory(
|
|
category="Focus Behaviors",
|
|
description="Individual concentrated work",
|
|
indicators=[
|
|
"Headphones on",
|
|
"Do not disturb sign",
|
|
"Working at desk alone",
|
|
"Note-taking"
|
|
],
|
|
recording_method='time_sample'
|
|
))
|
|
|
|
obs_protocol.set_sampling_strategy('time_sampling', interval=600) # Every 10 min
|
|
|
|
print(obs_protocol.create_observation_sheet())</code></pre>
|
|
<h3>4. Data Quality Assurance</h3>
|
|
<p><strong>Quality Control Framework</strong>:</p>
|
|
<pre><code class="lang-python">import pandas as pd
|
|
import numpy as np
|
|
from typing import List, Dict
|
|
|
|
class DataQualityControl:
|
|
"""Implement data quality checks"""
|
|
|
|
def __init__(self, data: pd.DataFrame):
|
|
self.data = data
|
|
self.issues = []
|
|
|
|
def check_completeness(self, required_vars: List[str]):
|
|
"""Check for missing data"""
|
|
for var in required_vars:
|
|
if var in self.data.columns:
|
|
missing_n = self.data[var].isna().sum()
|
|
missing_pct = (missing_n / len(self.data)) * 100
|
|
|
|
if missing_pct > 5:
|
|
self.issues.append({
|
|
'type': 'completeness',
|
|
'variable': var,
|
|
'issue': f'{missing_pct:.1f}% missing',
|
|
'severity': 'high' if missing_pct > 20 else 'medium'
|
|
})
|
|
|
|
def check_range(self, var: str, expected_range: tuple):
|
|
"""Check values are in expected range"""
|
|
if var in self.data.columns:
|
|
out_of_range = (
|
|
(self.data[var] < expected_range[0]) |
|
|
(self.data[var] > expected_range[1])
|
|
).sum()
|
|
|
|
if out_of_range > 0:
|
|
self.issues.append({
|
|
'type': 'range',
|
|
'variable': var,
|
|
'issue': f'{out_of_range} values out of range '
|
|
f'{expected_range}',
|
|
'severity': 'high'
|
|
})
|
|
|
|
def check_consistency(self, var1: str, var2: str, rule: str):
|
|
"""Check logical consistency between variables"""
|
|
if var1 in self.data.columns and var2 in self.data.columns:
|
|
# Example: age should be <= years_experience + 18
|
|
inconsistent = 0
|
|
|
|
if rule == 'age_gt_experience':
|
|
inconsistent = (
|
|
self.data[var1] < self.data[var2] + 18
|
|
).sum()
|
|
|
|
if inconsistent > 0:
|
|
self.issues.append({
|
|
'type': 'consistency',
|
|
'variable': f'{var1}, {var2}',
|
|
'issue': f'{inconsistent} logically inconsistent values',
|
|
'severity': 'medium'
|
|
})
|
|
|
|
def check_duplicates(self, id_var: str):
|
|
"""Check for duplicate records"""
|
|
duplicates = self.data[id_var].duplicated().sum()
|
|
|
|
if duplicates > 0:
|
|
self.issues.append({
|
|
'type': 'duplicates',
|
|
'variable': id_var,
|
|
'issue': f'{duplicates} duplicate IDs',
|
|
'severity': 'high'
|
|
})
|
|
|
|
def check_outliers(self, var: str, method: str = 'iqr'):
|
|
"""Detect outliers"""
|
|
if var in self.data.columns:
|
|
if method == 'iqr':
|
|
Q1 = self.data[var].quantile(0.25)
|
|
Q3 = self.data[var].quantile(0.75)
|
|
IQR = Q3 - Q1
|
|
outliers = (
|
|
(self.data[var] < Q1 - 3 * IQR) |
|
|
(self.data[var] > Q3 + 3 * IQR)
|
|
).sum()
|
|
|
|
if outliers > 0:
|
|
self.issues.append({
|
|
'type': 'outliers',
|
|
'variable': var,
|
|
'issue': f'{outliers} extreme outliers detected',
|
|
'severity': 'low'
|
|
})
|
|
|
|
def generate_quality_report(self):
|
|
"""Create data quality report"""
|
|
report = "# Data Quality Report\n\n"
|
|
report += f"Dataset: {len(self.data)} records, "
|
|
report += f"{len(self.data.columns)} variables\n\n"
|
|
|
|
if not self.issues:
|
|
report += "No quality issues detected.\n"
|
|
else:
|
|
report += f"## Issues Detected: {len(self.issues)}\n\n"
|
|
|
|
high = [i for i in self.issues if i['severity'] == 'high']
|
|
medium = [i for i in self.issues if i['severity'] == 'medium']
|
|
low = [i for i in self.issues if i['severity'] == 'low']
|
|
|
|
if high:
|
|
report += "### High Severity\n"
|
|
for issue in high:
|
|
report += f"- **{issue['type'].title()}** "
|
|
report += f"in {issue['variable']}: {issue['issue']}\n"
|
|
report += "\n"
|
|
|
|
if medium:
|
|
report += "### Medium Severity\n"
|
|
for issue in medium:
|
|
report += f"- **{issue['type'].title()}** "
|
|
report += f"in {issue['variable']}: {issue['issue']}\n"
|
|
report += "\n"
|
|
|
|
if low:
|
|
report += "### Low Severity\n"
|
|
for issue in low:
|
|
report += f"- **{issue['type'].title()}** "
|
|
report += f"in {issue['variable']}: {issue['issue']}\n"
|
|
|
|
return report
|
|
|
|
# Example
|
|
sample_data = pd.DataFrame({
|
|
'id': [1, 2, 3, 4, 5, 2], # Duplicate
|
|
'age': [25, 35, 150, 45, np.nan, 30], # Out of range, missing
|
|
'satisfaction': [4, 5, 3, 4, 2, 5]
|
|
})
|
|
|
|
qc = DataQualityControl(sample_data)
|
|
qc.check_completeness(['age', 'satisfaction'])
|
|
qc.check_range('age', (18, 100))
|
|
qc.check_duplicates('id')
|
|
|
|
print(qc.generate_quality_report())</code></pre>
|
|
<h2>Best Practices</h2>
|
|
<h3>1. Survey Design</h3>
|
|
<ul><li>Keep surveys as short as possible</li><li>Use clear, simple language</li><li>Avoid leading questions</li><li>Use validated scales when available</li><li>Pilot test with target population</li><li>Provide progress indicators</li><li>Test on mobile devices</li></ul>
|
|
<h3>2. Interview Execution</h3>
|
|
<ul><li>Build rapport before deep questions</li><li>Use active listening techniques</li><li>Allow silence for thinking</li><li>Be flexible with order</li><li>Probe interesting responses</li><li>Record with permission</li><li>Transcribe promptly</li></ul>
|
|
<h3>3. Observation Methods</h3>
|
|
<ul><li>Be systematic and consistent</li><li>Record field notes immediately</li><li>Note your potential biases</li><li>Consider observer effects</li><li>Use multiple observers when possible</li><li>Triangulate with other methods</li><li>Distinguish description from interpretation</li></ul>
|
|
<h3>4. Data Quality</h3>
|
|
<ul><li>Check data immediately after collection</li><li>Double-enter critical data</li><li>Use validation rules in forms</li><li>Train data collectors thoroughly</li><li>Conduct inter-rater reliability checks</li><li>Document all quality issues</li><li>Create data cleaning log</li></ul>
|
|
<h2>Related Skills</h2>
|
|
<ul><li><strong>research-design</strong>: Planning data collection</li><li><strong>quantitative-methods</strong>: Quantitative data collection</li><li><strong>qualitative-methods</strong>: Qualitative data collection</li><li><strong>data-analysis</strong>: Using collected data</li><li><strong>research-writing</strong>: Reporting collection methods</li></ul>
|
|
<h2>Quick Reference</h2>
|
|
<h3>Survey Length Guidelines</h3>
|
|
<pre><code>Email survey: 5-7 minutes (10-15 questions)
|
|
Phone survey: 10-15 minutes
|
|
In-person: 20-30 minutes
|
|
Longitudinal: Shorter for repeated measures</code></pre>
|
|
<h3>Interview Durations</h3>
|
|
<pre><code>Brief interview: 15-30 minutes
|
|
Standard: 45-60 minutes
|
|
In-depth: 90-120 minutes
|
|
Life history: Multiple sessions</code></pre>
|
|
<h3>Response Rate Improvement</h3>
|
|
<pre><code>✓ Personalized invitations
|
|
✓ Multiple contact attempts
|
|
✓ Incentives (when appropriate)
|
|
✓ Clear purpose and benefit
|
|
✓ Convenient timing
|
|
✓ Follow-up reminders
|
|
✓ Mobile-friendly format</code></pre>
|
|
<footer>
|
|
<div class="fmap">
|
|
<div><b>Build</b>
|
|
<a href="https://hanzo.app">hanzo.app</a> app builder
|
|
<a href="https://hanzo.codes">hanzo.codes</a> code with an agent
|
|
<a href="https://hanzoskills.com">hanzoskills.com</a> what an agent reads</div>
|
|
<div><b>Run</b>
|
|
<a href="https://console.hanzo.ai">console.hanzo.ai</a> cloud console
|
|
<a href="https://api.hanzo.ai">api.hanzo.ai</a> the API</div>
|
|
<div><b>Account</b>
|
|
<a href="https://hanzo.id">hanzo.id</a> sign in
|
|
<a href="https://pay.hanzo.ai">pay.hanzo.ai</a> top up
|
|
<a href="https://billing.hanzo.ai">billing.hanzo.ai</a> invoices and usage</div>
|
|
<div><b>Company</b>
|
|
<a href="https://hanzo.ai">hanzo.ai</a> canonical
|
|
<a href="https://hanzo.ventures">hanzo.ventures</a> ventures</div>
|
|
</div>
|
|
<div class="fend"><a href="/research-data-collection.md">This page as plain text</a> · <a href="/llms.txt">Index for agents</a></div>
|
|
</footer>
|
|
</div></body></html> |