Nason/eoir-database
收藏资源简介:
--- license: mit task_categories: - tabular-classification - tabular-regression tags: - immigration - eoir - immigration-court - foia - duckdb - legal - policy - government-data pretty_name: EOIR Immigration Court Database size_categories: - 100M<n<1B --- # EOIR Immigration Court Database A clean, queryable DuckDB database built from the [EOIR FOIA data dump](https://www.justice.gov/eoir/foia-library-0) -- the most comprehensive public dataset on U.S. immigration court proceedings. **164,633,807 rows** across **97 tables** covering every immigration court case since the 1970s. Built with [eoir-database](https://github.com/ian-nason/eoir-database). ## Quick Start ### DuckDB CLI ```sql INSTALL httpfs; LOAD httpfs; ATTACH 'https://huggingface.co/datasets/Nason/eoir-database/resolve/main/eoir.duckdb' AS eoir (READ_ONLY); -- Query immediately SELECT court_name, COUNT(*) as cases FROM eoir.v_proceedings_full WHERE CASE_TYPE = 'RMV' GROUP BY court_name ORDER BY cases DESC LIMIT 10; ``` ### Python ```python import duckdb con = duckdb.connect() con.sql("INSTALL httpfs; LOAD httpfs;") con.sql(""" ATTACH 'https://huggingface.co/datasets/Nason/eoir-database/resolve/main/eoir.duckdb' AS eoir (READ_ONLY) """) con.sql("SELECT * FROM eoir._metadata").show() ``` DuckDB uses HTTP range requests, so only the pages needed for your query are downloaded. ## Tables | Table | Description | Rows | |-------|-------------|------| | `schedule` | Hearing schedule entries with calendar type and adjournments | 45,183,976 | | `representatives` | Attorney representation records | 25,639,802 | | `charges` | Individual charges per proceeding | 18,484,804 | | `proceedings` | Proceedings: hearings, decisions, judges, charges | 16,216,773 | | `applications` | Applications for relief (asylum, cancellation, etc.) | 15,756,896 | | `cases` | Case-level demographics, custody, dates, attorney info | 12,461,924 | | `custody_history` | Custody status change records | 9,777,557 | | `motions` | Motions filed in proceedings | 8,030,259 | | `juvenile_history` | Juvenile designation records | 2,953,170 | | `lead_rider` | Lead/rider case relationships | 2,582,001 | | `case_identifiers` | Case ID cross-references | 2,392,405 | | `bonds` | Bond hearing records and amounts | 1,586,265 | | `appeals` | Appeals to Board of Immigration Appeals | 1,457,288 | | `appeal2` | Loaded from tblAppeal2.csv | 1,195,783 | | `attorneys` | Attorney registry | 403,612 | | `appeal_fed_courts` | Loaded from tblAppealFedCourts.csv | 179,707 | | `case_priority_history` | Priority code changes | 138,004 | | `three_mbr_referrals` | Loaded from tblThreeMbrReferrals.csv | 83,464 | | `pro_bono` | Pro bono screening records | 65,944 | | `lu_judge_base_city` | Loaded from tblLookupJudgeBaseCity.csv | 11,266 | | `lu_insta` | Loaded from tblLookupINSTA.csv | 8,972 | | `lu_inmate` | Loaded from tblLookupInmate.csv | 4,844 | | `lu_inmate_housing` | Loaded from tblInmateHousing.csv | 4,752 | | `lu_responsible_party` | Loaded from tblResponsibleParty.csv | 3,381 | | `lu_judge` | Immigration judge codes | 1,455 | | `lu_hearing_location` | Hearing location codes | 1,241 | | `lu_insloc` | Loaded from tblLookupINSLOC.csv | 1,020 | | `lu_bia` | Loaded from tblLookupBIA.csv | 867 | | `lu_insaddress` | Loaded from tblLookUpINSAddress.csv | 754 | | `lu_language` | Language codes | 738 | | `lu_holidays` | Loaded from tblLookupHolidays.csv | 613 | | `lu_notice` | Loaded from tblLookupNOTICE.csv | 598 | | `lu_district_location` | Loaded from tblLookupDistrictLocation.csv | 288 | | `lu_office_location` | Loaded from tblLookupOfficeLocation.csv | 264 | | `lu_alien_nat` | Loaded from tblLookupAlienNat.csv | 256 | | `lu_country` | Loaded from tblLookupCountry.csv | 254 | | `lu_charges` | Charge codes and descriptions | 252 | | `lu_nationality` | Nationality/country codes | 251 | | `lu_appeal_issues` | Loaded from tblLookupAppealIssues.csv | 246 | | `lu_biacluster` | Loaded from tblLookup_BIACluster.csv | 244 | | `lu_court_decision` | Court decision codes (by case type) | 217 | | `lu_bar_code_type` | Loaded from tblBarCodeType.csv | 141 | | `lu_adjournment` | Adjournment reason codes | 122 | | `lu_case_identifier` | Loaded from tblLookUpCaseIdentifier.csv | 110 | | `lu_base_city` | Immigration court locations | 97 | | `lu_in_tr_pr` | Loaded from tblLookupInTrPr.csv | 94 | | `lu_motion_type` | Motion type codes | 72 | | `lu_insoffice` | Loaded from tblINSoffice.csv | 72 | | `lu_state` | U.S. state codes | 59 | | `lu_bia_decision` | BIA decision codes | 53 | | `lu_special_issue` | Loaded from tblLookupSpecialIssue.csv | 43 | | `lu_application` | Application type codes | 40 | | `lu_teams` | Loaded from tblTeams.csv | 37 | | `lu_hold_reason` | Loaded from tblLookupHoldReason.csv | 37 | | `lu_schedule_type` | Schedule type codes | 36 | | `lu_callup_reasons` | Loaded from tblLookupCallup_Reasons.csv | 30 | | `lu_cal_type` | Calendar type codes | 29 | | `lu_dddecision_types` | Loaded from tblLookUpDDDecisionTypes.csv | 23 | | `lu_panels` | Loaded from tblPanels.csv | 20 | | `lu_appeal_type` | Loaded from tbllookupAppealType.csv | 19 | | `lu_board_motions` | Loaded from tblLookupBoardMotions.csv | 16 | | `lu_priority` | Loaded from tblLookupPriority.csv | 15 | | `lu_br_deduct_codes` | Loaded from tbl_br_DeductCodes.csv | 15 | | `lu_app_decision` | Application decision codes | 14 | | `lu_intr_pr_lang` | Loaded from tblLookupIntrPrLang.csv | 14 | | `lu_transcribers` | Loaded from tblLookupTranscribers.csv | 14 | | `lu_case_type` | Case type codes | 13 | | `lu_dec_code` | Loaded from tblDecCode.csv | 12 | | `lu_filing_method_party` | Loaded from tblLookupFiling_Method_Party.csv | 10 | | `lu_filed_by` | Loaded from tblLookupFiledBy.csv | 9 | | `lu_comment_type_board` | Loaded from tblLookupCommentTypeBoard.csv | 9 | | `lu_contact_change` | Loaded from tblLookupContactChange.csv | 9 | | `lu_torture_conv_id` | Loaded from tblTortureConvID.csv | 8 | | `lu_ins_clock_entry_status` | Loaded from tblLookup_INS_Clock_Entry_Status.csv | 8 | | `lu_3_mbr_referred_reason` | Loaded from tblLookup3MbrReferredReason.csv | 7 | | `lu_category` | Loaded from tbllookup_Category.csv | 7 | | `lu_vote` | Loaded from tblLookupVote.csv | 7 | | `lu_juvenile` | Loaded from tblLookup_Juvenile.csv | 6 | | `lu_service_method` | Loaded from tblLookupService_Method.csv | 6 | | `lu_case_priority` | Loaded from tblLookup_CasePriority.csv | 6 | | `lu_fee_status` | Loaded from tblLookupFeeStatus.csv | 5 | | `lu_consulted_with` | Loaded from tblLookupConsultedWith.csv | 5 | | `lu_biadecision_type` | Loaded from tblLookupBIADecisionType.csv | 5 | | `lu_in_tr_pr_agenda` | Loaded from tblLookupInTrPrAgenda.csv | 5 | | `lu_fed_court_decision` | Loaded from tblLookupFedCourtDecision.csv | 4 | | `lu_oaresponse` | Loaded from tblLookupOAResponse.csv | 4 | | `lu_components` | Loaded from tblLookupComponents.csv | 4 | | `lu_filing_method` | Loaded from tblLookupFiling_Method.csv | 4 | | `lu_final_disposition` | Loaded from tblLookupFinalDisposition.csv | 4 | | `lu_claimed_issue` | Loaded from tblLookupClaimedIssue.csv | 4 | | `lu_custody_status` | Custody status codes | 3 | | `lu_fee_type` | Loaded from tblLookupFeeType.csv | 3 | | `lu_allegation_stmt` | Loaded from tblLookUpAllegationStmt.csv | 3 | | `lu_region` | Loaded from tblLookupRegion.csv | 2 | | `lu_sex` | Loaded from tblLookupSex.csv | 2 | | `lu_in_tr_pr_lang_group` | Loaded from tblLookupInTrPrLangGroup.csv | 2 | | `lu_fed_court_remand_to` | Loaded from tblLookupFedCourtRemandTo.csv | 2 | ## Data Source [EOIR FOIA Library](https://www.justice.gov/eoir/foia-library-0) -- updated monthly by the Executive Office for Immigration Review (U.S. Department of Justice). This is public domain U.S. government data. ## License Database build code: MIT. Underlying data: public domain (U.S. government work). ## GitHub Full source code, build instructions, and example analyses: [github.com/ian-nason/eoir-database](https://github.com/ian-nason/eoir-database)
许可证:MIT协议 任务类别: - 表格分类 - 表格回归 标签: - 移民 - EOIR - 移民法院 - FOIA(信息自由法,Freedom of Information Act) - DuckDB - 法律 - 政策 - 政府数据 美观名称:EOIR移民法院数据库 规模区间:100M < n < 1B(即1亿至10亿条记录) # EOIR移民法院数据库 本数据集为基于[EOIR FOIA数据转储文件]("https://www.justice.gov/eoir/foia-library-0")构建的可查询式整洁DuckDB数据库,是目前最全面的美国移民法院程序公开数据集。 **共计164,633,807条记录,分布于97张数据表中,涵盖了自20世纪70年代以来的全部美国移民法院案件。** 本数据集基于[eoir-database]("https://github.com/ian-nason/eoir-database")构建。 ## 快速上手 ### DuckDB命令行界面 sql INSTALL httpfs; LOAD httpfs; ATTACH 'https://huggingface.co/datasets/Nason/eoir-database/resolve/main/eoir.duckdb' AS eoir (READ_ONLY); -- 可直接执行查询 SELECT court_name, COUNT(*) as cases FROM eoir.v_proceedings_full WHERE CASE_TYPE = 'RMV' GROUP BY court_name ORDER BY cases DESC LIMIT 10; ### Python python import duckdb con = duckdb.connect() con.sql("INSTALL httpfs; LOAD httpfs;") con.sql(""" ATTACH 'https://huggingface.co/datasets/Nason/eoir-database/resolve/main/eoir.duckdb' AS eoir (READ_ONLY) """) con.sql("SELECT * FROM eoir._metadata").show() DuckDB采用HTTP范围请求机制,仅会下载查询所需的数据页面。 ## 数据表 | 表名 | 描述 | 记录数 | |-------|-------------|------| | `schedule` | 听证调度条目,包含日历类型与延期信息 | 45,183,976 | | `representatives` | 律师代理记录 | 25,639,802 | | `charges` | 单起程序中的单项指控 | 18,484,804 | | `proceedings` | 程序记录:听证、裁决、法官、指控信息 | 16,216,773 | | `applications` | 救济申请记录(庇护、取消驱逐等) | 15,756,896 | | `cases` | 案件级人口统计、羁押状态、日期、律师信息 | 12,461,924 | | `custody_history` | 羁押状态变更记录 | 9,777,557 | | `motions` | 程序中提交的动议 | 8,030,259 | | `juvenile_history` | 青少年身份记录 | 2,953,170 | | `lead_rider` | 主案/附属案关联关系 | 2,582,001 | | `case_identifiers` | 案件ID交叉引用表 | 2,392,405 | | `bonds` | 保释听证记录与保释金额 | 1,586,265 | | `appeals` | 向移民上诉委员会提交的上诉 | 1,457,288 | | `appeal2` | 从tblAppeal2.csv加载的数据 | 1,195,783 | | `attorneys` | 律师登记册 | 403,612 | | `appeal_fed_courts` | 从tblAppealFedCourts.csv加载的数据 | 179,707 | | `case_priority_history` | 优先级代码变更记录 | 138,004 | | `three_mbr_referrals` | 从tblThreeMbrReferrals.csv加载的数据 | 83,464 | | `pro_bono` | 公益法律服务筛查记录 | 65,944 | | `lu_judge_base_city` | 从tblLookupJudgeBaseCity.csv加载的数据 | 11,266 | | `lu_insta` | 从tblLookupINSTA.csv加载的数据 | 8,972 | | `lu_inmate` | 从tblLookupInmate.csv加载的数据 | 4,844 | | `lu_inmate_housing` | 从tblInmateHousing.csv加载的数据 | 4,752 | | `lu_responsible_party` | 从tblResponsibleParty.csv加载的数据 | 3,381 | | `lu_judge` | 移民法官代码表 | 1,455 | | `lu_hearing_location` | 听证地点代码表 | 1,241 | | `lu_insloc` | 从tblLookupINSLOC.csv加载的数据 | 1,020 | | `lu_bia` | 从tblLookupBIA.csv加载的数据 | 867 | | `lu_insaddress` | 从tblLookUpINSAddress.csv加载的数据 | 754 | | `lu_language` | 语言代码表 | 738 | | `lu_holidays` | 从tblLookupHolidays.csv加载的数据 | 613 | | `lu_notice` | 从tblLookupNOTICE.csv加载的数据 | 598 | | `lu_district_location` | 从tblLookupDistrictLocation.csv加载的数据 | 288 | | `lu_office_location` | 从tblLookupOfficeLocation.csv加载的数据 | 264 | | `lu_alien_nat` | 从tblLookupAlienNat.csv加载的数据 | 256 | | `lu_country` | 国家代码表 | 254 | | `lu_charges` | 指控代码与描述 | 252 | | `lu_nationality` | 国籍/国家代码表 | 251 | | `lu_appeal_issues` | 从tblLookupAppealIssues.csv加载的数据 | 246 | | `lu_biacluster` | 从tblLookup_BIACluster.csv加载的数据 | 244 | | `lu_court_decision` | 法院裁决代码表(按案件类型分类) | 217 | | `lu_bar_code_type` | 从tblBarCodeType.csv加载的数据 | 141 | | `lu_adjournment` | 延期原因代码表 | 122 | | `lu_case_identifier` | 从tblLookUpCaseIdentifier.csv加载的数据 | 110 | | `lu_base_city` | 移民法院所在地 | 97 | | `lu_in_tr_pr` | 从tblLookupInTrPr.csv加载的数据 | 94 | | `lu_motion_type` | 动议类型代码表 | 72 | | `lu_insoffice` | 从tblINSoffice.csv加载的数据 | 72 | | `lu_state` | 美国州代码表 | 59 | | `lu_bia_decision` | 移民上诉委员会裁决代码表 | 53 | | `lu_special_issue` | 从tblLookupSpecialIssue.csv加载的数据 | 43 | | `lu_application` | 申请类型代码表 | 40 | | `lu_teams` | 从tblTeams.csv加载的数据 | 37 | | `lu_hold_reason` | 从tblLookupHoldReason.csv加载的数据 | 37 | | `lu_schedule_type` | 调度类型代码表 | 36 | | `lu_callup_reasons` | 从tblLookupCallup_Reasons.csv加载的数据 | 30 | | `lu_cal_type` | 日历类型代码表 | 29 | | `lu_dddecision_types` | 从tblLookUpDDDecisionTypes.csv加载的数据 | 23 | | `lu_panels` | 从tblPanels.csv加载的数据 | 20 | | `lu_appeal_type` | 从tbllookupAppealType.csv加载的数据 | 19 | | `lu_board_motions` | 从tblLookupBoardMotions.csv加载的数据 | 16 | | `lu_priority` | 从tblLookupPriority.csv加载的数据 | 15 | | `lu_br_deduct_codes` | 从tbl_br_DeductCodes.csv加载的数据 | 15 | | `lu_app_decision` | 申请裁决代码表 | 14 | | `lu_intr_pr_lang` | 从tblLookupIntrPrLang.csv加载的数据 | 14 | | `lu_transcribers` | 从tblLookupTranscribers.csv加载的数据 | 14 | | `lu_case_type` | 案件类型代码表 | 13 | | `lu_dec_code` | 从tblDecCode.csv加载的数据 | 12 | | `lu_filing_method_party` | 从tblLookupFiling_Method_Party.csv加载的数据 | 10 | | `lu_filed_by` | 从tblLookupFiledBy.csv加载的数据 | 9 | | `lu_comment_type_board` | 从tblLookupCommentTypeBoard.csv加载的数据 | 9 | | `lu_contact_change` | 从tblLookupContactChange.csv加载的数据 | 9 | | `lu_torture_conv_id` | 从tblTortureConvID.csv加载的数据 | 8 | | `lu_ins_clock_entry_status` | 从tblLookup_INS_Clock_Entry_Status.csv加载的数据 | 8 | | `lu_3_mbr_referred_reason` | 从tblLookup3MbrReferredReason.csv加载的数据 | 7 | | `lu_category` | 从tbllookup_Category.csv加载的数据 | 7 | | `lu_vote` | 从tblLookupVote.csv加载的数据 | 7 | | `lu_juvenile` | 从tblLookup_Juvenile.csv加载的数据 | 6 | | `lu_service_method` | 从tblLookupService_Method.csv加载的数据 | 6 | | `lu_case_priority` | 从tblLookup_CasePriority.csv加载的数据 | 6 | | `lu_fee_status` | 从tblLookupFeeStatus.csv加载的数据 | 5 | | `lu_consulted_with` | 从tblLookupConsultedWith.csv加载的数据 | 5 | | `lu_biadecision_type` | 从tblLookupBIADecisionType.csv加载的数据 | 5 | | `lu_in_tr_pr_agenda` | 从tblLookupInTrPrAgenda.csv加载的数据 | 5 | | `lu_fed_court_decision` | 从tblLookupFedCourtDecision.csv加载的数据 | 4 | | `lu_oaresponse` | 从tblLookupOAResponse.csv加载的数据 | 4 | | `lu_components` | 从tblLookupComponents.csv加载的数据 | 4 | | `lu_filing_method` | 从tblLookupFiling_Method.csv加载的数据 | 4 | | `lu_final_disposition` | 从tblLookupFinalDisposition.csv加载的数据 | 4 | | `lu_claimed_issue` | 从tblLookupClaimedIssue.csv加载的数据 | 4 | | `lu_custody_status` | 羁押状态代码表 | 3 | | `lu_fee_type` | 从tblLookupFeeType.csv加载的数据 | 3 | | `lu_allegation_stmt` | 从tblLookUpAllegationStmt.csv加载的数据 | 3 | | `lu_region` | 从tblLookupRegion.csv加载的数据 | 2 | | `lu_sex` | 从tblLookupSex.csv加载的数据 | 2 | | `lu_in_tr_pr_lang_group` | 从tblLookupInTrPrLangGroup.csv加载的数据 | 2 | | `lu_fed_court_remand_to` | 从tblLookupFedCourtRemandTo.csv加载的数据 | 2 | ## 数据源 [EOIR FOIA库]("https://www.justice.gov/eoir/foia-library-0")由美国司法部移民审查执行办公室(Executive Office for Immigration Review)每月更新。本数据集属于美国联邦政府公共领域数据。 ## 许可证 数据库构建代码采用MIT协议,底层数据为美国联邦政府公共领域数据。 ## GitHub 完整源代码、构建指南与示例分析请访问:[github.com/ian-nason/eoir-database]("https://github.com/ian-nason/eoir-database")



