import%20marimo%0A%0A__generated_with%20%3D%20%220.25.2%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22%2C%20app_title%3D%22Glossary%22)%0A%0Awith%20app.setup%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20S%2C%20T%2C%20M%2C%20E%20%3D%20%2200_start.py%22%2C%20%2210_flat_table.py%22%2C%20%2220_key_matching.py%22%2C%20%2230_edit_rules.py%22%0A%20%20%20%20R%2C%20W%2C%20PB%20%3D%20%2240_recode_and_tabulate.py%22%2C%20%2250_design_estimates.py%22%2C%20%2260_publish_tables.py%22%0A%20%20%20%20A%2C%20ML%2C%20AG%20%3D%20%2270_anomalies_rules.py%22%2C%20%2280_anomalies_ml.py%22%2C%20%2286_stretch_agents.py%22%0A%20%20%20%20D1%2C%20P1%2C%20P2%2C%20K1%20%3D%20%2235_debugging_drill.py%22%2C%20%2295_primer_r_to_python.py%22%2C%20%2296_primer_survey_sampling.py%22%2C%20%2299_capstone.py%22%0A%20%20%20%20PR%2C%20ST%20%3D%20%2236_stretch_processing.py%22%2C%20%2261_stretch_tabulation.py%22%0A%0A%20%20%20%20%23%20The%20kinds%20a%20term%20can%20be%2C%20in%20the%20order%20the%20filter%20lists%20them.%0A%20%20%20%20KINDS%20%3D%20%5B%22The%20data%22%2C%20%22Processing%22%2C%20%22Edit%20rules%22%2C%20%22Tables%22%2C%20%22Survey%20design%22%2C%20%22svy%22%2C%20%22Scripts%22%2C%20%22Anomalies%22%2C%20%22Machine%20learning%22%2C%20%22Agents%22%2C%20%22Python%22%2C%20%22DuckDB%20%26%20SQL%22%5D%0A%0A%20%20%20%20%23%20One%20entry%20per%20term%3A%20what%20it%20means%2C%20a%20small%20example%2C%20and%20where%20the%20course%20explains%20it.%0A%20%20%20%20%23%20%22where%22%20is%20a%20list%20of%20(notebook%2C%20a%20heading%20line%20in%20that%20notebook)%2C%20the%20first%20explanation%20first.%20The%20page%20shows%20the%20heading%20as%20the%20place%20to%20look%2C%0A%20%20%20%20%23%20so%20a%20place%20cannot%20disagree%20with%20its%20heading.%20The%20course's%20tests%20check%20every%20heading%20line%20exists%20and%20every%20kind%20is%20in%20KINDS.%0A%20%20%20%20TERMS%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%23%20The%20data%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Survey%20of%20Fishing%20Households%202025%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20survey%20the%20course's%20data%20comes%20from%2C%20invented%20for%20the%20course%3A%20households%20that%20fished%20in%202025%20in%20six%20provinces%20of%20three%20regions%2C%20interviewed%20from%20March%20to%20May%202026.%20Its%20places%20are%20real%3B%20its%20households%20and%20their%20answers%20are%20invented.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%20Start%20here%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22variable%20name%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20column%20is%20named%20after%20its%20table%20and%20what%20it%20holds%3A%20the%20table's%20short%20name%20first%2C%20then%20the%20item.%20The%20table%20a%20column%20came%20from%20can%20still%20be%20read%20after%20a%20join.%22%2C%20%22example%22%3A%20%22mem_age%20is%20a%20member's%20age%3B%20boat_length%20a%20boat's%20length%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(S%2C%20%22%23%23%23%20The%20codebook%20and%20the%20code%20lists%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22household%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22One%20household%20interviewed%3A%20one%20row%20of%20the%20table%20household.%20Every%20other%20table's%20rows%20hang%20from%20a%20household.%22%2C%20%22example%22%3A%20%22household%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22hh_id%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20household%20id.%20Each%20regional%20database%20numbers%20its%20households%20on%20its%20own%2C%20so%20the%20same%20id%20can%20name%20another%20household%20in%20another%20region.%22%2C%20%22example%22%3A%20%22a%20household%20is%20region_code%20and%20hh_id%20together%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.2%20%C2%B7%20A%20join%20that%20multiplied%20rows%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22key%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20set%20of%20columns%20that%20names%20one%20row.%20A%20household's%20key%20is%20region_code%20and%20hh_id%3B%20a%20fishing%20unit's%20adds%20operator_line%20and%20unit_no.%22%2C%20%22example%22%3A%20%22UNIT_KEY%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22key%20part%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22One%20column%20of%20a%20key%20of%20several%20parts.%20Joined%20on%20the%20list%20of%20parts%2C%20each%20keeps%20its%20type%20and%20can%20be%20compared%20on%20its%20own%2C%20which%20tells%20a%20typo%20in%20one%20part%20from%20a%20different%20unit.%22%2C%20%22example%22%3A%20%22operator_line%2C%20the%20roster%20line%20of%20the%20member%20who%20runs%20the%20unit%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(M%2C%20%22%23%23%203%20%C2%B7%20Keys%20of%20several%20parts%3A%20which%20part%20differs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pasted%20key%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20key%20made%20by%20pasting%20its%20parts%20into%20one%20text%2C%20an%20R%20habit.%20Without%20a%20separator%20two%20keys%20can%20paste%20to%20the%20same%20text%2C%20and%20the%20text%20hides%20which%20part%20differs.%22%2C%20%22example%22%3A%20'%221%22%20%2B%20%2223%22%20and%20%2212%22%20%2B%20%223%22%20both%20give%20%22123%22'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(M%2C%20%22%23%23%203%20%C2%B7%20Keys%20of%20several%20parts%3A%20which%20part%20differs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22parent%20table%2C%20child%20table%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22Each%20row%20of%20a%20child%20table%20belongs%20to%20one%20row%20of%20its%20parent%2C%20through%20the%20parent's%20key.%20The%20fishing%20units%20are%20the%20parent%20of%20six%20child%20tables%3A%20crew%2C%20boats%2C%20gear%2C%20catch%2C%20landing%20sites%20and%20assistance.%22%2C%20%22example%22%3A%20%22catch%20is%20a%20child%20of%20fishing_unit%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22key%20prefix%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20child%20table's%20short%20name%2C%20which%20its%20copy%20of%20the%20unit's%20key%20parts%20carries%20in%20front%3A%20boat_%20in%20the%20boats%2C%20catch_%20in%20the%20catch.%20A%20join%20pairs%20each%20with%20the%20unit's%20part%20by%20name.%22%2C%20%22example%22%3A%20%22catch_operator_line%20with%20operator_line%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(M%2C%20%22%23%23%23%20Two%20errors%20you%20will%20meet%20first%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fishing%20unit%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22One%20row%20of%20fishing_unit%3A%20a%20fishing%20enterprise%20the%20household%20runs%2C%20in%20the%20hands%20of%20one%20of%20its%20members.%20A%20member%20who%20runs%20two%20units%20has%20the%20same%20roster%20line%20on%20both%2C%20and%20unit_no%201%20and%202.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22operator%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20household%20member%20who%20runs%20a%20fishing%20unit%3A%20the%20member%20whose%20mem_role_operator%20is%201%2C%20with%20the%20number%20of%20units%20in%20mem_units_run.%20The%20survey%20asks%20the%20fishing%20items%20only%20of%20members%2010%20years%20old%20and%20over%2C%20and%20an%20operator%20is%2016%20or%20over.%22%2C%20%22example%22%3A%20%22members%5Bmembers%5B%5C%22mem_role_operator%5C%22%5D%20%3D%3D%201%5D%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Who%20was%20asked%3A%20a%20rule's%20scope%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22small-scale%2C%20large-scale%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20unit%20is%20large-scale%20when%20one%20of%20its%20boats%20is%205.0%20gross%20tons%20or%20more%20(unit_scale%20%3D%202)%20and%20small-scale%20otherwise%20(1).%20A%20unit%20without%20a%20boat%20is%20small-scale.%22%2C%20%22example%22%3A%20%22unit_scale%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%203%20%C2%B7%20From%20the%20tidyverse%20to%20pandas%20and%20polars%3A%20filter%2C%20mutate%2C%20inner_join%22)%2C%20(R%2C%20%22%23%23%23%20A%20unit's%20scale%20from%20its%20boats%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22member's%20role%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22What%20a%20member%20did%20in%20fishing%2C%20read%20from%20four%20yes%2Fno%20flags%20in%20a%20stated%20order%3A%20ran%20a%20unit%20(mem_role_operator)%2C%20crewed%20in%20a%20unit%20of%20the%20household%20(mem_role_crew)%2C%20worked%20in%20someone%20else's%20unit%20(mem_role_hired)%2C%20worked%20on%20shore%20only%20(mem_role_shore).%20The%20first%20flag%20that%20holds%20names%20the%20role.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Rules%20with%20conditions%3A%20%60np.select%60%22)%2C%20(R%2C%20%22%23%23%23%20Exercise%205.2.%20A%20member's%20role%20from%20four%20flags%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22gross%20tonnage%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20boat's%20size%3A%20length%20%C3%97%20beam%20%C3%97%20depth%20%C3%97%200.212%20for%20a%20boat%20measured%20in%20meters%2C%20%C3%97%200.006%20for%20one%20measured%20in%20feet%2C%20as%20the%20survey's%20manual%20sets%20them%2C%20or%20the%20tonnage%20on%20its%20registration%20papers%20(boat_measured_in%20%3D%201).%22%2C%20%22example%22%3A%20%2210%20%C3%97%201%20%C3%97%200.5%20%C3%97%200.212%20%3D%201.06%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Exercise%201.3.%20Step%202%2C%20mutate%3A%20each%20boat's%20gross%20tonnage%22)%2C%20(E%2C%20%22%23%23%23%20One%20row%2C%20several%20items%3A%20a%20boat's%20tonnage%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22codebook%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20table%20that%20describes%20every%20variable%20of%20every%20table%3A%20its%20label%2C%20its%20database%20type%20and%20its%20valid%20codes.%20Its%20companion%2C%20codebook_rules.csv%2C%20holds%20the%20survey's%20validation%20rules%2C%20in%20words.%22%2C%20%22example%22%3A%20%22data%2Fcodebook.csv%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20The%20codebook%20and%20the%20code%20lists%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22code%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20number%20that%20stands%20for%20a%20category%2C%20not%20an%20amount%3A%20nobody%20adds%20province%20codes.%20A%20code%20is%20valid%20only%20if%20it%20is%20on%20its%20list.%22%2C%20%22example%22%3A%20%22mem_sex%3A%201%20%3D%20Male%2C%202%20%3D%20Female%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20The%20codebook%20and%20the%20code%20lists%22)%2C%20(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22code%20list%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20file%20of%20an%20item's%20valid%20codes%20and%20their%20labels%2C%20for%20items%20with%20more%20codes%20than%20fit%20in%20the%20codebook.%20A%20column%20beside%20the%20codes%20can%20hold%20the%20recode.%22%2C%20%22example%22%3A%20%22data%2Fcodes%2Feducation.csv%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20The%20codebook%20and%20the%20code%20lists%22)%2C%20(R%2C%20%22%23%23%23%20A%20mapping%20table%3A%20the%20code%20list%20is%20the%20recode%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22PSGC%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20Philippine%20Standard%20Geographic%20Code%3A%20the%20codes%20of%20the%20country's%20regions%2C%20provinces%2C%20cities%20and%20municipalities%2C%20and%20barangays.%20The%20survey's%20region%2C%20province%20and%20city%20or%20municipality%20codes%20and%20names%20are%20real%20PSGC%20ones%3B%20its%20barangay%20numbers%20are%20the%20course's%20own.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%20Start%20here%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.1%20%C2%B7%20A%20code%20that%20loses%20its%20leading%20zero%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22area%20codes%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22region_code%2C%20province_code%2C%20citymun_code%20and%20barangay_code%3A%20a%20household's%20region%2C%20province%2C%20city%20or%20municipality%2C%20and%20barangay.%20The%20course%20keeps%20them%20as%20text%2C%20zero-padded%20to%202%2C%203%2C%202%20and%203%20characters.%22%2C%20%22example%22%3A%20%22AREA_CODE_WIDTH%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Three%20regions%2C%20three%20databases%22)%2C%20(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22hh_code%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%2013%20digits%20of%20text%20that%20spell%20a%20household's%20area%20codes%20and%20its%20number%20in%20its%20barangay.%20Read%20as%20a%20number%2C%20it%20loses%20its%20leading%20zero.%22%2C%20%22example%22%3A%20%220103310008001%22%2C%20%22where%22%3A%20%5B(D1%2C%20%22%23%23%23%20Drill%20D1.1%20%C2%B7%20A%20code%20that%20loses%20its%20leading%20zero%22)%2C%20(P1%2C%20%22%23%23%23%20Exercise%20P1.3.%20A%20household%20code%20into%20its%20area%20codes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22removal%20marks%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20columns%20that%20mark%20a%20record%20removed%20without%20deleting%20it%3A%20hh_deleted_on%20on%20a%20household%20(the%20day%20it%20was%20deleted%20in%20the%20capture%20system)%2C%20row_void%20on%20a%20household%20or%20a%20row%20(voided%20in%20editing)%2C%20sel_excluded%20on%20a%20household's%20selection%20row%20(left%20out%20of%20estimation%20by%20the%20sampling%20side).%20row_void%20and%20sel_excluded%20are%201%20or%20blank%2C%20never%200.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(T%2C%20%22%23%23%23%20Deleted%20rows%2C%20region%20by%20region%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22removed%20household%2C%20voided%20row%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22A%20removed%20household%20takes%20its%20rows%20in%20every%20table%20with%20it%3B%20a%20voided%20row%20takes%20only%20itself.%20Every%20count%2C%20join%20and%20estimate%20leaves%20both%20out.%22%2C%20%22example%22%3A%20%22course.table(name)%20leaves%20them%20out%3B%20clean%3DFalse%20keeps%20them%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.3%20%C2%B7%20A%20removal%20filter%20that%20keeps%20everything%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22interviewer%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22The%20person%20who%20held%20a%20household's%20interview%2C%20in%20hh_interviewer%2C%20beside%20hh_interview_date%20and%20hh_interview_minutes.%20Module%208's%20interviewer%20checks%20read%20the%20three.%22%2C%20%22example%22%3A%20%22INT017%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%2C%20(A%2C%20%22%23%23%204%20%C2%B7%20Interviewer-level%20indicators%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22planted%20defects%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22Every%20defect%20the%20course%20planted%20in%20the%20survey%2C%20by%20household%2C%20unit%20and%20kind.%20A%20real%20survey%20has%20no%20such%20list%3B%20here%20it%20measures%20what%20each%20check%20finds%20and%20what%20it%20misses.%22%2C%20%22example%22%3A%20%22course.planted_defects()%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20Did%20the%20method%20find%20what%20was%20planted%3F%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22second%20batch%22%2C%20%22kind%22%3A%20%22The%20data%22%2C%20%22meaning%22%3A%20%22Two%20more%20regions'%20databases%2C%20delivered%20after%20the%20first%20three%2C%20with%20their%20own%20stratum%20counts%20and%20their%20defects%20in%20other%20households.%20The%20capstone%20processes%20them%20from%20scratch.%22%2C%20%22example%22%3A%20%22data%2Fbatch2%2F%22%2C%20%22where%22%3A%20%5B(K1%2C%20%22%23%23%23%20The%20problem%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Processing%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22regional%20database%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22One%20database%20per%20region%2C%20each%20with%20the%20same%20tables%2C%20as%20a%20survey%20kept%20region%20by%20region%20has.%20Each%20numbers%20its%20households%20and%20rows%20on%20its%20own%2C%20and%20two%20of%20them%20can%20store%20one%20column%20with%20different%20types.%22%2C%20%22example%22%3A%20%22sfh2025_r01.duckdb%2C%20sfh2025_r04.duckdb%2C%20sfh2025_r07.duckdb%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Three%20regions%2C%20three%20databases%22)%2C%20(T%2C%20%22%23%23%202%20%C2%B7%20Every%20region%20in%20one%20query%3A%20ATTACH%2C%20UNION%20ALL%20BY%20NAME%2C%20deleted%20rows%20filtered%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22flat%20table%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22One%20table%20with%20a%20row%20per%20fishing%20unit%20still%20in%20the%20survey%2C%20each%20with%20its%20household's%20area%20codes%2C%20design%20columns%20and%20final%20weight.%20The%20course's%20estimates%20start%20from%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%204%20%C2%B7%20The%20flat%20table%20saved%20as%20Parquet%2C%20with%20a%20row-count%20check%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22grain%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22What%20one%20row%20of%20a%20table%20stands%20for.%20The%20flat%20table's%20grain%20is%20the%20fishing%20unit%3B%20the%20failure%20report's%20is%20the%20household.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%204%20%C2%B7%20The%20flat%20table%20saved%20as%20Parquet%2C%20with%20a%20row-count%20check%22)%2C%20(E%2C%20%22%23%23%23%20The%20failure%20report%3A%20its%20shape%2C%20which%20module%208%20reuses%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22row-count%20check%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20table's%20rows%20counted%20a%20second%20way%20and%20compared%20with%20the%20count%20expected.%20A%20join%20that%20multiplied%20or%20dropped%20rows%20makes%20the%20two%20differ.%22%2C%20%22example%22%3A%20%22the%20flat%20table%20has%201%2C240%20rows%2C%20but%201%2C234%20were%20expected%3A%20nothing%20was%20written%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%204%20%C2%B7%20The%20flat%20table%20saved%20as%20Parquet%2C%20with%20a%20row-count%20check%22)%2C%20(T%2C%20%22%23%23%23%20Exercise%202.8.%20Save%20the%20flat%20table%2C%20checked%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22rows%20multiply%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20join%20repeats%20a%20row%20once%20for%20every%20match%2C%20so%20a%20key%20that%20repeats%20on%20the%20side%20looked%20up%20copies%20rows.%20A%20count%20after%20such%20a%20join%20counts%20units%20twice.%22%2C%20%22example%22%3A%20'validate%3D%22many_to_one%22%20stops%20it'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%204%20%C2%B7%20The%20flat%20table%20saved%20as%20Parquet%2C%20with%20a%20row-count%20check%22)%2C%20(R%2C%20%22%23%23%23%20The%20trap%20after%20a%20join%3A%20rows%20multiply%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.2%20%C2%B7%20A%20join%20that%20multiplied%20rows%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22types%20from%20the%20codebook%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Each%20column%20typed%20by%20the%20codebook's%20type%2C%20not%20by%20the%20rows%20a%20query%20returned.%20The%20column%20then%20has%20the%20same%20type%20in%20a%20region%20where%20it%20is%20always%20answered%20and%20in%20one%20where%20it%20never%20is.%22%2C%20%22example%22%3A%20%22INTEGER%20%E2%86%92%20Int64%2C%20VARCHAR%20%E2%86%92%20text%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Nullable%20integers%2C%20and%20SQLite%20as%20the%20fallback%22)%2C%20(T%2C%20%22%23%23%23%20Exercise%202.6.%20Types%20from%20the%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22zero-padding%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Writing%20a%20code%20with%20zeros%20on%20the%20left%20up%20to%20its%20width%2C%20so%2033%20becomes%20033.%20A%20code%20read%20as%20a%20number%20loses%20them%2C%20and%2033%20and%20033%20no%20longer%20join.%22%2C%20%22example%22%3A%20%22lpad(province_code%2C%203%2C%20'0')%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22null%20token%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22The%20text%20a%20file%20writes%20for%20a%20missing%20value%3B%20the%20survey's%20export%20writes%20%5C%5CN%2C%20as%20MySQL%20does.%20Read%20as%20text%2C%20one%20%5C%5CN%20turns%20a%20column%20of%20numbers%20into%20text.%22%2C%20%22example%22%3A%20'na_values%3D%5B%22%5C%5C%5C%5CN%22%5D'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.4%20%C2%B7%20The%20null%20token%20read%20as%20text%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22encoding%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22The%20rule%20that%20turns%20characters%20into%20bytes.%20The%20export%20is%20Windows-1252%2C%20which%20writes%20%C3%B1%20as%20one%20byte%3B%20read%20as%20UTF-8%2C%20today's%20default%2C%20that%20byte%20stops%20the%20read.%22%2C%20%22example%22%3A%20'encoding%3D%22cp1252%22'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22padded%20text%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Text%20the%20export%20fills%20with%20spaces%20to%20a%20fixed%20width%2C%20such%20as%20the%2030%20characters%20of%20a%20landing%20site's%20name%2C%20land_name.%22%2C%20%22example%22%3A%20'.str.rstrip()%20removes%20the%20spaces'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Parquet%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20file%20format%20for%20tables%20that%20stores%20each%20column%20with%20its%20type%2C%20so%20codes%20stay%20text%20and%20nullable%20integers%20stay%20whole.%20pandas%2C%20polars%2C%20DuckDB%20and%20R%20all%20read%20it%2C%20where%20an%20RDS%20file%20is%20read%20by%20R%20alone.%22%2C%20%22example%22%3A%20%22flat.to_parquet(path)%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Saving%20it%3A%20Parquet%22)%2C%20(P1%2C%20%22%23%23%207%20%C2%B7%20Files%3A%20RDS%20against%20Parquet%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22footer%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22The%20part%20at%20the%20end%20of%20a%20Parquet%20file%20that%20describes%20it%2C%20including%20how%20many%20rows%20it%20holds.%20polars%20reads%20the%20count%20from%20it%20without%20reading%20a%20row.%22%2C%20%22example%22%3A%20%22pl.scan_parquet(path).select(pl.len()).collect().item()%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Saving%20it%3A%20Parquet%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22MySQL%20server%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20program%20on%20another%20machine%20that%20holds%20databases%20and%20answers%20queries%20over%20the%20network%2C%20from%20anyone%20with%20an%20account.%20Regional%20databases%20often%20sit%20on%20one.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%205%20%C2%B7%20The%20real%20thing%3A%20reading%20a%20MySQL%20server%20with%20DuckDB's%20mysql%20extension%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22orphan%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20child%20row%20whose%20key%20matches%20no%20parent%2C%20or%20a%20parent%20with%20no%20child%20row%3A%20a%20catch%20row%20with%20no%20unit%2C%20a%20unit%20with%20no%20catch.%20A%20join%20drops%20it%20without%20an%20error.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%201%20%C2%B7%20Orphans%20across%20the%20tables%3A%20every%20child%20table%20by%20its%20prefix%2C%20operators%20by%20their%20roster%20line%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22anti-join%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Keeps%20the%20rows%20of%20one%20table%20whose%20key%20is%20not%20in%20the%20other%3A%20the%20orphans.%20dplyr's%20anti_join.%22%2C%20%22example%22%3A%20'catch.merge(units%2C%20on%3DKEY%2C%20how%3D%22left_anti%22)'%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%202%20%C2%B7%20Orphan%20rows%20both%20ways%3A%20anti-joins%2C%20semi-joins%2C%20merge's%20indicator%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22semi-join%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Keeps%20the%20rows%20of%20one%20table%20whose%20key%20is%20in%20the%20other%2C%20once%20each%2C%20without%20the%20other's%20columns.%20An%20inner%20join%20would%20repeat%20a%20row%20once%20for%20every%20match.%22%2C%20%22example%22%3A%20%22semi_join(units%2C%20live_households)%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Deleted%20rows%2C%20region%20by%20region%22)%2C%20(M%2C%20%22%23%23%23%20A%20semi-join%20is%20not%20an%20inner%20join%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22leftover%20pairing%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Pairing%20the%20leftover%20rows%20of%20a%20household%20by%20their%20position%2C%20the%20unit's%20side%20first%2C%20and%20labelling%20each%20pair.%20Position%20cannot%20tell%20which%20part%20of%20a%20key%20is%20wrong.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%203%20%C2%B7%20Keys%20of%20several%20parts%3A%20which%20part%20differs%22)%2C%20(M%2C%20%22%23%23%23%20What%20position%20cannot%20tell%20you%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22automated%20case%2C%20manual%20case%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20key%20error%20that%20a%20rule%20fixes%20the%20same%20way%20every%20time%2C%20and%20one%20that%20goes%20to%20a%20person%20with%20the%20reason.%20The%20rules%20are%20checked%20in%20order%2C%20and%20the%20first%20that%20holds%20decides.%22%2C%20%22example%22%3A%20%22one%20part%20differs%20%E2%86%92%20automated%3B%20several%20units%20%E2%86%92%20manual%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%204%20%C2%B7%20The%20automated%20case%20and%20the%20manual%20case%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22edits%20table%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22One%20row%20per%20value%20an%20edit%20changes%3A%20the%20household%2C%20the%20table%20and%20row%20id%2C%20the%20column%2C%20the%20old%20value%2C%20the%20new%20one%20and%20the%20reason.%20A%20program%20can%20apply%20it%20and%20a%20person%20can%20check%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20From%20decisions%20to%20edits%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22dry%20run%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20run%20that%20reports%20what%20it%20would%20change%20and%20changes%20nothing.%20The%20write%20needs%20an%20explicit%20apply%3DTrue%2C%20or%20--apply%20on%20a%20script.%22%2C%20%22example%22%3A%20%22write_back(copy%2C%20edits)%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%205%20%C2%B7%20Edits%20written%20back%20in%20a%20transaction%20with%20an%20audit%20flag%22)%2C%20(M%2C%20%22%23%23%23%20Exercise%203.9.%20The%20dry%20run%3A%20what%20would%20change%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22transaction%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20group%20of%20changes%20kept%20together%20or%20not%20at%20all%3A%20BEGIN%20TRANSACTION%2C%20then%20COMMIT%2C%20or%20ROLLBACK%20on%20any%20error.%20A%20failure%20halfway%20leaves%20the%20database%20as%20it%20was.%22%2C%20%22example%22%3A%20'con.execute(%22ROLLBACK%22)'%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%205%20%C2%B7%20Edits%20written%20back%20in%20a%20transaction%20with%20an%20audit%20flag%22)%2C%20(M%2C%20%22%23%23%23%20Exercise%203.10.%20The%20write%2C%20all%20or%20nothing%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22audit%20flag%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22A%20column%20set%20to%201%20on%20every%20row%20an%20edit%20changed.%20A%20second%20run%20skips%20the%20flagged%20rows%2C%20and%20a%20reviewer%20can%20find%20every%20change.%22%2C%20%22example%22%3A%20%22key_corrected%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%205%20%C2%B7%20Edits%20written%20back%20in%20a%20transaction%20with%20an%20audit%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22idempotent%22%2C%20%22kind%22%3A%20%22Processing%22%2C%20%22meaning%22%3A%20%22Running%20it%20twice%20leaves%20things%20as%20running%20it%20once%20does%2C%20and%20the%20second%20run%20reports%20that%20it%20changed%20nothing.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%205%20%C2%B7%20Edits%20written%20back%20in%20a%20transaction%20with%20an%20audit%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Edit%20rules%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22edit%20rule%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20statement%20a%20correct%20row%20makes%20true.%20Most%20of%20the%20codebook's%20rules%20are%20of%20three%20kinds%3A%20valid%20codes%2C%20ranges%20and%20consistency%20between%20items.%22%2C%20%22example%22%3A%20%22M4%3A%20a%20member%20who%20runs%20a%20unit%20is%2016%20years%20old%20or%20over%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%202%20%C2%B7%20Range%20and%20cross-item%20consistency%20rules%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22frequency%20table%20against%20the%20valid%20codes%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20count%20of%20an%20item's%20codes%20read%20against%20the%20codebook%3A%20every%20valid%20code%20with%20its%20label%20and%20count%2C%200%20included%2C%20then%20the%20codes%20the%20codebook%20lacks%2C%20then%20the%20blanks.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%201%20%C2%B7%20Frequency%20tables%20against%20the%20codebook's%20valid%20codes%22)%2C%20(E%2C%20%22%23%23%23%20Exercise%204.2.%20A%20frequency%20table%20against%20the%20valid%20codes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22No%20answer%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20course's%20category%20for%20a%20missing%20answer.%20A%20blank%20is%20often%20expected%3A%20a%20child%20under%206%20is%20not%20asked%20the%20education.%22%2C%20%22example%22%3A%20'is.na(mem_sex)%20~%20%22No%20answer%22'%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%201%20%C2%B7%20Frequency%20tables%20against%20the%20codebook's%20valid%20codes%22)%2C%20(R%2C%20%22%23%23%201%20%C2%B7%20Categories%20from%20codes%3A%20mapping%20tables%2C%20np.select%2C%20pd.cut%2C%20top-N%20with%20other%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Invalid%20value%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20course's%20category%20for%20an%20answer%20that%20is%20there%20but%20is%20not%20a%20valid%20code%20or%20value.%20Unlike%20a%20blank%2C%20it%20is%20an%20error%20whoever%20answered.%22%2C%20%22example%22%3A%20%22a%20sex%20of%208%2C%20an%20age%20of%20150%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%201%20%C2%B7%20Frequency%20tables%20against%20the%20codebook's%20valid%20codes%22)%2C%20(R%2C%20%22%23%23%201%20%C2%B7%20Categories%20from%20codes%3A%20mapping%20tables%2C%20np.select%2C%20pd.cut%2C%20top-N%20with%20other%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22range%20rule%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20rule%20that%20a%20number%20lies%20between%20two%20bounds.%20A%20blank%20gives%20a%20missing%20result%2C%20not%20False%2C%20so%20the%20rule%20must%20say%20what%20a%20blank%20means.%22%2C%20%22example%22%3A%20'members%5B%22mem_age%22%5D.between(0%2C%20110)'%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Range%20rules%2C%20and%20what%20a%20blank%20does%20to%20them%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22consistency%20rule%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20rule%20across%20items%2C%20such%20as%20the%20members%20count%20equal%20to%20the%20roster's%20rows.%20A%20rule%20across%20tables%20first%20brings%20the%20other%20table's%20fact%20in%20as%20a%20column%2C%20so%20it%20is%20a%20condition%20on%20one%20row%20again.%22%2C%20%22example%22%3A%20%22H1%3A%20hh_roster_members%20equals%20the%20household's%20rows%20in%20member%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%202%20%C2%B7%20Range%20and%20cross-item%20consistency%20rules%22)%2C%20(E%2C%20%22%23%23%23%20Across%20tables%3A%20bring%20the%20other%20table's%20fact%20in%20as%20a%20column%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22scope%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20rows%20a%20rule%20is%20about%2C%20written%20apart%20from%20its%20condition%2C%20what%20must%20be%20true%20of%20them.%20Writing%20the%20scope%20lets%20a%20rule%20respect%20the%20questionnaire's%20skips.%22%2C%20%22example%22%3A%20%22applies_to%3A%20mem_role_operator%20%3D%3D%201%3B%20must_hold%3A%20mem_age%20%3E%3D%2016%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Who%20was%20asked%3A%20a%20rule's%20scope%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22skip%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20questionnaire%20instruction%20that%20leaves%20an%20item%20unasked%20for%20some%20respondents.%20Their%20blank%20is%20the%20questionnaire%20working%2C%20not%20a%20missed%20answer.%22%2C%20%22example%22%3A%20%22mem_education%20is%20asked%20of%20members%206%20years%20old%20and%20over%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Every%20coded%20item%20at%20once%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22tolerance%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20difference%20within%20which%20two%20computed%20numbers%20count%20as%20equal.%20A%20tonnage%20recomputed%20from%20the%20dimensions%20matches%20the%20stored%20one%20within%20a%20hundredth%2C%20not%20to%20the%20last%20digit.%22%2C%20%22example%22%3A%20%22abs(gt%20-%20gt_expected)%20%3C%3D%200.01%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Equal%2C%20within%20a%20tolerance%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22specification%20table%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20edit%20rules%20written%20as%20data%2C%20one%20row%20per%20rule%3A%20rule%2C%20table%2C%20applies_to%2C%20must_hold%2C%20action%20and%20message.%20A%20specialist%20checks%20a%20row%20against%20the%20codebook's%20words%2C%20and%20a%20program%20runs%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%203%20%C2%B7%20Rules%20as%20data%3A%20a%20specification%20table%20run%20to%20a%20failure%20report%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22runner%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20short%20function%20that%20runs%20every%20row%20of%20a%20specification%20table%20the%20same%20way%3A%20keep%20the%20rows%20in%20scope%2C%20evaluate%20the%20condition%2C%20count%20the%20failures%20per%20household.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Exercise%204.5.%20The%20runner%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22failure%20report%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20runner's%20output%3A%20one%20long%20table%20with%20a%20row%20per%20rule%20and%20household%2C%20with%20how%20many%20of%20the%20household's%20rows%20fail%2C%20the%20action%20and%20the%20message.%20Module%208%20adds%20its%20flags%20in%20the%20same%20shape.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20The%20failure%20report%3A%20its%20shape%2C%20which%20module%208%20reuses%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22row%20id%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22The%20number%20the%20system%20gives%20each%20row%20it%20stores.%20A%20row%20entered%20twice%20has%20two%20ids%2C%20so%20no%20two%20rows%20are%20equal%20in%20every%20column%20until%20the%20id%20is%20left%20out.%22%2C%20%22example%22%3A%20%22row_id%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%205%20%C2%B7%20Duplicates%20by%20key%20and%20by%20a%20stated%20definition%3B%20the%20referral%20list%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22duplicate%20by%20key%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22Rows%20that%20share%20a%20key%2C%20whatever%20their%20other%20columns%20hold.%20Each%20key%20subset%20finds%20its%20own%20kind%3A%20a%20unit%20entered%20twice%2C%20a%20species%20twice%20in%20one%20unit%2C%20one%20boat%20registration%20under%20two%20units.%22%2C%20%22example%22%3A%20%22duplicated(subset%3Dkey%2C%20keep%3DFalse)%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20By%20key%3A%20the%20columns%20that%20should%20name%20a%20row%20once%22)%2C%20(E%2C%20%22%23%23%23%20Key%20subsets%3A%20a%20duplicate%20is%20a%20duplicate%20of%20something%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22exact%20copy%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20row%20equal%20to%20another%20in%20every%20column%20but%20its%20row%20id%3A%20the%20same%20answer%20stored%20twice.%20Dropping%20it%20loses%20nothing%3B%20a%20copy%20that%20differs%20is%20two%20answers%2C%20and%20goes%20to%20a%20person.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Edited%20by%20rule%20or%20referred%22)%2C%20(PR%2C%20%22%23%23%20S1.5%20%C2%B7%20Drop%20exact%20copies%2C%20keep%20everything%20else%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22edited%20by%20rule%2C%20referred%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20failure%20is%20edited%20by%20rule%20when%20the%20right%20value%20follows%20from%20the%20data%20with%20no%20judgment%2C%20and%20referred%20when%20a%20person%20must%20decide%20from%20the%20questionnaire%20or%20a%20callback.%20The%20specification%20table's%20action%20column%20records%20which.%22%2C%20%22example%22%3A%20%22action%3A%20edit%20or%20refer%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Edited%20by%20rule%20or%20referred%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22referral%20list%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22What%20still%20fails%20when%20every%20rule%20runs%20again%20after%20the%20edits%20by%20rule%3A%20the%20households%20a%20person%20decides.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Edited%20by%20rule%20or%20referred%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22edit%20log%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22One%20row%20per%20changed%20value%20or%20dropped%20row%2C%20with%20its%20value%20before%20and%20after.%20A%20supervisor%20can%20read%20every%20change%20a%20program%20made%2C%20and%20undo%20one.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20The%20edits%2C%20then%20every%20rule%20again%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22false%20alarm%22%2C%20%22kind%22%3A%20%22Edit%20rules%22%2C%20%22meaning%22%3A%20%22A%20flag%20on%20a%20record%20where%20nothing%20is%20wrong.%20A%20rule%20that%20fires%20on%20correct%20rows%20wastes%20an%20editor's%20time%20and%20teaches%20them%20to%20ignore%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20What%20the%20report%20finds%20besides%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Tables%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22recode%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22Turning%20codes%20into%20the%20categories%20a%20table%20reports%2C%20with%20No%20answer%20and%20Invalid%20value%20for%20what%20is%20not%20a%20valid%20code.%20Each%20kind%20of%20code%20has%20its%20own%20tool%3A%20a%20dictionary%2C%20a%20mapping%20table%2C%20np.select%2C%20pd.cut.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%201%20%C2%B7%20Categories%20from%20codes%3A%20mapping%20tables%2C%20np.select%2C%20pd.cut%2C%20top-N%20with%20other%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22mapping%20table%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20code%20list%20with%20a%20column%20that%20is%20the%20recode%2C%20from%20code%20to%20group.%20A%20new%20code%20then%20needs%20one%20row%20in%20the%20list%20and%20no%20change%20to%20the%20code.%22%2C%20%22example%22%3A%20'education.set_index(%22code%22)%5B%22group%22%5D'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20A%20mapping%20table%3A%20the%20code%20list%20is%20the%20recode%22)%2C%20(R%2C%20%22%23%23%23%20Exercise%205.1.%20Education%20groups%20from%20the%20code%20list%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22top%20N%20with%20Other%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20table%20of%20the%20N%20categories%20with%20the%20most%20rows%20and%20the%20rest%20pooled%20as%20Other.%20It%20hides%20three%20decisions%3A%20ranked%20by%20what%2C%20which%20codes%20may%20rank%2C%20and%20how%20ties%20break.%22%2C%20%22example%22%3A%20'forcats%3A%3Afct_lump_n(name%2C%20n%20%3D%208%2C%20other_level%20%3D%20%22Other%22)'%2C%20%22where%22%3A%20%5B(R%2C%20'%23%23%23%20The%20top%20eight%20species%2C%20and%20%22Other%22')%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22distinct%20units%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22The%20number%20of%20different%20values%20of%20a%20unit's%20key%2C%20every%20column%20of%20it%20included.%20Counting%20rows%20counts%20a%20fishing%20unit%20once%20per%20catch%20row%20and%20a%20household%20once%20per%20unit.%22%2C%20%22example%22%3A%20'drop_duplicates(%5B%22region_code%22%2C%20%22hh_id%22%5D)'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%202%20%C2%B7%20Distinct%20counts%20by%20group%20at%20national%2C%20regional%20and%20provincial%20levels%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22multiple-response%20table%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20table%20where%20one%20unit%20can%20fall%20in%20several%20rows%2C%20such%20as%20fishing%20units%20by%20species.%20Its%20rows%20add%20up%20to%20more%20than%20its%20total%2C%20which%20counts%20distinct%20units%20over%20the%20whole%20table.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Fishing%20units%20by%20species%3A%20one%20unit%2C%20many%20species%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22levels%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22The%20national%2C%20regional%20and%20provincial%20cuts%20a%20survey%20table%20is%20published%20at.%20Each%20is%20a%20group_by%20of%20its%20own%2C%20and%20the%20three%20are%20stacked%20into%20one%20long%20table%20with%20a%20column%20that%20says%20the%20level.%22%2C%20%22example%22%3A%20'level%3A%20%22national%22%2C%20%22regional%22%2C%20%22provincial%22'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Three%20levels%3A%20national%2C%20regional%20and%20provincial%22)%2C%20(PB%2C%20%22%23%23%23%20Exercise%207.1.%20Every%20level%20in%20one%20long%20table%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22tabulation%20frame%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22The%20one%20table%20an%20estimate%20is%20computed%20from%3A%20a%20row%20per%20unit%2C%20every%20column%20a%20table%20is%20cut%20by%2C%20and%20the%20design%20columns.%20svy%20reads%20it.%22%2C%20%22example%22%3A%20%22one%20row%20per%20operator%2C%20with%20stratum_id%2C%20psu_id%2C%20psus_in_stratum%20and%20sel_final_weight%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%203%20%C2%B7%20The%20tabulation%20frame%20an%20estimate%20is%20computed%20from%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22unweighted%20table%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20count%20of%20the%20units%20interviewed%2C%20each%20with%20the%20same%20say%3A%20it%20describes%20the%20sample%2C%20not%20the%20population.%20A%20published%20table%20prints%20it%20as%20n%20beside%20each%20estimate.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Unweighted%20tables%3A%20every%20category%2C%20in%20order%22)%2C%20(R%2C%20%22%23%23%23%20From%20here%20to%20module%206%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22empty%20category%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20category%20with%20no%20unit%20in%20it%2C%20shown%20with%20a%200.%20A%20published%20table%20lists%20every%20category%20in%20its%20order%2C%20so%20a%20reader%20sees%20what%20the%20survey%20did%20not%20find.%22%2C%20%22example%22%3A%20%22pd.crosstab(...%2C%20dropna%3DFalse)%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Unweighted%20tables%3A%20every%20category%2C%20in%20order%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22CV%20flag%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20mark%20on%20an%20estimate%20by%20its%20CV%20band%3A%20publish%2C%20caution%20or%20suppress.%20A%20suppressed%20estimate's%20table%20shows%20its%20flag%20and%20CV%20but%20not%20the%20estimate%20or%20its%20SE.%20The%20survey's%20own%20rule%20publishes%20up%20to%2020%25%2C%20cautions%20up%20to%2035%25%20and%20suppresses%20above.%22%2C%20%22example%22%3A%20%22publish%2C%20caution%2C%20suppress%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20A%20CV%20threshold%20for%20publishing%22)%2C%20(ST%2C%20%22%23%23%23%20CV%20flags%3A%20which%20estimates%20a%20reader%20can%20trust%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22number%20format%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22The%20pattern%20Excel%20uses%20to%20show%20a%20cell's%20value%20without%20changing%20it.%20A%20reader%20who%20uses%20the%20cell%20in%20a%20formula%20still%20gets%20the%20full%20value.%22%2C%20%22example%22%3A%20'%22%23%2C%23%230%22%20shows%204881.7613%20as%204%2C882'%2C%20%22where%22%3A%20%5B(PB%2C%20%22%23%23%201%20%C2%B7%20Tables%20to%20a%20workbook%3A%20sheets%2C%20number%20formats%2C%20a%20notes%20sheet%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22notes%20sheet%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22The%20workbook's%20sheet%20that%20says%20what%20the%20tables%20are%2C%20which%20data%20and%20regions%20they%20come%20from%2C%20the%20design%2C%20what%20each%20flag%20means%20and%20when%20they%20were%20made.%20A%20table%20read%20away%20from%20its%20source%20needs%20its%20source%20on%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(PB%2C%20%22%23%23%23%20The%20notes%20sheet%2C%20and%20the%20workbook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22report%20notebook%22%2C%20%22kind%22%3A%20%22Tables%22%2C%20%22meaning%22%3A%20%22A%20marimo%20notebook%20whose%20cells%20read%20the%20script's%20outputs%20and%20whose%20sentences%20are%20f-strings%2C%20so%20every%20number%20comes%20from%20a%20file.%20Exported%20as%20HTML%20without%20its%20code%2C%20it%20is%20a%20page%20anyone%20can%20open.%22%2C%20%22example%22%3A%20%22marimo%20export%20html%20report.py%20-o%20report.html%20--no-include-code%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20A%20marimo%20notebook%20as%20the%20report%22)%2C%20(P1%2C%20%22%23%23%208%20%C2%B7%20Reports%3A%20Quarto%20against%20marimo%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Survey%20design%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22probability%20sample%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20sample%20drawn%20by%20a%20rule%20that%20gives%20every%20unit%20of%20the%20population%20a%20known%20chance%20of%20being%20drawn.%20The%20known%20chance%20is%20what%20lets%20each%20unit%20stand%20for%20others.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P2%2C%20%22%23%23%201%20%C2%B7%20A%20sample%20stands%20for%20a%20population%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22sample%20design%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20rule%20a%20sample%20is%20drawn%20by%3A%20its%20strata%2C%20its%20stages%20and%20how%20many%20units%20each%20draws.%20The%20SE%20of%20an%20estimate%20depends%20on%20it%20as%20well%20as%20on%20the%20sample's%20size.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P2%2C%20%22%23%23%201%20%C2%B7%20A%20sample%20stands%20for%20a%20population%22)%2C%20(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22stratum%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20part%20of%20the%20population%20sampled%20on%20its%20own%2C%20with%20its%20own%20rules%3B%20the%20plural%20is%20strata.%20The%20survey's%20strata%20are%20province%20%C3%97%20sel_stratum%2C%20four%20in%20each%20province.%22%2C%20%22example%22%3A%20%22stratum_id%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22take-all%20stratum%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20stratum%20whose%20units%20are%20all%20taken%2C%20as%20the%20survey's%20stratum%20F%20takes%20every%20household%20on%20the%20register%20of%20large%20units.%20It%20adds%20no%20sampling%20error%2C%20since%20another%20sample%20would%20hold%20the%20same%20units.%22%2C%20%22example%22%3A%20%22stratum%20F%2C%20sel_ea%20blank%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%203%20%C2%B7%20The%20finite%20population%20correction%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22PSU%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20primary%20sampling%20unit%3A%20what%20is%20drawn%20at%20the%20first%20stage.%20In%20the%20survey%20it%20is%20the%20enumeration%20area%3B%20in%20stratum%20F%20each%20household%20is%20its%20own%20PSU.%22%2C%20%22example%22%3A%20%22psu_id%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22cluster%20sample%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20sample%20that%20draws%20groups%2C%20such%20as%20areas%2C%20and%20interviews%20the%20units%20in%20them.%20Units%20of%20one%20cluster%20resemble%20each%20other%2C%20so%20they%20tell%20less%20than%20as%20many%20units%20drawn%20apart.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22design%20weight%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20inverse%20of%20a%20unit's%20chance%20of%20being%20drawn%3A%20how%20many%20units%20of%20the%20population%20it%20stands%20for%20by%20design.%20An%20area%20drawn%204%20in%2010%20gives%20each%20of%20its%20households%20a%20weight%20of%202.5.%22%2C%20%22example%22%3A%20%22sel_design_weight%22%2C%20%22where%22%3A%20%5B(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22final%20weight%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20design%20weight%20after%20its%20adjustments%3A%20for%20the%20households%20that%20did%20not%20respond%20(sel_nr_weight)%2C%20then%20calibrated%20to%20each%20province's%20listed%20fishing%20households%20by%20scale%20(sel_final_weight).%20The%20course's%20estimates%20use%20sel_final_weight.%22%2C%20%22example%22%3A%20%22sel_final_weight%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22finite%20population%20correction%20(fpc)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20factor%201%20%E2%88%92%20n%2FN%20that%20shrinks%20a%20stratum's%20variance%20by%20the%20share%20of%20its%20PSUs%20drawn.%20A%20stratum%20drawn%20whole%20has%20an%20fpc%20of%200%20and%20no%20sampling%20error.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%201%20%C2%B7%20The%20design%20in%20words%20and%20in%20svy%3A%20weights%2C%20strata%2C%20PSUs%2C%20fpc%2C%20lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%203%20%C2%B7%20The%20finite%20population%20correction%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22sampling%20fraction%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20share%20of%20a%20stratum's%20PSUs%20drawn%2C%20f%20%3D%20n%2FN.%20A%20design%20written%20for%20R%20often%20gives%20the%20fpc%20this%20way%3B%20the%20count%20follows%20as%20N%20%3D%20n%2Ff%2C%20with%20n%20counted%20as%20distinct%20PSUs%20in%20the%20data.%22%2C%20%22example%22%3A%20%224%20%2F%200.4%20%3D%2010%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20From%20fractions%20to%20counts%22)%2C%20(P2%2C%20%22%23%23%203%20%C2%B7%20The%20finite%20population%20correction%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22population%20count%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20stratum's%20number%20of%20PSUs%20in%20the%20population%2C%20N.%20The%20stratum%20counts%2C%20data%2Fstratum_counts.csv%2C%20give%20it%20as%20eas_in_frame%2C%20and%20the%20course's%20design%20frame%20as%20psus_in_stratum%3B%20svy%20takes%20the%20fpc%20as%20this%20count.%22%2C%20%22example%22%3A%20%22psus_in_stratum%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20From%20fractions%20to%20counts%22)%2C%20(P2%2C%20%22%23%23%202%20%C2%B7%20Strata%2C%20PSUs%20and%20weights%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22lonely%20PSU%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20one%20PSU%20of%20a%20stratum%20that%20has%20only%20one%20in%20the%20data.%20Its%20stratum's%20share%20of%20the%20variance%20cannot%20be%20measured%2C%20so%20a%20rule%20must%20decide%20it.%22%2C%20%22example%22%3A%20%22singleton%3D%5C%22skip%5C%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Lonely%20PSUs%22)%2C%20(P2%2C%20%22%23%23%204%20%C2%B7%20The%20standard%20error%20of%20a%20stratified%20total%2C%20and%20the%20CV%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22standard%20error%20(SE)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22How%20much%20an%20estimate%20would%20vary%20over%20all%20the%20samples%20the%20design%20could%20draw.%20It%20is%20estimated%20from%20the%20one%20sample%2C%20from%20how%20much%20each%20stratum's%20PSUs%20differ.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%202%20%C2%B7%20Totals%2C%20means%20and%20proportions%20with%20SE%2C%20CV%20and%20CI%20by%20domain%22)%2C%20(P2%2C%20%22%23%23%204%20%C2%B7%20The%20standard%20error%20of%20a%20stratified%20total%2C%20and%20the%20CV%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ultimate%20cluster%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20variance%20computed%20from%20the%20PSUs'%20weighted%20totals%20alone%2C%20whatever%20happens%20inside%20a%20PSU.%20It%20is%20what%20svy%2C%20R's%20survey%20and%20ReGenesees%20compute%20when%20a%20design%20names%20strata%20and%20PSUs.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%202%20%C2%B7%20Totals%2C%20means%20and%20proportions%20with%20SE%2C%20CV%20and%20CI%20by%20domain%22)%2C%20(P2%2C%20%22%23%23%204%20%C2%B7%20The%20standard%20error%20of%20a%20stratified%20total%2C%20and%20the%20CV%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22coefficient%20of%20variation%20(CV)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20SE%20as%20a%20share%20of%20the%20estimate%3A%20a%20CV%20of%200.05%20says%20the%20estimate%20is%20uncertain%20by%20about%205%25%20of%20itself.%20svy%20gives%20it%20as%20a%20fraction.%22%2C%20%22example%22%3A%20%22CV%20%3D%20SE%20%2F%20estimate%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%202%20%C2%B7%20Totals%2C%20means%20and%20proportions%20with%20SE%2C%20CV%20and%20CI%20by%20domain%22)%2C%20(P2%2C%20%22%23%23%204%20%C2%B7%20The%20standard%20error%20of%20a%20stratified%20total%2C%20and%20the%20CV%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22confidence%20interval%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20estimate%20plus%20and%20minus%20t(0.975%2C%20df)%20standard%20errors%2C%20for%2095%25.%20Student's%20t%20takes%20the%20design's%20degrees%20of%20freedom.%22%2C%20%22example%22%3A%20%22scipy.stats.t.ppf(0.975%2C%20df)%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20confidence%20interval%20and%20its%20degrees%20of%20freedom%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22degrees%20of%20freedom%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20design's%20independent%20pieces%20of%20information%20about%20the%20variance%3A%20PSUs%20less%20strata%2C%20counted%20over%20the%20PSUs%20and%20strata%20that%20hold%20the%20rows%20used.%22%2C%20%22example%22%3A%20%22df%20%3D%20PSUs%20%E2%88%92%20strata%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20confidence%20interval%20and%20its%20degrees%20of%20freedom%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Taylor%20linearization%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Replacing%20a%20ratio%2C%20such%20as%20a%20mean%2C%20by%20the%20total%20of%20a%20linearized%20value%20that%20varies%20the%20same%20way%2C%20to%20a%20first%20approximation.%20The%20ratio's%20variance%20is%20then%20the%20variance%20of%20that%20total.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Means%20and%20proportions%3A%20a%20ratio%2C%20linearized%22)%2C%20(P2%2C%20%22%23%23%205%20%C2%B7%20Means%20and%20shares%3A%20Taylor%20linearization%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22linearized%20value%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20value%20z%20each%20unit%20gets%20so%20that%20the%20total%20of%20z%20varies%20as%20a%20ratio%20does.%20For%20a%20mean%2C%20z%20%3D%20w%20(y%20%E2%88%92%20%C8%B3)%20%2F%20%CE%A3w%3B%20a%20proportion%20is%20the%20mean%20of%20a%200%2F1%20column.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P2%2C%20%22%23%23%205%20%C2%B7%20Means%20and%20shares%3A%20Taylor%20linearization%22)%2C%20(W%2C%20%22%23%23%23%20Exercise%206.6.%20A%20domain%20mean%2C%20from%20the%20formula%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22domain%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20part%20of%20the%20population%20an%20estimate%20is%20made%20for%3A%20a%20province%2C%20the%20large-scale%20units.%20The%20design%20is%20declared%20on%20every%20row%20and%20the%20domain%20chosen%20afterwards%3B%20filtering%20first%20gives%20a%20wrong%20SE.%22%2C%20%22example%22%3A%20'by%3D%22province%22%2C%20where%3D...'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Domains%3A%20%60by%3D%60%20and%20%60where%3D%60%2C%20never%20a%20filter%20first%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22weighted%2C%20unweighted%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22An%20unweighted%20figure%20describes%20the%20sample%3B%20a%20weighted%20one%20describes%20the%20population%20the%20sample%20stands%20for.%20They%20differ%20most%20where%20the%20design%20takes%20a%20group%20in%20a%20larger%20share%20on%20purpose.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%203%20%C2%B7%20Weighted%20and%20unweighted%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22design%20whose%20every%20weight%20is%201%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22An%20R%20idiom%20for%20the%20sample's%20own%20sums%20and%20counts%3A%20a%20column%20of%20ones%2C%20w_one%2C%20as%20both%20the%20cluster%20and%20the%20weight.%20Each%20total%20is%20then%20the%20sample's%20sum%3B%20the%20one%20cluster%20is%20a%20lonely%20PSU%2C%20so%20ReGenesees%20stops%20unless%20RG.lonely.psu%20is%20set.%20In%20Python%2C%20one%20groupby%20gives%20the%20same%20counts.%22%2C%20%22example%22%3A%20%22e.svydesign(data%20%3D%20hh%2C%20ids%20%3D%20~w_one%2C%20weights%20%3D%20~w_one)%22%2C%20%22where%22%3A%20%5B(P1%2C%20%22%23%23%206%20%C2%B7%20Survey%20estimates%3A%20survey%20and%20ReGenesees%20against%20svy%2C%20and%20against%20your%20own%20code%22)%2C%20(W%2C%20%22%23%23%203%20%C2%B7%20Weighted%20and%20unweighted%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22design%20effect%20(deff)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20design's%20variance%20over%20the%20variance%20a%20simple%20random%20sample%20of%20the%20same%20size%20would%20have.%20A%20deff%20of%202%20says%20the%20design%20needs%20twice%20the%20sample%20for%20the%20same%20precision.%22%2C%20%22example%22%3A%20'deff%3D%22wor%22'%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20design%20effect%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22effective%20sample%20size%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20sample's%20size%20divided%20by%20the%20deff%3A%20how%20many%20units%20a%20simple%20random%20sample%20would%20need%20for%20the%20same%20precision.%22%2C%20%22example%22%3A%20%22n%20%2F%20deff%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20design%20effect%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22stratum%20jumper%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20household%20sampled%20in%20an%20area%20stratum%20that%20turned%20out%20to%20run%20a%20large-scale%20unit.%20Its%20weight%20is%20right%20by%20design%2C%20and%20such%20households%20carry%20most%20of%20a%20large-scale%20estimate's%20variance.%20The%20survey%20stores%20no%20flag%20for%20it%3A%20a%20join%20finds%20it.%22%2C%20%22example%22%3A%20%22sel_stratum%20in%20A%2C%20B%20or%20C%2C%20with%20a%20unit%20of%20unit_scale%20%3D%202%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%203%20%C2%B7%20Weighted%20and%20unweighted%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22copied%20interview%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20household%20entered%20twice%20under%20two%20ids%2C%20the%20copy%20two%20days%20later.%20In%20a%20take-all%20stratum%20it%20can%20add%20a%20PSU%20the%20population%20does%20not%20have%2C%20and%20svy%20refuses%20the%20design.%22%2C%20%22example%22%3A%20%22%5BFPC_POP_LT_SAMPLE%5D%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20What%20the%20extra%20PSU%20is%22)%2C%20(P2%2C%20%22%23%23%206%20%C2%B7%20The%20same%20on%20the%20survey%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22survey%20package%20(R)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22R's%20package%20for%20design-based%20estimation%3B%20svydesign%20declares%20the%20design%2C%20and%20takes%20the%20fpc%20as%20population%20sizes%20or%20as%20sampling%20fractions.%22%2C%20%22example%22%3A%20%22svydesign(ids%20%3D%20~psu_id%2C%20strata%20%3D%20~stratum_id%2C%20fpc%20%3D%20~fpc%2C%20weights%20%3D%20~sel_final_weight%2C%20data%20%3D%20hh)%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20R%20way%20and%20the%20Python%20way%22)%2C%20(P1%2C%20%22%23%23%206%20%C2%B7%20Survey%20estimates%3A%20survey%20and%20ReGenesees%20against%20svy%2C%20and%20against%20your%20own%20code%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ReGenesees%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22An%20R%20package%20for%20design-based%20survey%20estimation%20and%20calibration.%20Module%206%20maps%20its%20calls%20to%20svy%20and%20to%20the%20course's%20own%20functions.%22%2C%20%22example%22%3A%20%22e.svydesign%2C%20svystatTM%2C%20e.calibrate%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%204%20%C2%B7%20From%20ReGenesees%20to%20svy%2C%20call%20by%20call%22)%2C%20(P1%2C%20%22%23%23%206%20%C2%B7%20Survey%20estimates%3A%20survey%20and%20ReGenesees%20against%20svy%2C%20and%20against%20your%20own%20code%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22own%20only%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Module%206's%20mark%20for%20a%20ReGenesees%20call%20with%20no%20svy%20equivalent%20and%20none%20in%20another%20maintained%20Python%20package%20the%20course%20found%20(November%202026).%20The%20course's%20own%20function%2C%20written%20from%20the%20formula%2C%20stands%20alone.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%204%20%C2%B7%20From%20ReGenesees%20to%20svy%2C%20call%20by%20call%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ratio%20estimator%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22One%20estimated%20total%20over%20another%2C%20such%20as%20boats%20per%20fishing%20unit%2C%20linearized%20for%20its%20SE.%20A%20mean%20is%20the%20ratio%20with%20x%20%3D%201%20on%20every%20row%3B%20ReGenesees'%20svystatR.%22%2C%20%22example%22%3A%20'sample.estimation.ratio(y%3D%22boats%22%2C%20x%3D%22units%22)'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Ratios%3A%20%60svystatR%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22share%20ratio%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22The%20ratio%20between%20two%20classes'%20totals%20of%20one%20variable%2C%20such%20as%20one%20province's%20fishing%20units%20over%20another's.%20ReGenesees'%20svystatSR%3B%20in%20svy%2C%20a%20contrast.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Share%20ratios%3A%20%60svystatSR%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22delta%20method%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Carrying%20estimates'%20variances%20and%20covariances%20through%20a%20function%20of%20them%2C%20to%20a%20first%20approximation.%20svy's%20contrast%20applies%20it%20to%20the%20estimates%20of%20one%20result.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Share%20ratios%3A%20%60svystatSR%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22complex%20estimator%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Any%20function%20of%20several%20totals%2C%20such%20as%20(%C5%B6a%20%E2%88%92%20%C5%B6b)%20%2F%20%C5%B6b%2C%20linearized%20through%20its%20gradient.%20ReGenesees'%20svystatL.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Complex%20estimators%3A%20%60svystatL%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22self-representing%20stratum%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22A%20large%20area%20taken%20with%20certainty%20as%20a%20stratum%20of%20its%20own%2C%20with%20households%20or%20segments%20drawn%20inside%20it.%20Its%20one%20PSU%20has%20nothing%20to%20compare%20with%2C%20so%20its%20variance%20is%20measured%20between%20SSUs.%22%2C%20%22example%22%3A%20'singleton%3D%22self_representing%22'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Self-representing%20strata%20and%20collapsed%20strata%3A%20%60self.rep.str%60%20and%20%60collapse.strata%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22collapsed%20strata%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Strata%20joined%20so%20that%20a%20lonely%20PSU's%20stratum%20has%20PSUs%20to%20be%20compared%20with%3B%20the%20variance%20is%20measured%20over%20the%20merged%20stratum.%20ReGenesees'%20collapse.strata.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Self-representing%20strata%20and%20collapsed%20strata%3A%20%60self.rep.str%60%20and%20%60collapse.strata%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22calibration%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Adjusting%20each%20weight%20by%20a%20factor%20g%2C%20as%20little%20as%20it%20can%2C%20so%20that%20weighted%20totals%20hit%20known%20totals.%20ReGenesees'%20e.calibrate.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Calibration%3A%20%60e.calibrate%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22linear%20calibration%20(GREG)%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Calibration%20with%20the%20linear%20distance%2C%20whose%20factors%20have%20a%20closed%20form%3A%20one%20linear%20solve.%20Nothing%20keeps%20its%20factors%20within%20bounds.%22%2C%20%22example%22%3A%20'calfun%20%3D%20%22linear%22'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Calibration%3A%20%60e.calibrate%60%22)%2C%20(W%2C%20%22%23%23%23%20Exercise%206.9.%20Linear%20calibration%2C%20from%20the%20formula%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22poststratification%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Calibration%20on%20one%200%2F1%20column%20per%20class%3A%20every%20weight%20of%20a%20class%20is%20multiplied%20by%20the%20class's%20known%20total%20over%20its%20weighted%20count.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Exercise%206.9.%20Linear%20calibration%2C%20from%20the%20formula%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22logit%20calibration%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Calibration%20with%20Deville%20and%20S%C3%A4rndal's%20logit%20distance%2C%20whose%20factors%20stay%20between%20bounds%20L%20and%20U%20by%20their%20shape.%20Bounds%20that%20are%20too%20tight%20have%20no%20solution.%22%2C%20%22example%22%3A%20'calfun%20%3D%20%22logit%22%2C%20bounds%20%3D%20c(L%2C%20U)'%2C%20%22where%22%3A%20%5B(W%2C%20'%23%23%23%20Bounded%20logit%20calibration%3A%20%60e.calibrate(calfun%20%3D%20%22logit%22%2C%20bounds%20%3D%20c(L%2C%20U))%60%20%E2%80%94%20own%20only')%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22integrated%20weighting%22%2C%20%22kind%22%3A%20%22Survey%20design%22%2C%20%22meaning%22%3A%20%22Calibration%20that%20leaves%20every%20unit%20of%20a%20cluster%20with%20one%20weight%2C%20so%20a%20household's%20members%20add%20up%20to%20the%20household.%20ReGenesees'%20aggregate.stage.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20One%20weight%20per%20cluster%3A%20%60e.calibrate(...%2C%20aggregate.stage%20%3D%201)%60%20%E2%80%94%20own%20only%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20svy%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22svy%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22A%20maintained%20Python%20library%20for%20design-based%20survey%20estimation.%20The%20course%20pins%20version%200.36.0%2C%20since%20its%20interface%20still%20changes%20from%20one%20release%20to%20the%20next.%22%2C%20%22example%22%3A%20%22import%20svy%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20R%20way%20and%20the%20Python%20way%22)%2C%20(P1%2C%20%22%23%23%206%20%C2%B7%20Survey%20estimates%3A%20survey%20and%20ReGenesees%20against%20svy%2C%20and%20against%20your%20own%20code%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22svy.Design%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22Names%20the%20design's%20columns%3A%20the%20strata%2C%20the%20PSUs%2C%20the%20weight%2C%20the%20population%20counts%20and%20the%20rule%20for%20a%20lonely%20PSU.%20It%20holds%20no%20data.%22%2C%20%22example%22%3A%20'svy.Design(stratum%3D%22stratum_id%22%2C%20psu%3D%22psu_id%22%2C%20wgt%3D%22sel_final_weight%22%2C%20pop_size%3D%22psus_in_stratum%22%2C%20singleton%3D%22skip%22)'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20design%20in%20svy%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22svy.Sample%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22Binds%20a%20Design%20to%20a%20polars%20table%3B%20every%20estimate%20is%20a%20method%20of%20it.%20A%20pandas%20table%20goes%20in%20through%20pl.from_pandas.%22%2C%20%22example%22%3A%20%22svy.Sample(data%3Dpl.from_pandas(frame)%2C%20design%3Ddesign)%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20From%20here%20to%20module%206%22)%2C%20(W%2C%20%22%23%23%23%20The%20design%20in%20svy%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pop_size%3D%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22The%20column%20with%20each%20stratum's%20population%20count%20of%20PSUs%2C%20the%20same%20on%20every%20row%20of%20a%20stratum.%20svy%20refuses%20a%20fraction%20there.%22%2C%20%22example%22%3A%20'pop_size%3D%22psus_in_stratum%22'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20From%20fractions%20to%20counts%22)%2C%20(P2%2C%20%22%23%23%203%20%C2%B7%20The%20finite%20population%20correction%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22singleton%3D%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22svy's%20rule%20for%20a%20lonely%20PSU%3A%20skip%2C%20center%2C%20scale%2C%20self_representing%2C%20collapse%20or%20pool.%20svy%20applies%20none%20until%20told.%22%2C%20%22example%22%3A%20'singleton%3D%22skip%22'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Lonely%20PSUs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22sample.estimation%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22svy's%20estimates%3A%20total%2C%20mean%2C%20prop%20and%20ratio%2C%20each%20taking%20y%3D%2C%20by%3D%20and%20where%3D.%20.to_polars()%20gives%20each%20as%20a%20table%20of%20est%2C%20se%2C%20lci%2C%20uci%2C%20cv%2C%20df%20and%20n.%22%2C%20%22example%22%3A%20'sample.estimation.total(y%3D%22hh_roster_members%22%2C%20by%3D%22province_code%22).to_polars()'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%202%20%C2%B7%20Totals%2C%20means%20and%20proportions%20with%20SE%2C%20CV%20and%20CI%20by%20domain%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22by%3D%20and%20where%3D%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22svy's%20domains%3A%20by%3D%20gives%20a%20row%20per%20level%2C%20where%3D%20one%20domain.%20Both%20keep%20every%20row%20in%20the%20design%2C%20so%20the%20SE%20is%20right.%22%2C%20%22example%22%3A%20'by%3D%22province%22'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Domains%3A%20%60by%3D%60%20and%20%60where%3D%60%2C%20never%20a%20filter%20first%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22svy's%20error%20codes%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22svy's%20errors%20put%20a%20code%20in%20square%20brackets%20on%20the%20line%20that%20names%20the%20problem%2C%20and%20a%20hint%20at%20the%20end.%20%5BFPC_POP_LT_SAMPLE%5D%20says%20a%20stratum%20holds%20more%20PSUs%20than%20its%20population%3B%20%5BSINGLETON_ERROR%5D%20names%20a%20lonely%20PSU.%22%2C%20%22example%22%3A%20%22%5BFPC_POP_LT_SAMPLE%5D%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20design%2C%20checked%20before%20it%20is%20used%22)%2C%20(W%2C%20%22%23%23%23%20Lonely%20PSUs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22contrast%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22A%20function%20of%20the%20estimates%20of%20one%20svy%20result%2C%20with%20its%20SE%20by%20the%20delta%20method%2C%20such%20as%20the%20ratio%20of%20two%20provinces'%20totals.%22%2C%20%22example%22%3A%20'result.contrast(%7B%22a%2Fb%22%3A%20svy.estd(%22a%22)%20%2F%20svy.estd(%22b%22)%7D)'%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Share%20ratios%3A%20%60svystatSR%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22weighting.calibrate%22%2C%20%22kind%22%3A%20%22svy%22%2C%20%22meaning%22%3A%20%22svy's%20linear%20calibration%20to%20known%20totals%3B%20a%20categorical%20control%20becomes%20one%20column%20per%20level.%20svy%200.36.0%20has%20no%20logit%20distance%20and%20refuses%20bounds.%22%2C%20%22example%22%3A%20%22sample.weighting.calibrate(controls%3D%7B...%7D)%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20Calibration%3A%20%60e.calibrate%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Scripts%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22re-runnable%20script%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22One%20command%20that%20runs%20every%20step%20in%20order%2C%20says%20what%20it%20did%20and%20stops%20when%20it%20cannot%20do%20the%20job%20right.%20Next%20round%2C%20someone%20else%20runs%20it%20and%20gets%20the%20same%20tables%20from%20the%20same%20inputs.%22%2C%20%22example%22%3A%20%22uv%20run%20python%20scratch%2Fpublish%2Ftabulate.py%20--help%22%2C%20%22where%22%3A%20%5B(PB%2C%20%22%23%23%202%20%C2%B7%20The%20tabulation%20as%20one%20script%2C%20from%20the%20flat%20table%20to%20one%20workbook%22)%2C%20(ST%2C%20%22%23%23%23%20The%20tabulation%20as%20one%20re-runnable%20script%20with%20a%20log%20and%20an%20output%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22exit%20code%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22The%20number%20a%20program%20returns%20to%20whatever%20ran%20it%3A%200%20for%20success%2C%20anything%20else%20for%20a%20failure.%20The%20stretch%20S2's%20script%20uses%20sysexits.h's%3A%2066%20for%20a%20missing%20input%2C%2065%20for%20data%20that%20fails%20a%20check%2C%202%20for%20an%20option%20written%20wrong.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20tabulation%20as%20one%20re-runnable%20script%20with%20a%20log%20and%20an%20output%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22stdout%2C%20stderr%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22A%20program's%20two%20output%20streams.%20Standard%20output%20is%20for%20the%20result%20another%20program%20reads%3B%20standard%20error%20is%20for%20messages%20to%20the%20person%2C%20the%20log%20included.%22%2C%20%22example%22%3A%20%22python%20tabulate.py%202%3E%20run.log%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20tabulation%20as%20one%20re-runnable%20script%20with%20a%20log%20and%20an%20output%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22refusal%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22A%20script%20stopping%20on%20incomplete%20input%2C%20such%20as%20an%20expected%20region%20with%20no%20rows%20in%20the%20flat%20table%2C%20with%20a%20message%20and%20an%20exit%20code%2C%20unless%20it%20is%20told%20on%20purpose%20to%20go%20ahead.%22%2C%20%22example%22%3A%20%22--allow-missing%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%20S2.8%20%C2%B7%20Refuse%20a%20missing%20region%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22checks%20before%20publishing%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22Tests%20of%20what%20the%20estimates%20rest%20on%2C%20run%20before%20they%20are%20computed%2C%20each%20failure%20named%20in%20a%20sentence%20a%20person%20can%20act%20on.%20One%20is%20that%20no%20stratum%20holds%20more%20PSUs%20than%20its%20population.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20Checks%20before%20publishing%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22manifest%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22A%20small%20table%20beside%20the%20outputs%20with%20a%20row%20per%20file%20read%20or%20written%20and%20a%20fingerprint%20of%20each.%20Two%20runs%20whose%20manifests%20match%20read%20the%20same%20inputs%20and%20wrote%20the%20same%20tables.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20Over%20what%20equality%3A%20the%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fingerprint%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22A%20SHA-256%20hash%3A%2064%20characters%20computed%20from%20a%20file's%20content%2C%20which%20change%20if%20one%20byte%20does%20and%20from%20which%20the%20content%20cannot%20be%20read%20back.%20A%20workbook%20is%20fingerprinted%20by%20its%20cells%2C%20since%20openpyxl%20writes%20the%20moment%20of%20saving%20into%20the%20file.%22%2C%20%22example%22%3A%20%22hashlib.sha256(path.read_bytes()).hexdigest()%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20Over%20what%20equality%3A%20the%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22typer%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22A%20library%20that%20builds%20a%20command%20from%20a%20typed%20Python%20function%3A%20each%20parameter%20becomes%20an%20option%2C%20its%20type%20says%20what%20the%20option%20accepts%2C%20and%20its%20help%20goes%20into%20--help.%22%2C%20%22example%22%3A%20'typer.Option(%22--allow-missing%22%2C%20help%3D%22...%22)'%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20command%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22argparse%22%2C%20%22kind%22%3A%20%22Scripts%22%2C%20%22meaning%22%3A%20%22The%20standard%20library's%20way%20to%20read%20a%20command's%20options%2C%20with%20no%20package%20to%20install.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20command%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Anomalies%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22invalid%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20value%20the%20questionnaire%20does%20not%20allow%2C%20such%20as%20a%20sex%20of%208%20or%20a%20hull%20of%20type%207.%20A%20rule%20finds%20it%2C%20and%20it%20is%20edited%20by%20rule%20or%20referred.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%201%20%C2%B7%20Invalid%2C%20implausible%2C%20unusual%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22implausible%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Allowed%2C%20but%20not%20believable%20beside%20what%20else%20the%20record%20says%2C%20such%20as%20an%20outrigger%20boat%20of%2030%20meters.%20It%20is%20referred%3A%20someone%20checks%20the%20questionnaire%20or%20calls%20the%20household%20back.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%201%20%C2%B7%20Invalid%2C%20implausible%2C%20unusual%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22unusual%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Believable%2C%20but%20rare%2C%20such%20as%20a%20household%20of%20eleven.%20It%20is%20kept%2C%20and%20looked%20at%20when%20it%20moves%20an%20estimate.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%201%20%C2%B7%20Invalid%2C%20implausible%2C%20unusual%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22unit%20error%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20measurement%20written%20in%20the%20wrong%20unit%2C%20such%20as%20feet%20in%20the%20meters%20columns.%20Every%20rule%20passes%20it%2C%20since%20the%20tonnage%20is%20computed%20from%20the%20wrong%20numbers%3B%20the%20length%20for%20that%20type%20of%20boat%20gives%20it%20away.%22%2C%20%22example%22%3A%20%22length%20in%20feet%20%C3%B7%203.281%20%3D%20meters%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%201%20%C2%B7%20Invalid%2C%20implausible%2C%20unusual%22)%2C%20(A%2C%20%22%23%23%203%20%C2%B7%20Ratios%2C%20relations%20and%20weight%20outliers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22z-score%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22(x%20%E2%88%92%20mean)%20%2F%20standard%20deviation.%20An%20outlier%20pulls%20the%20mean%20toward%20itself%20and%20inflates%20the%20standard%20deviation%2C%20so%20in%20a%20small%20group%20a%20cutoff%20of%203%20can%20never%20fire.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%202%20%C2%B7%20Outliers%20within%20groups%3A%20IQR%2C%20robust%20z%2C%20Hidiroglou-Berthelot%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22outlier%20within%20groups%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20value%20far%20from%20the%20others%20of%20its%20own%20group%2C%20by%20a%20threshold%20computed%20in%20each%20group%2C%20such%20as%20the%20boat's%20hull%20or%20the%20household's%20stratum.%20What%20is%20far%20in%20one%20group%20is%20ordinary%20in%20another.%22%2C%20%22example%22%3A%20'groupby(%22boat_hull%22)'%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%202%20%C2%B7%20Outliers%20within%20groups%3A%20IQR%2C%20robust%20z%2C%20Hidiroglou-Berthelot%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22quartiles%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22The%20values%20that%20split%20sorted%20values%20into%20four%20equal%20parts%3A%20Q1%20has%20a%20quarter%20of%20them%20below%20it%2C%20Q3%20three%20quarters.%20pandas'%20quantile%20and%20R's%20default%20compute%20them%20the%20same%20way.%22%2C%20%22example%22%3A%20%22v.quantile(0.25)%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Quartiles%3A%20Tukey's%20fences%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22interquartile%20range%20(IQR)%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Q3%20%E2%88%92%20Q1%2C%20the%20width%20of%20the%20middle%20half%20of%20the%20values.%20A%20few%20extreme%20values%20barely%20move%20it.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Quartiles%3A%20Tukey's%20fences%22)%2C%20(ML%2C%20%22%23%23%23%20Scaling%3A%20every%20column%20on%20one%20footing%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Tukey's%20fences%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20value%20is%20outside%20when%20below%20Q1%20%E2%88%92%20k%20%C3%97%20IQR%20or%20above%20Q3%20%2B%20k%20%C3%97%20IQR%3A%20k%20%3D%201.5%20for%20outside%2C%20a%20box%20plot's%20whiskers%2C%20and%20k%20%3D%203%20for%20far%20out.%22%2C%20%22example%22%3A%20%22boxplot.stats(x)%24out%20in%20R%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Quartiles%3A%20Tukey's%20fences%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22robust%20z%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22(x%20%E2%88%92%20median)%20%2F%20(1.4826%20%C3%97%20MAD)%3A%20a%20distance%20from%20the%20center%20on%20the%20scale%20of%20a%20z-score%2C%20from%20statistics%20a%20few%20extreme%20values%20cannot%20move.%20A%20common%20cutoff%20is%20%7Crobust%20z%7C%20%3E%203.5.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20The%20robust%20z%3A%20median%20and%20MAD%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22MAD%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22The%20median%20absolute%20deviation%3A%20the%20median%20of%20each%20value's%20distance%20from%20the%20median.%20Where%20more%20than%20half%20the%20values%20are%20equal%20it%20is%200%2C%20and%20the%20robust%20z%20cannot%20measure%20distance.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20The%20robust%20z%3A%20median%20and%20MAD%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Hidiroglou-Berthelot%20(HB)%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20method%20for%20outliers%20in%20the%20ratio%20of%20two%20values%20of%20a%20unit%3A%20centered%2C%20so%20a%20doubled%20and%20a%20halved%20ratio%20score%20alike%2C%20and%20weighted%20by%20size%2C%20so%20a%20large%20unit%20counts%20more.%20Statistics%20Canada's%20Banff%20system%20uses%20it%20in%20its%20outlier%20procedure.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Hidiroglou-Berthelot%3A%20a%20ratio%20of%20two%20values%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22HB%20effect%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20unit's%20centered%20ratio%20times%20its%20size%20to%20the%20power%20U.%20HB's%20fences%20are%20C%20times%20each%20side's%20quartile%20distance%20from%20the%20effects'%20median%2C%20with%20a%20minimum%20set%20by%20A.%22%2C%20%22example%22%3A%20%22U%20%3D%200.5%2C%20C%20%3D%205%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Exercise%208.4.%20HB's%20effects%3A%20centered%20ratios%20weighted%20by%20size%22)%2C%20(A%2C%20%22%23%23%23%20Exercise%208.5.%20HB's%20fences%3A%20quartile%20distances%20with%20a%20minimum%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ratio%20check%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22The%20robust%20z%20of%20a%20ratio's%20logarithm%20within%20groups%2C%20so%20ten%20times%20the%20usual%20and%20a%20tenth%20of%20it%20score%20alike.%20A%20boat's%20tonnage%20per%20meter%20of%20length%20finds%20dimensions%20in%20the%20wrong%20unit.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%203%20%C2%B7%20Ratios%2C%20relations%20and%20weight%20outliers%22)%2C%20(A%2C%20%22%23%23%23%20Exercise%208.6.%20A%20ratio%20out%20of%20line%20with%20its%20group%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22weight%20outlier%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20weight%20out%20of%20line%20with%20its%20group.%20A%20final%20weight%20wrong%20for%20its%20province's%20calibration%20is%20an%20error%3B%20a%20weight%20right%20for%20its%20stratum%20that%20dominates%20a%20domain%20is%20not%2C%20and%20goes%20to%20the%20estimation%20team.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(W%2C%20%22%23%23%23%20The%20inflated%20final%20weights%22)%2C%20(A%2C%20%22%23%23%23%20Weight%20outliers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22weight's%20share%20of%20its%20domain%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22How%20much%20one%20household's%20weight%20dominates%20its%20domain%3A%20its%20weight%20over%20the%20domain's%20median%20weight%2C%20and%20over%20the%20domain's%20total%20weight.%22%2C%20%22example%22%3A%20%22vs_median%2C%20share%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Exercise%208.7.%20How%20much%20a%20weight%20dominates%20its%20domain%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fabricated%20interview%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22An%20interview%20never%20held%2C%20filled%20in%20by%20the%20interviewer.%20Each%20answer%20is%20plausible%3B%20the%20interviewer's%20work%20as%20a%20whole%20gives%20it%20away.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%204%20%C2%B7%20Interviewer-level%20indicators%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22interviewer-level%20indicator%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20measure%20of%20one%20interviewer's%20interviews%20as%20a%20whole%2C%20such%20as%20their%20pace%2C%20their%20rounding%20of%20ages%20or%20their%20repeated%20answers.%20It%20finds%20what%20no%20check%20on%20one%20record%20can.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%204%20%C2%B7%20Interviewer-level%20indicators%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22age%20heaping%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Ages%20rounded%20to%20numbers%20that%20end%20in%200%20or%205%2C%20by%20people%20who%20do%20not%20know%20an%20age%20or%20do%20not%20ask.%22%2C%20%22example%22%3A%20%2240%2C%2045%2C%2050%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Whipple's%20index%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Whipple's%20index%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22100%20%C3%97%20the%20ages%2023%20to%2062%20that%20end%20in%200%20or%205%2C%20over%20a%20fifth%20of%20all%20ages%2023%20to%2062.%20It%20is%20100%20with%20no%20heaping%20and%20500%20when%20every%20age%20ends%20in%200%20or%205.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%23%20Whipple's%20index%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22nondifferentiation%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Giving%20the%20same%20answers%20to%20everyone.%20In%20the%20survey%20it%20shows%20as%20the%20same%20catch%20list%20across%20one%20interviewer's%20interviews.%22%2C%20%22example%22%3A%20%22the%20same%20three%20species%20on%20every%20list%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%204%20%C2%B7%20Interviewer-level%20indicators%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22reinterview%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22A%20supervisor's%20call%20or%20revisit%20to%20confirm%20an%20interview.%20A%20statistical%20flag%20is%20a%20reason%20to%20check%2C%20not%20proof.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%204%20%C2%B7%20Interviewer-level%20indicators%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22review%20table%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22One%20row%20per%20household%20with%20every%20reason%20it%20was%20flagged%2C%20ranked%20so%20the%20households%20most%20likely%20wrong%20and%20most%20influential%20come%20first.%20A%20reviewer%20reads%20it%20from%20the%20top.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%205%20%C2%B7%20Ranking%20flags%20into%20a%20review%20table%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22selective%20editing%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22Reviewing%20first%20the%20units%20whose%20errors%20matter%20most%2C%20by%20a%20score%20that%20combines%20each%20item's%20local%20score%20into%20a%20global%20score%20for%20the%20unit.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%205%20%C2%B7%20Ranking%20flags%20into%20a%20review%20table%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22influence%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22How%20much%20a%20wrong%20answer%20moves%20an%20estimate.%20The%20review%20table%20takes%20the%20household's%20final%20weight%2C%20since%20its%20answer%20counts%20that%20many%20times.%22%2C%20%22example%22%3A%20%22sel_final_weight%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%205%20%C2%B7%20Ranking%20flags%20into%20a%20review%20table%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22recall%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22The%20share%20of%20the%20real%20anomalies%20a%20check%20finds%3A%20found%20%2F%20planted.%20Low%20recall%20leaves%20errors%20in%20the%20published%20tables%3B%20in%20a%20review%20table%20read%20from%20the%20top%2C%20it%20depends%20on%20how%20many%20rows%20are%20read.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(A%2C%20%22%23%23%205%20%C2%B7%20Ranking%20flags%20into%20a%20review%20table%22)%2C%20(ML%2C%20%22%23%23%203%20%C2%B7%20Judging%20detectors%20against%20known%20anomalies%20and%20rules%3B%20explaining%20a%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22precision%22%2C%20%22kind%22%3A%20%22Anomalies%22%2C%20%22meaning%22%3A%20%22The%20share%20of%20flagged%20rows%20that%20are%20real%20anomalies.%20Low%20precision%20wastes%20the%20review.%22%2C%20%22example%22%3A%20%222%20found%20of%203%20flagged%3A%202%2F3%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%203%20%C2%B7%20Judging%20detectors%20against%20known%20anomalies%20and%20rules%3B%20explaining%20a%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Machine%20learning%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22detector%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20method%20that%20learns%20what%20a%20table's%20rows%20usually%20look%20like%20and%20scores%20each%20row%20by%20how%20far%20it%20sits%20from%20that.%20It%20finds%20what%20is%20rare%2C%20which%20is%20not%20always%20what%20is%20wrong.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%202%20%C2%B7%20Isolation%20Forest%2C%20LOF%20and%20ECOD%3A%20scores%20and%20contamination%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22unsupervised%2C%20supervised%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22An%20unsupervised%20detector%20learns%20from%20the%20rows%20alone%20and%20finds%20what%20is%20rare.%20A%20supervised%20model%20learns%20from%20labels%20and%20finds%20what%20the%20labels%20marked.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%204%20%C2%B7%20When%20you%20have%20labels%3A%20a%20random%20forest%20on%20last%20round's%20edits%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22feature%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20measured%20property%20of%20the%20unit%2C%20one%20number%20per%20row%20of%20the%20table%20a%20model%20reads.%20Which%20features%20go%20in%20shapes%20the%20flags%20more%20than%20the%20choice%20of%20detector%20does.%22%2C%20%22example%22%3A%20%22n_boats%2C%20n_species%2C%20age_of_operator%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%201%20%C2%B7%20Features%20from%20survey%20rows%3A%20encoding%2C%20scaling%2C%20what%20to%20leave%20out%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22columns%20left%20out%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Columns%20that%20are%20not%20answers%20about%20the%20unit%2C%20such%20as%20the%20weight.%20A%20detector%20given%20one%20finds%20what%20is%20unusual%20in%20it%2C%20such%20as%20the%20stratum%2C%20instead%20of%20in%20the%20answers.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20What%20to%20leave%20out%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22one-hot%20encoding%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22One%200%2F1%20column%20per%20value%20of%20a%20code%2C%20so%20a%20model%20does%20not%20read%20the%20code%20as%20a%20quantity.%20A%20code%20with%20two%20values%20needs%20one%20column.%22%2C%20%22example%22%3A%20%22OneHotEncoder%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Encoding%3A%20codes%20are%20not%20quantities%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22scaling%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Putting%20every%20column%20on%20one%20footing%2C%20so%20a%20column's%20typical%20spread%20is%20one%20unit.%20Unscaled%2C%20the%20columns%20with%20the%20widest%20ranges%20decide%20every%20distance.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Scaling%3A%20every%20column%20on%20one%20footing%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22RobustScaler%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22scikit-learn's%20scaler%20that%20centers%20each%20column%20on%20its%20median%20and%20divides%20by%20its%20IQR%3A%20module%208's%20robust%20z%20in%20matrix%20form.%20One%20impossible%20value%20moves%20neither%2C%20where%20it%20moves%20StandardScaler's%20mean%20and%20standard%20deviation.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Scaling%3A%20every%20column%20on%20one%20footing%22)%2C%20(ML%2C%20%22%23%23%23%20Exercise%209.1.%20Robust%20scaling%2C%20by%20hand%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22scikit-learn%2C%20PyOD%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Python's%20libraries%20for%20machine%20learning%20(sklearn)%20and%20for%20outlier%20detection%20(pyod).%20Their%20scores%20run%20in%20opposite%20directions.%22%2C%20%22example%22%3A%20%22from%20pyod.models.ecod%20import%20ECOD%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%20Anomalies%20with%20machine%20learning%22)%2C%20(ML%2C%20%22%23%23%23%20ECOD%3A%20the%20tails%20of%20each%20column%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22random_state%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22The%20seed%20of%20a%20method%20that%20draws%20random%20numbers.%20Fixed%2C%20the%20same%20code%20flags%20the%20same%20rows%20on%20every%20computer%20and%20in%20every%20run.%22%2C%20%22example%22%3A%20%22random_state%3D0%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%20Anomalies%20with%20machine%20learning%22)%2C%20(ML%2C%20%22%23%23%23%20Isolation%20Forest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Isolation%20Forest%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20detector%20that%20cuts%20the%20rows%20at%20random%20until%20each%20stands%20alone%3B%20a%20row%20isolated%20after%20few%20cuts%20is%20unusual.%20Its%20score_samples%20is%20lower%20for%20a%20more%20unusual%20row.%22%2C%20%22example%22%3A%20%22IsolationForest(n_estimators%3D200%2C%20random_state%3D0)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Isolation%20Forest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22score%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20detector's%20number%20for%20each%20row%2C%20saying%20how%20unusual%20it%20is.%20Which%20end%20is%20unusual%20differs%3A%20lower%20in%20scikit-learn%2C%20higher%20in%20PyOD.%22%2C%20%22example%22%3A%20%22score_samples%2C%20decision_scores_%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%202%20%C2%B7%20Isolation%20Forest%2C%20LOF%20and%20ECOD%3A%20scores%20and%20contamination%22)%2C%20(ML%2C%20%22%23%23%23%20ECOD%3A%20the%20tails%20of%20each%20column%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22contamination%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22The%20share%20of%20rows%20a%20detector%20flags%3A%20its%20cut%20on%20its%20own%20scores.%20It%20moves%20only%20the%20cut%2C%20and%20the%20number%20of%20rows%20the%20reviewers%20can%20read%20is%20the%20honest%20way%20to%20set%20it.%22%2C%20%22example%22%3A%20%22contamination%3D0.05%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Contamination%3A%20how%20many%20to%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Local%20Outlier%20Factor%20(LOF)%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20detector%20that%20compares%20how%20crowded%20a%20row's%20neighborhood%20is%20with%20how%20crowded%20its%20neighbors'%20are.%20A%20group%20of%20alike%20rows%20smaller%20than%20n_neighbors%20hides%20itself.%22%2C%20%22example%22%3A%20%22LocalOutlierFactor(n_neighbors%3D20)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Local%20Outlier%20Factor%3A%20density%20among%20neighbors%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ECOD%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22PyOD's%20detector%20that%20reads%20each%20column's%20distribution%20on%20its%20own%20and%20adds%20up%20how%20far%20into%20the%20tails%20a%20row's%20values%20sit.%20It%20has%20no%20setting%20but%20contamination%20and%20draws%20nothing%20at%20random.%22%2C%20%22example%22%3A%20%22ECOD(contamination%3D0.05)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20ECOD%3A%20the%20tails%20of%20each%20column%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22explaining%20a%20flag%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Saying%20which%20columns%20made%20a%20row%20unusual%2C%20so%20a%20supervisor%20knows%20where%20to%20look%3A%20ECOD's%20part%20of%20the%20score%20per%20column%2C%20or%20shap%20on%20an%20Isolation%20Forest.%22%2C%20%22example%22%3A%20%22ecod.O%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Explaining%20a%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22shap%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20library%20that%20splits%20a%20model's%20output%20for%20one%20row%20among%20its%20features.%20On%20an%20Isolation%20Forest%2C%20a%20feature%20with%20a%20negative%20value%20made%20the%20row%20easier%20to%20isolate.%22%2C%20%22example%22%3A%20%22shap.TreeExplainer(forest)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Explaining%20a%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22label%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20known%20answer%20for%20each%20row%2C%20such%20as%20the%20last%20round's%20editors'%20decision%2C%20edited%20or%20not.%20A%20label%20the%20features%20cannot%20show%20teaches%20a%20model%20noise.%22%2C%20%22example%22%3A%20%22was_edited%2C%20edit_kind%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%204%20%C2%B7%20When%20you%20have%20labels%3A%20a%20random%20forest%20on%20last%20round's%20edits%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22random%20forest%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20supervised%20model%20that%20grows%20many%20decision%20trees%2C%20each%20on%20a%20random%20draw%20of%20the%20training%20rows%2C%20and%20lets%20them%20vote.%22%2C%20%22example%22%3A%20%22RandomForestClassifier(n_estimators%3D200%2C%20random_state%3D0)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20The%20workflow%20of%20a%20supervised%20model%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22accuracy%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22The%20share%20of%20rows%20a%20model%20answers%20right.%20When%20one%20answer%20is%20rare%2C%20a%20model%20that%20never%20gives%20it%20is%20accurate%20and%20finds%20nothing.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20The%20workflow%20of%20a%20supervised%20model%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22held-out%20rows%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Rows%20kept%20aside%20while%20a%20model%20learns%2C%20so%20its%20predictions%20for%20them%20are%20honest%20figures.%20Judged%20on%20the%20rows%20it%20learned%20from%2C%20a%20model%20remembers%20the%20answers.%22%2C%20%22example%22%3A%20%22train_test_split(X%2C%20y%2C%20test_size%3D0.3%2C%20stratify%3Dy%2C%20random_state%3D0)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20The%20workflow%20of%20a%20supervised%20model%22)%2C%20(ML%2C%20%22%23%23%23%20Exercise%209.6.%20Held-out%20precision%20and%20recall%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22threshold%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22The%20cut%20on%20a%20model's%20probability%20above%20which%20a%20row%20is%20flagged.%20A%20lower%20threshold%20flags%20more%20rows%2C%20finds%20more%20anomalies%20and%20wastes%20more%20reviews.%22%2C%20%22example%22%3A%20%22forest.predict_proba(X)%5B%3A%2C%201%5D%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Scoring%20a%20new%20round%2C%20and%20choosing%20the%20threshold%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pretrained%20deep%20model%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22A%20model%20trained%20on%20millions%20of%20examples%20elsewhere%20and%20adapted%20with%20a%20few%20labels.%20It%20carries%20over%20for%20pixels%2C%20which%20mean%20the%20same%20in%20every%20scene%2C%20and%20not%20for%20coded%20survey%20rows.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20What%20last%20round's%20labels%20find%20this%20round%2C%20and%20what%20they%20miss%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fit%20on%20a%20sample%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Training%20a%20detector%20on%20a%20seeded%20sample%20of%20a%20large%20table.%20An%20Isolation%20Forest%20draws%20256%20rows%20per%20tree%20anyway%2C%20so%20a%20sample%20teaches%20it%20what%20is%20common%20as%20well%20as%20the%20whole%20table%20does.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Fit%20on%20a%20sample%2C%20one%20detector%20per%20scale%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22scoring%20in%20chunks%22%2C%20%22kind%22%3A%20%22Machine%20learning%22%2C%20%22meaning%22%3A%20%22Scoring%20a%20large%20table%20a%20batch%20at%20a%20time.%20It%20is%20exact%20for%20a%20detector%20that%20scores%20each%20row%20on%20its%20own%2C%20such%20as%20an%20Isolation%20Forest%2C%20and%20not%20for%20ECOD%2C%20whose%20tails%20depend%20on%20the%20rows%20scored%20together.%22%2C%20%22example%22%3A%20%22pq.ParquetFile(path).iter_batches(batch_size%3D50_000)%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Scoring%20in%20chunks%3A%20exact%20for%20some%20detectors%2C%20not%20for%20others%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Agents%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22coding%20agent%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20language%20model%20in%20a%20loop%20with%20tools%3A%20at%20each%20turn%20it%20reads%20the%20conversation%20and%20picks%20an%20action%2C%20such%20as%20reading%20a%20file%20or%20running%20a%20command.%20Every%20file%20it%20reads%20and%20every%20output%20joins%20the%20conversation%20the%20model%20reads.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%201%20%C2%B7%20What%20an%20agent%20is%2C%20and%20what%20it%20sends%20away%3A%20cloud%20and%20local%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22cloud%20path%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22An%20agent%20whose%20model%20runs%20on%20a%20provider's%20servers%2C%20so%20the%20conversation%20travels%20there%20at%20every%20turn.%20Claude%20Code%2C%20Codex%20and%20GitHub%20Copilot%20work%20this%20way.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%201%20%C2%B7%20What%20an%20agent%20is%2C%20and%20what%20it%20sends%20away%3A%20cloud%20and%20local%22)%2C%20(AG%2C%20%22%23%23%23%20The%20cloud%20path%3A%20Claude%20Code%20as%20the%20worked%20example%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22local%20path%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22An%20agent%20whose%20model%20is%20an%20open-weight%20model%20on%20your%20own%20computer%2C%20so%20the%20conversation%20stays%20on%20it.%22%2C%20%22example%22%3A%20%22Ollama%20with%20Pi%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%201%20%C2%B7%20What%20an%20agent%20is%2C%20and%20what%20it%20sends%20away%3A%20cloud%20and%20local%22)%2C%20(AG%2C%20%22%23%23%23%20The%20local%20path%3A%20an%20open-weight%20model%20in%20Ollama%2C%20driven%20by%20Pi%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22open-weight%20model%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20model%20whose%20weights%20you%20can%20download%20and%20run%20on%20your%20own%20computer%2C%20such%20as%20Qwen.%22%2C%20%22example%22%3A%20%22qwen3.5%3A9b%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%201%20%C2%B7%20What%20an%20agent%20is%2C%20and%20what%20it%20sends%20away%3A%20cloud%20and%20local%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Claude%20Code%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Anthropic's%20coding%20agent%20for%20the%20terminal%3A%20the%20course's%20worked%20example%20of%20a%20cloud%20path.%20It%20reads%20AGENTS.md%20when%20the%20folder%20has%20no%20CLAUDE.md.%22%2C%20%22example%22%3A%20%22claude%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20cloud%20path%3A%20Claude%20Code%20as%20the%20worked%20example%22)%2C%20(AG%2C%20%22%23%23%23%20Claude%20Code's%20permission%20settings%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22deny%20rule%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20permission%20rule%20that%20stops%20an%20agent's%20file%20tool%20from%20opening%20a%20file.%20A%20script%20the%20agent%20writes%20and%20runs%20is%20not%20the%20file%20tool%2C%20so%20the%20file's%20contents%20can%20still%20reach%20the%20model%3B%20a%20sandbox's%20denyRead%20covers%20scripts.%22%2C%20%22example%22%3A%20%22Read(.%2Fsecrets%2F**)%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20Claude%20Code's%20permission%20settings%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22permission%20mode%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Claude%20Code's%20setting%20for%20how%20often%20it%20asks%20before%20acting%3A%20from%20default%20(asks%20before%20each%20tool's%20first%20use)%20and%20plan%20(reads%2C%20does%20not%20edit)%20to%20bypassPermissions%20(skips%20the%20prompts).%22%2C%20%22example%22%3A%20%22plan%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20Claude%20Code's%20permission%20settings%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22sandbox%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20boundary%20the%20operating%20system%20enforces%20around%20the%20commands%20an%20agent%20runs%2C%20and%20the%20processes%20they%20start%3A%20which%20folders%20they%20may%20read%20and%20write%2C%20and%20which%20network%20hosts%20they%20may%20reach.%22%2C%20%22example%22%3A%20%22%5C%22sandbox%5C%22%3A%20%7B%5C%22enabled%5C%22%3A%20true%7D%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20Claude%20Code's%20sandbox%22)%2C%20(AG%2C%20%22%23%23%23%20Docker%20Sandboxes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Docker%20Sandboxes%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Docker's%20way%20to%20run%20an%20agent%20inside%20a%20microVM%20on%20your%20computer%2C%20with%20only%20the%20folder%20you%20give%20it%20and%20outbound%20traffic%20under%20a%20deny-by-default%20policy.%20The%20sbx%20command%20line%20manages%20them.%22%2C%20%22example%22%3A%20%22sbx%20run%20claude%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20Docker%20Sandboxes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Ollama%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20program%20that%20runs%20open-weight%20models%20on%20your%20computer%20and%20answers%20on%20localhost%3A11434.%20A%20model%20with%20cloud%20in%20its%20name%20runs%20in%20Ollama's%20cloud%3B%20OLLAMA_NO_CLOUD%3D1%20turns%20the%20cloud%20features%20off.%22%2C%20%22example%22%3A%20%22ollama%20serve%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20local%20path%3A%20an%20open-weight%20model%20in%20Ollama%2C%20driven%20by%20Pi%22)%2C%20(AG%2C%20%22%23%23%23%20Pi%20and%20Ollama%3A%20keeping%20the%20traffic%20local%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Pi%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22An%20open-source%20coding%20agent%20(MIT%20license)%20that%20drives%20a%20model%20Ollama%20serves%20once%20~%2F.pi%2Fagent%2Fmodels.json%20names%20Ollama%20as%20a%20provider%2C%20and%20reads%20AGENTS.md%20from%20its%20folder.%20PI_OFFLINE%3D1%20turns%20off%20its%20automatic%20network%20activity.%20Codex%20CLI%20with%20--oss%20is%20the%20alternative.%22%2C%20%22example%22%3A%20%22pi%20--provider%20ollama%20--model%20qwen3.5%3A9b%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20local%20path%3A%20an%20open-weight%20model%20in%20Ollama%2C%20driven%20by%20Pi%22)%2C%20(AG%2C%20%22%23%23%23%20Pi%20and%20Ollama%3A%20keeping%20the%20traffic%20local%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22context%20window%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22How%20much%20conversation%20a%20model%20reads%20at%20once%2C%20counted%20in%20tokens.%20Ollama's%20default%20on%20a%20small%20graphics%20card%20is%20too%20short%20for%20an%20agent%2C%20which%20needs%20at%20least%2064000.%22%2C%20%22example%22%3A%20%22OLLAMA_CONTEXT_LENGTH%3D64000%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20local%20path%3A%20an%20open-weight%20model%20in%20Ollama%2C%20driven%20by%20Pi%22)%2C%20(AG%2C%20%22%23%23%23%20The%20demo%2C%20step%20by%20step%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22microdata%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22The%20rows%20respondents%20gave%2C%20one%20per%20person%2C%20household%20or%20fishing%20unit.%20A%20slice%20of%20it%20is%20microdata%2C%20and%20so%20is%20a%20column%20of%20it%20shuffled.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22privileged%20communication%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22What%20Republic%20Act%2010625%2C%20the%20Philippine%20Statistical%20Act%20of%202013%2C%20makes%20in%20its%20section%2026%20of%20the%20individual%20data%20a%20respondent%20gives%20in%20a%20statistical%20inquiry%3A%20it%20cannot%20be%20used%20as%20evidence%2C%20and%20only%20aggregates%20that%20refer%20to%20no%20individual%20may%20be%20released.%20Section%2027%20makes%20a%20breach%20of%20that%20confidentiality%20an%20offense.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22microdata%20rule%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22The%20course's%20rule%3A%20a%20client's%20microdata%20stays%20on%20the%20machines%20and%20with%20the%20tools%20its%20institution%20approved%20for%20it.%20Which%20path%20is%20approved%20is%20the%20institution's%20decision.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22handover%20folder%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22The%20folder%20an%20agent%20may%20read%3A%20the%20codebook%2C%20the%20rules%20in%20words%2C%20the%20code%20lists%2C%20the%20schema%20and%20a%20synthetic%20sample%2C%20and%20no%20microdata.%20What%20is%20in%20the%20folder%2C%20not%20a%20deny%20rule%2C%20bounds%20what%20reaches%20the%20model.%22%2C%20%22example%22%3A%20%22handover%2F%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22schema%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Each%20table's%20columns%20and%20their%20database%20types%2C%20with%20no%20rows%3A%20the%20names%20and%20types%20to%20write%20code%20against.%22%2C%20%22example%22%3A%20%22schema.csv%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22synthetic%20sample%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Rows%20made%20from%20the%20codebook%20by%20a%20program%20that%20never%20opens%20the%20microdata.%20It%20holds%20every%20code%20a%20rule%20names%20and%20every%20kind%20of%20error%20the%20tests%20need%2C%20not%20a%20likeness%20of%20the%20population.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20The%20handover%20folder%20and%20the%20microdata%20rule%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22brief%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22What%20an%20agent%20is%20told%20before%20it%20starts%3A%20which%20folder%20it%20may%20read%2C%20what%20to%20make%2C%20the%20schema%20to%20follow%2C%20and%20the%20tests%20that%20decide%20when%20it%20is%20done.%20A%20request%2C%20not%20a%20guard.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%202%20%C2%B7%20A%20harness%20around%20your%20pipeline%22)%2C%20(AG%2C%20%22%23%23%23%20AGENTS.md%3A%20the%20brief%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22AGENTS.md%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22A%20file%20at%20the%20top%20of%20an%20agent's%20folder%20that%20Claude%20Code%2C%20Codex%20and%20Pi%20read%20before%20they%20start.%20The%20brief%20goes%20in%20it.%22%2C%20%22example%22%3A%20%22AGENTS.md%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20AGENTS.md%3A%20the%20brief%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22reviewing%20agent%20code%22%2C%20%22kind%22%3A%20%22Agents%22%2C%20%22meaning%22%3A%20%22Checking%20what%20an%20agent%20wrote%20against%20what%20you%20know%20of%20the%20data%3A%20every%20join%20and%20key%2C%20every%20blank%2C%20every%20boundary%2C%20and%20the%20tests'%20own%20data.%20A%20test%20the%20agent%20wrote%20says%20only%20that%20the%20code%20agrees%20with%20the%20agent.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(AG%2C%20%22%23%23%23%20What%20review%20catches%3A%20an%20illustration%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20Python%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22course.table()%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20course's%20helper%20that%20reads%20one%20table%20from%20every%20region%20into%20one%20pandas%20table%2C%20area%20codes%20as%20zero-padded%20text%20and%20removed%20records%20left%20out.%20Module%202%20builds%20the%20same%20by%20hand.%22%2C%20%22example%22%3A%20'course.table(%22member%22)'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Three%20regions%2C%20three%20databases%22)%2C%20(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22course.child()%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Reads%20a%20child%20table%20of%20fishing_unit%20with%20its%20key%20parts%20renamed%20to%20the%20unit's%2C%20so%20it%20joins%20on%20UNIT_KEY.%22%2C%20%22example%22%3A%20'course.child(%22catch%22)'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%202%20%C2%B7%20The%20survey%3A%20its%20tables%2C%20keys%20and%20codebook%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22course.design_frame()%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20households%20with%20their%20design%20columns%3A%20stratum_id%20(region%2C%20province%20and%20stratum%20letter)%2C%20psu_id%20(the%20area%20pasted%20to%20its%20stratum%2C%20or%20the%20household%20in%20stratum%20F)%20and%20psus_in_stratum.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%203%20%C2%B7%20The%20tabulation%20frame%20an%20estimate%20is%20computed%20from%22)%2C%20(P2%2C%20%22%23%23%206%20%C2%B7%20The%20same%20on%20the%20survey%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22course.PATHS%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Where%20the%20course's%20files%20are%20on%20your%20laptop%2C%20wherever%20you%20put%20the%20folder.%20Every%20notebook%20finds%20its%20files%20through%20it.%22%2C%20%22example%22%3A%20'PATHS.region(%2201%22)%2C%20PATHS.codebook'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20What%20the%20course%20folder%20holds%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22method%20chain%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Python's%20form%20of%20R's%20pipe%3A%20x.f().g().%20A%20chain%20over%20several%20lines%20goes%20inside%20round%20brackets%2C%20so%20Python%20reads%20it%20as%20one%20expression.%22%2C%20%22example%22%3A%20'(units.query(%22unit_scale%20%3D%3D%202%22).merge(...))'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20The%20translation%20table%22)%2C%20(P1%2C%20%22%23%23%201%20%C2%B7%20The%20verbs%2C%20one%20table%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22%26%2C%20%7C%20and%20~%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22And%2C%20or%20and%20not%20for%20conditions%20on%20columns.%20Python%20works%20%26%20out%20before%20%3D%3D%2C%20so%20each%20comparison%20goes%20in%20its%20own%20brackets.%22%2C%20%22example%22%3A%20'(df%5B%22region_code%22%5D%20%3D%3D%20%2201%22)%20%26%20(df%5B%22unit_scale%22%5D%20%3D%3D%202)'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Where%20an%20R%20habit%20breaks%3A%20two%20conditions%22)%2C%20(P1%2C%20%22%23%23%209%20%C2%B7%20Habits%20that%20differ%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22a%20blank%20in%20a%20condition%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22A%20comparison%20with%20a%20missing%20value%20is%20missing%2C%20and%20a%20filter%20drops%20the%20row.%20Write%20the%20blank's%20test%20out%2C%20whatever%20the%20column's%20type.%22%2C%20%22example%22%3A%20%22x.isna()%20%7C%20(x%20!%3D%201)%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Where%20an%20R%20habit%20breaks%3A%20a%20blank%20in%20a%20condition%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22nullable%20integer%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas'%20Int32%20and%20Int64%2C%20with%20a%20capital%20I%3A%20whole%20numbers%20that%20can%20hold%20a%20missing%20value%2C%20shown%20%3CNA%3E.%20NumPy's%20int64%20has%20none%2C%20so%20a%20whole-number%20column%20with%20a%20blank%20often%20arrives%20as%20float64%2C%20the%20flag%201%20as%201.0.%22%2C%20%22example%22%3A%20'astype(%22Int64%22)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20pandas%20or%20polars%3A%20%60.df()%60%20and%20%60.pl()%60%22)%2C%20(T%2C%20%22%23%23%23%20Nullable%20integers%2C%20and%20SQLite%20as%20the%20fallback%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22NaN%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20missing%20value%20of%20a%20float64%20column.%20NaN%20!%3D%201%20is%20True%2C%20so%20a%20filter%20on%20a%20decimal%20column%20keeps%20the%20blanks%20that%20the%20same%20filter%20on%20a%20nullable%20column%20drops.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Where%20an%20R%20habit%20breaks%3A%20a%20blank%20in%20a%20condition%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22zfill%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Pads%20text%20with%20zeros%20on%20the%20left%20to%20a%20width%3B%20text%20already%20that%20wide%20is%20left%20alone.%20A%20decimal%20turned%20into%20text%20keeps%20its%20point%2C%20so%20go%20through%20Int64%20first.%22%2C%20%22example%22%3A%20'pd.Series(%5B%2233%22%2C%20%22055%22%5D).str.zfill(3)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22dtype%3D%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Tells%20read_csv%20a%20column's%20type%2C%20so%20a%20code%20keeps%20its%20zeros%20whatever%20the%20rows%20look%20like.%22%2C%20%22example%22%3A%20'pd.read_csv(path%2C%20dtype%3D%7B%22hh_code%22%3A%20str%7D)'%2C%20%22where%22%3A%20%5B(D1%2C%20%22%23%23%23%20Drill%20D1.1%20%C2%B7%20A%20code%20that%20loses%20its%20leading%20zero%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22keep_default_na%3DFalse%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Tells%20read_csv%20to%20read%20as%20missing%20only%20the%20values%20you%20name.%20By%20default%20it%20also%20reads%20NA%2C%20None%2C%20null%20and%20others%20as%20missing%2C%20so%20the%20education%20list's%20group%20None%20would%20vanish.%22%2C%20%22example%22%3A%20'pd.read_csv(path%2C%20keep_default_na%3DFalse%2C%20na_values%3D%5B%22%5C%5C%5C%5CN%22%5D)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%2C%20(R%2C%20%22%23%23%23%20A%20mapping%20table%3A%20the%20code%20list%20is%20the%20recode%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22left_on%2C%20right_on%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Join%20on%20columns%20with%20different%20names%2C%20as%20R's%20join_by(a%20%3D%3D%20b).%22%2C%20%22example%22%3A%20'left_on%3D%22catch_operator_line%22%2C%20right_on%3D%22operator_line%22'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%203%20%C2%B7%20From%20the%20tidyverse%20to%20pandas%20and%20polars%3A%20filter%2C%20mutate%2C%20inner_join%22)%2C%20(M%2C%20%22%23%23%202%20%C2%B7%20Orphan%20rows%20both%20ways%3A%20anti-joins%2C%20semi-joins%2C%20merge's%20indicator%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22validate%3D%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Writes%20a%20join's%20expected%20shape%2C%20so%20pandas%20or%20polars%20stops%20when%20a%20key%20repeats%20instead%20of%20copying%20rows.%20dplyr's%20relationship%3D.%22%2C%20%22example%22%3A%20'validate%3D%22many_to_one%22%20(pandas)%2C%20validate%3D%22m%3A1%22%20(polars)'%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%203%20%C2%B7%20From%20the%20tidyverse%20to%20pandas%20and%20polars%3A%20filter%2C%20mutate%2C%20inner_join%22)%2C%20(M%2C%20%22%23%23%23%20A%20semi-join%20is%20not%20an%20inner%20join%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22indicator%3DTrue%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Adds%20a%20column%20_merge%20to%20a%20join%20that%20says%20where%20each%20key%20was%20found%3A%20both%2C%20left_only%20or%20right_only.%20One%20outer%20join%20then%20answers%20both%20directions%20of%20a%20key%20check.%22%2C%20%22example%22%3A%20'merge(...%2C%20how%3D%22outer%22%2C%20indicator%3DTrue)'%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20Both%20directions%20in%20one%20join%3A%20%60indicator%3DTrue%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22how%3D%5C%22left_anti%5C%22%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas%203's%20anti-join%3A%20the%20left%20table's%20rows%20with%20no%20match.%20how%3D%5C%22right_anti%5C%22%20keeps%20the%20right%20table's.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20Both%20directions%20in%20one%20join%3A%20%60indicator%3DTrue%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22cumcount%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Numbers%20the%20rows%20within%20each%20group%20from%200%2C%20so%20%2B%201%20gives%20R's%20row_number().%20The%20numbers%20follow%20the%20rows'%20order%2C%20so%20sort%20first.%22%2C%20%22example%22%3A%20%22side.groupby(HOUSEHOLD).cumcount()%20%2B%201%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%203%20%C2%B7%20Keys%20of%20several%20parts%3A%20which%20part%20differs%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22np.select%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22NumPy's%20case_when%3A%20a%20list%20of%20conditions%2C%20a%20list%20of%20values%20and%20a%20default%3B%20each%20row%20takes%20the%20value%20of%20the%20first%20condition%20true%20for%20it.%20The%20conditions%20must%20be%20plain%20True%20or%20False%2C%20never%20missing.%22%2C%20%22example%22%3A%20'np.select(%5Bc1%2C%20c2%5D%2C%20%5B%22a%22%2C%20%22b%22%5D%2C%20default%3D%22c%22)'%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%204%20%C2%B7%20The%20automated%20case%20and%20the%20manual%20case%22)%2C%20(R%2C%20%22%23%23%23%20Rules%20with%20conditions%3A%20%60np.select%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22Series.case_when%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas'%20case_when.%20Unlike%20dplyr's%2C%20it%20counts%20a%20missing%20condition%20as%20met%2C%20so%20build%20conditions%20that%20are%20never%20missing.%22%2C%20%22example%22%3A%20%22codes.isin(%5B1%5D)%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%201%20%C2%B7%20Frequency%20tables%20against%20the%20codebook's%20valid%20codes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fillna(False)%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Turns%20a%20missing%20condition%20into%20False%2C%20which%20writes%20down%20what%20a%20blank%20means.%20In%20the%20course's%20rules%2C%20a%20value%20the%20rule%20needs%20and%20does%20not%20have%20fails.%22%2C%20%22example%22%3A%20%22(codes%20%3D%3D%201).fillna(False)%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Range%20rules%2C%20and%20what%20a%20blank%20does%20to%20them%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22.map()%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Replaces%20each%20value%20with%20its%20value%20in%20a%20dictionary%20or%20a%20lookup%20Series%2C%20and%20gives%20a%20missing%20value%20for%20one%20it%20lacks.%20It%20returns%20one%20column%20lined%20up%20with%20the%20rows%20it%20came%20from.%22%2C%20%22example%22%3A%20'members%5B%22mem_education%22%5D.map(lookup)'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20The%20simplest%20mapping%3A%20a%20dictionary%22)%2C%20(R%2C%20%22%23%23%23%20A%20mapping%20table%3A%20the%20code%20list%20is%20the%20recode%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22categorical%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas'%20category%20type%3A%20values%20from%20a%20fixed%20list%20of%20categories%2C%20in%20a%20fixed%20order.%20A%20table%20of%20it%20lists%20every%20category%20in%20that%20order%2C%20empty%20ones%20included.%22%2C%20%22example%22%3A%20'astype(%22category%22)'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20The%20simplest%20mapping%3A%20a%20dictionary%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pd.cut%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Sorts%20numbers%20into%20the%20ranges%20between%20bin%20edges%2C%20as%20R's%20cut()%2C%20and%20returns%20an%20ordered%20categorical.%20A%20value%20outside%20every%20range%20gets%20a%20missing%20group%2C%20as%20a%20missing%20value%20does.%22%2C%20%22example%22%3A%20%22pd.cut(age%2C%20bins%3D...%2C%20labels%3D...)%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Ranges%3A%20%60pd.cut%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22query%20expression%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20language%20of%20table.query()%20and%20table.eval()%3A%20column%20names%2C%20comparisons%2C%20in%2C%20and%2C%20or%2C%20not%2C%20and%20%40name%20for%20a%20value%20from%20outside.%20It%20runs%20what%20it%20says%2C%20so%20a%20specification%20table%20is%20code.%22%2C%20%22example%22%3A%20'members.query(%22mem_age%20%3E%3D%2016%22)'%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%203%20%C2%B7%20Rules%20as%20data%3A%20a%20specification%20table%20run%20to%20a%20failure%20report%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22duplicated(keep%3DFalse)%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Marks%20every%20row%20whose%20key%20repeats%2C%20the%20first%20copy%20included.%20It%20treats%20two%20blanks%20as%20equal%2C%20so%20drop%20blank%20keys%20first.%22%2C%20%22example%22%3A%20%22table.duplicated(subset%3Dkey%2C%20keep%3DFalse)%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Key%20subsets%3A%20a%20duplicate%20is%20a%20duplicate%20of%20something%22)%2C%20(E%2C%20%22%23%23%23%20Exercise%204.7.%20Every%20copy%20of%20a%20repeated%20key%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22drop_duplicates(subset%3D)%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Keeps%20the%20first%20of%20each%20set%20of%20rows%20equal%20in%20the%20columns%20named.%20With%20the%20row%20id%20left%20out%20of%20subset%2C%20it%20finds%20exact%20copies%20and%20keeps%20the%20id%20for%20the%20edit%20log.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Edited%20by%20rule%20or%20referred%22)%2C%20(PR%2C%20%22%23%23%20S1.5%20%C2%B7%20Drop%20exact%20copies%2C%20keep%20everything%20else%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22transform%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Puts%20a%20group's%20summary%20on%20every%20row%20of%20the%20group%2C%20as%20R's%20mutate%20after%20group_by.%22%2C%20%22example%22%3A%20'groupby(key).transform(%22size%22)'%2C%20%22where%22%3A%20%5B(E%2C%20%22%23%23%23%20Duplicate%20rules%20in%20the%20specification%20table%22)%2C%20(A%2C%20%22%23%23%23%20Quartiles%3A%20Tukey's%20fences%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22nunique%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20number%20of%20distinct%20values%20of%20one%20column%2C%20R's%20n_distinct.%20Given%20several%20columns%20it%20counts%20each%20on%20its%20own%2C%20so%20for%20a%20key%20of%20several%20parts%20drop%20duplicates%20and%20count%20rows.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Counting%20distinct%20keys%20of%20several%20columns%3A%20pandas%2C%20polars%20and%20R%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pl.struct%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Bundles%20several%20polars%20columns%20into%20one%20value%20per%20row%2C%20so%20n_unique%20counts%20the%20distinct%20keys%20of%20several%20parts.%22%2C%20%22example%22%3A%20'pl.struct(%22region_code%22%2C%20%22hh_id%22).n_unique()'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Counting%20distinct%20keys%20of%20several%20columns%3A%20pandas%2C%20polars%20and%20R%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pd.crosstab%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Counts%20the%20units%20in%20each%20cell%20of%20two%20columns.%20dropna%3DFalse%20keeps%20the%20empty%20categories%20and%20margins%3DTrue%20adds%20a%20total%20row%20and%20column.%22%2C%20%22example%22%3A%20'pd.crosstab(rows%2C%20columns%2C%20dropna%3DFalse%2C%20margins%3DTrue%2C%20margins_name%3D%22Total%22)'%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20Unweighted%20tables%3A%20every%20category%2C%20in%20order%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pl.from_pandas%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Turns%20a%20pandas%20table%20into%20a%20polars%20one%2C%20for%20svy.%20Categorical%20columns%20become%20polars%20Categorical%2C%20and%20nullable%20integers%20stay%20integers%20with%20nulls.%22%2C%20%22example%22%3A%20%22pl.from_pandas(frame)%22%2C%20%22where%22%3A%20%5B(R%2C%20%22%23%23%23%20From%20here%20to%20module%206%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22copy-on-write%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas%203%20copies%20a%20table%20when%20you%20change%20it%2C%20as%20R%20does%2C%20so%20a%20change%20to%20a%20selection%20never%20reaches%20the%20table%20it%20came%20from.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P1%2C%20%22%23%23%209%20%C2%B7%20Habits%20that%20differ%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22counting%20from%200%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22A%20Python%20position%20is%20the%20number%20of%20items%20before%20it%2C%20and%20a%20slice%20stops%20before%20its%20end.%20R's%20substr(x%2C%203%2C%205)%20is%20x%5B2%3A5%5D.%22%2C%20%22example%22%3A%20'hh_code%5B2%3A5%5D'%2C%20%22where%22%3A%20%5B(P1%2C%20%22%23%23%209%20%C2%B7%20Habits%20that%20differ%22)%2C%20(P1%2C%20%22%23%23%23%20Exercise%20P1.3.%20A%20household%20code%20into%20its%20area%20codes%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22missing%20values%20left%20out%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22pandas%20and%20polars%20leave%20missing%20values%20out%20of%20a%20sum%20or%20a%20mean%20without%20a%20word%3B%20R%20gives%20NA%20unless%20told%20na.rm%20%3D%20TRUE.%20Count%20them%20first.%22%2C%20%22example%22%3A%20%22.isna().sum()%22%2C%20%22where%22%3A%20%5B(P1%2C%20%22%23%23%209%20%C2%B7%20Habits%20that%20differ%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22factor%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22R's%20factor()%20turns%20a%20value%20outside%20its%20levels%20into%20NA%20without%20a%20word%2C%20so%20invalid%20codes%20vanish%20into%20the%20missing%20ones.%20Count%20the%20codes%20against%20the%20valid%20list%20before%20making%20a%20category.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(P1%2C%20%22%23%23%209%20%C2%B7%20Habits%20that%20differ%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22exception%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22An%20error%20with%20a%20name%2C%20raised%20where%20the%20problem%20is%20found%20and%20caught%20where%20the%20decision%20is%20made.%20Its%20last%20line%20names%20its%20kind%20and%20the%20problem.%22%2C%20%22example%22%3A%20'raise%20MissingRegions(%5B%2204%22%5D)'%2C%20%22where%22%3A%20%5B(ST%2C%20%22%23%23%23%20The%20tabulation%20as%20one%20re-runnable%20script%20with%20a%20log%20and%20an%20output%20manifest%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22assert%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22A%20check%20Python%20skips%20when%20it%20runs%20with%20-O.%20A%20refusal%20is%20raised%20as%20an%20exception%20instead%2C%20since%20a%20check%20that%20can%20be%20switched%20off%20is%20no%20check.%22%2C%20%22example%22%3A%20%22raise%20ValueError(...)%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%205%20%C2%B7%20Edits%20written%20back%20in%20a%20transaction%20with%20an%20audit%20flag%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22with%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Opens%20a%20resource%20and%20closes%20it%20when%20the%20block%20ends%2C%20even%20after%20an%20error.%22%2C%20%22example%22%3A%20%22with%20duckdb.connect(str(database))%20as%20con%3A%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20Exercise%203.10.%20The%20write%2C%20all%20or%20nothing%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22openpyxl%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22A%20library%20that%20writes%20and%20reads%20Excel%20workbooks%20cell%20by%20cell%3A%20each%20cell%20has%20a%20value%2C%20a%20font%20and%20a%20number_format.%20freeze_panes%20keeps%20the%20header%20in%20view.%22%2C%20%22example%22%3A%20'sheet.freeze_panes%20%3D%20%22A2%22'%2C%20%22where%22%3A%20%5B(PB%2C%20%22%23%23%23%20A%20workbook%20with%20openpyxl%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22xlsxwriter%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22The%20other%20library%20pandas%20writes%20Excel%20with%3A%20it%20sets%20formats%20as%20it%20writes%20and%20is%20fast%20on%20large%20tables.%20It%20only%20writes%2C%20so%20it%20cannot%20open%20a%20workbook%20to%20read%20it%20or%20add%20a%20sheet.%22%2C%20%22example%22%3A%20'pd.ExcelWriter(path%2C%20engine%3D%22xlsxwriter%22)'%2C%20%22where%22%3A%20%5B(PB%2C%20%22%23%23%23%20xlsxwriter%2C%20the%20alternative%22)%2C%20(ST%2C%20%22%23%23%23%20What%20a%20saved%20workbook%20remembers%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22pl.scan_parquet%22%2C%20%22kind%22%3A%20%22Python%22%2C%20%22meaning%22%3A%20%22Plans%20a%20read%20of%20a%20Parquet%20file%20without%20reading%20it%3B%20collect()%20runs%20the%20plan.%20It%20reads%20only%20the%20columns%20used%20and%20skips%20rows%20the%20file's%20statistics%20rule%20out.%22%2C%20%22example%22%3A%20%22pl.scan_parquet(path).filter(...).collect()%22%2C%20%22where%22%3A%20%5B(ML%2C%20%22%23%23%23%20Reading%20only%20what%20is%20needed%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%23%20DuckDB%20%26%20SQL%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22DuckDB%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20database%20in%20one%20file%2C%20read%20with%20SQL%20from%20inside%20Python%3A%20no%20server%2C%20no%20account.%20Each%20region%20of%20the%20survey%20is%20a%20DuckDB%20file.%22%2C%20%22example%22%3A%20%22data%2Fsfh2025_r01.duckdb%22%2C%20%22where%22%3A%20%5B(S%2C%20%22%23%23%23%20Three%20regions%2C%20three%20databases%22)%2C%20(T%2C%20%22%23%23%201%20%C2%B7%20One%20regional%20database%20into%20pandas%20and%20polars%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22SQL%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Structured%20Query%20Language%2C%20the%20language%20every%20database%20answers%20in.%20A%20query%20is%20a%20sentence%20of%20clauses%2C%20each%20the%20SQL%20word%20for%20a%20dplyr%20verb.%22%2C%20%22example%22%3A%20%22SELECT%20...%20FROM%20...%20WHERE%20...%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%201%20%C2%B7%20One%20regional%20database%20into%20pandas%20and%20polars%22)%2C%20(T%2C%20%22%23%23%23%20SQL%20for%20a%20dplyr%20user%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22connection%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Your%20open%20line%20to%20a%20database%3B%20a%20query%20is%20one%20statement%20sent%20down%20it.%20read_only%3DTrue%20opens%20a%20file%20without%20the%20right%20to%20change%20it.%22%2C%20%22example%22%3A%20'duckdb.connect(%22data%2Fsfh2025_r01.duckdb%22%2C%20read_only%3DTrue)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%201%20%C2%B7%20One%20regional%20database%20into%20pandas%20and%20polars%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22quoted%20name%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22SQL%20holds%20a%20name%20in%20double%20quotes%20and%20a%20text%20value%20in%20single%20quotes.%20A%20name%20with%20a%20hyphen%20or%20a%20space%20needs%20the%20quotes%2C%20or%20SQL%20reads%20a%20minus%20sign%20or%20two%20words%3B%20quoting%20every%20name%20is%20a%20habit%20that%20costs%20nothing.%22%2C%20%22example%22%3A%20'SELECT%20%22hh_id%22%20FROM%20%22household%22'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20SQL%20for%20a%20dplyr%20user%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22relation%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22What%20con.sql(query)%20returns%3A%20the%20query%2C%20waiting%2C%20as%20dplyr's%20tbl()%20waits%20for%20collect().%20Asking%20for%20the%20result%20runs%20it.%22%2C%20%22example%22%3A%20'con.sql(%22SELECT%20*%20FROM%20household%22)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20pandas%20or%20polars%3A%20%60.df()%60%20and%20%60.pl()%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22.df()%2C%20.pl()%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Run%20a%20query%20and%20give%20its%20result%20as%20a%20pandas%20or%20a%20polars%20table.%20.df()%20picks%20Int32%20for%20a%20column%20only%20when%20the%20rows%20hold%20a%20missing%20value%2C%20so%20its%20type%20depends%20on%20the%20rows.%22%2C%20%22example%22%3A%20%22con.sql(query).pl()%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20pandas%20or%20polars%3A%20%60.df()%60%20and%20%60.pl()%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22parameter%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20%3F%20in%20the%20SQL%2C%20with%20its%20value%20passed%20apart%2C%20so%20a%20value%20can%20never%20be%20misread%20as%20SQL.%20Table%20and%20database%20names%20cannot%20be%20parameters.%22%2C%20%22example%22%3A%20'con.execute(%22UPDATE%20...%20SET%20x%20%3D%20%3F%20WHERE%20row_id%20%3D%20%3F%22%2C%20%5B2%2C%203%5D)'%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Values%20as%20parameters%2C%20and%20fetching%20the%20whole%20result%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22fetch%20the%20whole%20result%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22DuckDB%202%20refuses%20other%20work%20on%20a%20connection%20while%20a%20result%20is%20half%20read.%20fetchone()%20leaves%20the%20rest%20waiting%3B%20fetchall()%2C%20.df()%20and%20.pl()%20finish%20it.%22%2C%20%22example%22%3A%20%22con.execute(sql).fetchall()%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Values%20as%20parameters%2C%20and%20fetching%20the%20whole%20result%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22NULL%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22SQL's%20missing%20value%2C%20R's%20NA%3A%20unknown%2C%20not%20zero.%20A%20comparison%20with%20it%20is%20NULL%2C%20and%20WHERE%20keeps%20only%20the%20rows%20where%20its%20condition%20is%20true.%22%2C%20%22example%22%3A%20%22NULL%20%3C%3E%201%20is%20NULL%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%202%20%C2%B7%20Every%20region%20in%20one%20query%3A%20ATTACH%2C%20UNION%20ALL%20BY%20NAME%2C%20deleted%20rows%20filtered%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22IS%20DISTINCT%20FROM%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20comparison%20that%20treats%20NULL%20as%20a%20value%20like%20any%20other%3A%20true%20for%20a%20blank%20and%20for%200%2C%20false%20only%20for%201.%22%2C%20%22example%22%3A%20%22row_void%20IS%20DISTINCT%20FROM%201%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%202%20%C2%B7%20Every%20region%20in%20one%20query%3A%20ATTACH%2C%20UNION%20ALL%20BY%20NAME%2C%20deleted%20rows%20filtered%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22coalesce%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Takes%20the%20first%20of%20its%20values%20that%20is%20not%20NULL.%22%2C%20%22example%22%3A%20%22coalesce(row_void%2C%200)%20%3C%3E%201%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%202%20%C2%B7%20Every%20region%20in%20one%20query%3A%20ATTACH%2C%20UNION%20ALL%20BY%20NAME%2C%20deleted%20rows%20filtered%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ATTACH%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Opens%20a%20database%20inside%20a%20connection%20under%20a%20name%20you%20give%20it%2C%20so%20one%20query%20can%20read%20several%20databases.%20A%20table%20is%20then%20named%20by%20its%20database%20and%20its%20own%20name.%22%2C%20%22example%22%3A%20%22ATTACH%20'data%2Fsfh2025_r01.duckdb'%20AS%20sfh2025_r01%20(READ_ONLY)%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%202%20%C2%B7%20Every%20region%20in%20one%20query%3A%20ATTACH%2C%20UNION%20ALL%20BY%20NAME%2C%20deleted%20rows%20filtered%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22UNION%20ALL%20BY%20NAME%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Stacks%20two%20queries'%20rows%2C%20lining%20their%20columns%20up%20by%20name%20as%20bind_rows%20does%2C%20and%20fills%20a%20column%20one%20query%20lacks%20with%20NULL.%20UNION%20ALL%20lines%20them%20up%20by%20position%2C%20whatever%20their%20names.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Stacking%3A%20%60UNION%20ALL%60%20and%20%60UNION%20ALL%20BY%20NAME%60%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22constant%20column%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20column%20with%20the%20same%20value%20on%20every%20row%20of%20a%20query%2C%20such%20as%20the%20region%2C%20written%20in%20from%20the%20database's%20name.%22%2C%20%22example%22%3A%20%22SELECT%20'01'%20AS%20region_code%2C%20*%20FROM%20sfh2025_r01.fishing_unit%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20One%20query%20from%20a%20list%20of%20regions%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22subquery%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20query%20inside%20another%2C%20such%20as%20IN%20(SELECT%20...)%2C%20to%20keep%20the%20rows%20whose%20key%20is%20in%20another%20table.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Deleted%20rows%2C%20region%20by%20region%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22JOIN%20...%20ON%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Puts%20side%20by%20side%20the%20rows%20of%20two%20tables%20for%20which%20the%20condition%20is%20true%2C%20as%20dplyr's%20inner_join.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%204%20%C2%B7%20The%20flat%20table%20saved%20as%20Parquet%2C%20with%20a%20row-count%20check%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22sniffer%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22DuckDB's%20CSV%20reader%20guessing%20each%20column's%20type%20from%20a%20sample%20of%20its%20values.%20It%20keeps%2001%20as%20text%20and%20reads%205%20as%20a%20number%3B%20name%20the%20types%20and%20every%20region%20reads%20alike.%22%2C%20%22example%22%3A%20%22types%20%3D%20%7B'region_code'%3A%20'VARCHAR'%7D%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%203%20%C2%B7%20Codes%20kept%20whole%3A%20text%20types%2C%20zero-padding%2C%20null%20tokens%2C%20nullable%20integers%22)%2C%20(D1%2C%20%22%23%23%23%20Drill%20D1.1%20%C2%B7%20A%20code%20that%20loses%20its%20leading%20zero%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22SQLite%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22Another%20one-file%20database%2C%20read%20by%20the%20standard%20library's%20sqlite3%20with%20nothing%20to%20install%3A%20the%20course's%20fallback%20for%20a%20learner%20without%20DuckDB.%22%2C%20%22example%22%3A%20%22sqlite3.connect(path)%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Nullable%20integers%2C%20and%20SQLite%20as%20the%20fallback%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22type%20affinity%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22SQLite%20stores%20a%20value%20put%20into%20an%20INTEGER%20column%20as%20an%20integer%20when%20it%20looks%20like%20one%2C%20so%20033%20comes%20back%20as%2033.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%23%20Nullable%20integers%2C%20and%20SQLite%20as%20the%20fallback%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22mysql%20extension%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20DuckDB%20add-on%20that%20attaches%20a%20MySQL%20database%20the%20way%20a%20file%20is%20attached%2C%20so%20the%20same%20queries%20run%20on%20a%20MySQL%20server.%20No%20Python%20driver%20is%20needed.%22%2C%20%22example%22%3A%20%22INSTALL%20mysql%3B%20LOAD%20mysql%3B%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%205%20%C2%B7%20The%20real%20thing%3A%20reading%20a%20MySQL%20server%20with%20DuckDB's%20mysql%20extension%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22secret%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22DuckDB's%20store%20for%20a%20connection's%20credentials.%20When%20an%20ATTACH%20that%20uses%20a%20secret%20fails%2C%20the%20error%20shows%20the%20database's%20name%20and%20not%20the%20password.%22%2C%20%22example%22%3A%20%22CREATE%20SECRET%20survey%20(TYPE%20mysql%2C%20...)%22%2C%20%22where%22%3A%20%5B(T%2C%20%22%23%23%205%20%C2%B7%20The%20real%20thing%3A%20reading%20a%20MySQL%20server%20with%20DuckDB's%20mysql%20extension%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22CASE%20WHEN%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22SQL's%20case_when%3A%20the%20conditions%20in%20order%2C%20and%20the%20first%20that%20holds%20wins.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20The%20rules%20in%20SQL%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22window%20function%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22A%20summary%20over%20a%20group%20put%20on%20every%20row%20of%20it%2C%20as%20pandas'%20transform.%22%2C%20%22example%22%3A%20%22count(*)%20OVER%20(PARTITION%20BY%20region_code%2C%20hh_id)%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20The%20comparison%20in%20SQL%22)%5D%7D%2C%0A%20%20%20%20%20%20%20%20%7B%22term%22%3A%20%22ANTI%20JOIN%22%2C%20%22kind%22%3A%20%22DuckDB%20%26%20SQL%22%2C%20%22meaning%22%3A%20%22DuckDB's%20anti-join%20in%20SQL.%20Each%20table%20keeps%20its%20own%20column%20names%2C%20paired%20in%20the%20ON%20clause.%22%2C%20%22example%22%3A%20%22%22%2C%20%22where%22%3A%20%5B(M%2C%20%22%23%23%23%20The%20leftovers%20this%20section%20starts%20from%22)%5D%7D%2C%0A%20%20%20%20%5D%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_()%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Glossary%0A%0A%20%20%20%20The%20words%20the%20course%20uses%2C%20in%20plain%20language%3A%20the%20survey's%2C%20survey%20sampling's%2C%20edit%20rules'%20and%20anomaly%20detection's%2C%20and%20the%20Python%2C%20DuckDB%20and%20svy%20names%20you%20meet%20on%20the%20way.%20Type%20in%20the%20box%20to%20find%20one%2C%20or%20pick%20a%20kind.%20Each%20entry%20says%20where%20the%20course%20explains%20the%20term%2C%20with%20a%20link%20to%20that%20notebook%20and%20the%20heading%20to%20look%20for.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_()%3A%0A%20%20%20%20search%20%3D%20mo.ui.text(placeholder%3D%22type%20a%20word%2C%20like%20stratum%20or%20join%22%2C%20label%3D%22Find%3A%22%2C%20full_width%3DTrue)%0A%20%20%20%20kind%20%3D%20mo.ui.dropdown(options%3D%5B%22all%22%2C%20*KINDS%5D%2C%20value%3D%22all%22%2C%20label%3D%22Kind%3A%22)%0A%20%20%20%20mo.hstack(%5Bsearch%2C%20kind%5D%2C%20justify%3D%22start%22%2C%20gap%3D2%2C%20widths%3D%5B3%2C%201%5D)%0A%20%20%20%20return%20kind%2C%20search%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(kind%2C%20search)%3A%0A%20%20%20%20_needle%20%3D%20search.value.strip().lower()%0A%20%20%20%20_found%20%3D%20%5B%0A%20%20%20%20%20%20%20%20t%20for%20t%20in%20sorted(TERMS%2C%20key%3Dlambda%20t%3A%20t%5B%22term%22%5D.lower().lstrip(%22.%26%22))%0A%20%20%20%20%20%20%20%20if%20(kind.value%20%3D%3D%20%22all%22%20or%20t%5B%22kind%22%5D%20%3D%3D%20kind.value)%0A%20%20%20%20%20%20%20%20and%20(not%20_needle%20or%20any(_needle%20in%20t%5Bfield%5D.lower()%20for%20field%20in%20(%22term%22%2C%20%22meaning%22%2C%20%22example%22)))%0A%20%20%20%20%5D%0A%0A%20%20%20%20def%20_entry(t)%3A%0A%20%20%20%20%20%20%20%20where%20%3D%20%22%3B%20%22.join(f%22%5B%7Bnb%7D%5D(%7B'%2F%3Ffile%3D'%20%2B%20nb%7D)%2C%20*%7Bheading.lstrip('%23').strip()%7D*%22%20for%20nb%2C%20heading%20in%20t%5B%22where%22%5D)%0A%20%20%20%20%20%20%20%20example%20%3D%20f%22%5Cn%5Cn%60%7Bt%5B'example'%5D%7D%60%22%20if%20t%5B%22example%22%5D%20else%20%22%22%0A%20%20%20%20%20%20%20%20return%20f%22**%7Bt%5B'term'%5D%7D**%20%C2%B7%20*%7Bt%5B'kind'%5D%7D*%5Cn%5Cn%7Bt%5B'meaning'%5D%7D%7Bexample%7D%5Cn%5CnWhere%3A%20%7Bwhere%7D%22%0A%0A%20%20%20%20mo.vstack(%5B%0A%20%20%20%20%20%20%20%20mo.md(f%22%7Blen(_found)%7D%20of%20%7Blen(TERMS)%7D%20terms.%22)%2C%0A%20%20%20%20%20%20%20%20*%5Bmo.md(_entry(t))%20for%20t%20in%20_found%5D%2C%0A%20%20%20%20%5D%20if%20_found%20else%20%5Bmo.md(f%22No%20term%20matches%20*%7Bsearch.value%7D*.%20Try%20a%20shorter%20word.%22)%5D)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
51ca8d1f971a843a03b15f9c95c5cca3