Democratizing Access to United States Federal Law Through Open Source
Building the future of American legal AI, one statute at a time βοΈπΊπΈ
π Getting Started β’ π Dataset β’ π― Vision β’ π€ Contributing β’ π Documentation
"The law belongs to the people. Federal statutes should be accessible, searchable, and understandable for every American citizen."
π― This is Phase 1 of the IuLex Open Knowledge Project - a collaborative repository designed to be cloned, worked on, and contributed back to. We're transforming all 54 federal law titles into structured data as the foundation for future knowledge databases and graphs.
π How to Contribute: Clone this repository, download and process US Code titles using our automation scripts, validate data quality, and submit pull requests. This is collaborative knowledge building at scale.
- Create Clone-able Federal Law Repository: Build a repository anyone can clone and improve
- Democratize US Code Access: Make federal law processing collaborative and transparent
- Prepare for Knowledge Graphs: Structure data for future interconnected databases
- Enable Mass Collaboration: Make it easy for anyone to contribute to federal law digitization
- Build AI-Ready Foundation: Prepare structured data for Phase 2 knowledge systems
- Federal Knowledge Databases: Enterprise-grade PostgreSQL and graph databases
- Legal Intelligence Systems: AI-powered legal research and analysis platforms
- Cross-Jurisdictional Knowledge Graphs: Connections between federal, state, and international law
# Clone this collaborative federal law repository
git clone https://github.com/yourusername/usa-code-db.git
cd usa-code-db
# This repo is designed for mass collaboration - see PROJECT_MAP.md for navigation
# Download all 54 titles of US Code
cd scripts
./download_uscode.sh
# Convert to structured JSON format
./convert_to_json.sh
# Generate human-readable Markdown
./convert_to_markdown.sh
- bash/zsh shell
- curl for downloading
- jq for JSON processing (optional)
- xmllint for XML parsing (optional)
- ~3GB disk space for complete dataset
Component | Status | Count | Size |
---|---|---|---|
ποΈ Titles Available | π Planned | 54/54 | ~2.5GB |
π XML Files | π Planned | 54 files | ~500MB |
π JSON Data | π Planned | ~50,000 sections | ~1GB |
π Markdown Files | π Planned | ~50,000 files | ~800MB |
ποΈ SQLite Database | π Planned | 1 database | ~200MB |
π PostgreSQL Schema | π Planned | Full schema | - |
πΈοΈ Knowledge Graph | π Planned | Legal relationships | - |
π€ RAG System | π Planned | AI legal assistant | - |
Our comprehensive collection covers all 54 titles of the United States Code:
π Click to view all 54 titles
Title | Subject | Size |
---|---|---|
Title 1 | General Provisions | Small |
Title 2 | The Congress | Medium |
Title 3 | The President | Small |
Title 4 | Flag and Seal, Seat of Government, and the States | Small |
Title 5 | Government Organization and Employees | Large |
Title 6 | Domestic Security | Medium |
Title 7 | Agriculture | Large |
Title 8 | Aliens and Nationality | Large |
Title 9 | Arbitration | Small |
Title 10 | Armed Forces | Very Large |
Title 11 | Bankruptcy | Medium |
Title 12 | Banks and Banking | Large |
Title 13 | Census | Medium |
Title 14 | Coast Guard | Medium |
Title 15 | Commerce and Trade | Very Large |
Title 16 | Conservation | Large |
Title 17 | Copyrights | Medium |
Title 18 | Crimes and Criminal Procedure | Very Large |
Title 19 | Customs Duties | Large |
Title 20 | Education | Large |
Title 21 | Food and Drugs | Large |
Title 22 | Foreign Relations and Intercourse | Large |
Title 23 | Highways | Large |
Title 24 | Hospitals and Asylums | Small |
Title 25 | Indians | Large |
Title 26 | Internal Revenue Code | Very Large |
Title 27 | Intoxicating Liquors | Medium |
Title 28 | Judiciary and Judicial Procedure | Large |
Title 29 | Labor | Large |
Title 30 | Mineral Lands and Mining | Large |
Title 31 | Money and Finance | Large |
Title 32 | National Guard | Medium |
Title 33 | Navigation and Navigable Waters | Large |
Title 34 | Crime Control and Law Enforcement | Large |
Title 35 | Patents | Medium |
Title 36 | Patriotic and National Observances | Medium |
Title 37 | Pay and Allowances of the Uniformed Services | Medium |
Title 38 | Veterans' Benefits | Large |
Title 39 | Postal Service | Medium |
Title 40 | Public Buildings, Property, and Works | Large |
Title 41 | Public Contracts | Large |
Title 42 | The Public Health and Welfare | Very Large |
Title 43 | Public Lands | Large |
Title 44 | Public Printing and Documents | Medium |
Title 45 | Railroads | Large |
Title 46 | Shipping | Large |
Title 47 | Telecommunications | Large |
Title 48 | Territories and Insular Possessions | Large |
Title 49 | Transportation | Very Large |
Title 50 | War and National Defense | Large |
Title 51 | National and Commercial Space Programs | Medium |
Title 52 | Voting and Elections | Large |
Title 53 | Small Business | Medium |
Title 54 | National Park Service and Related Programs | Large |
usa-code-db/
βββ Title_01_General_Provisions/
β βββ README.md # Title overview
β βββ title_info.json # Metadata
β βββ Chapter_01_Rules_of_Construction/
β β βββ Section_0001.xml # Original USLM XML
β β βββ Section_0001.json # Structured data
β β βββ Section_0001.md # Readable format
β β βββ section_info.json # Section metadata
β βββ Chapter_02_Acts_and_Resolutions/
βββ Title_02_The_Congress/
βββ ... (52 more titles)
βββ Title_54_National_Park_Service/
βββ data/ # Raw and processed data
βββ scripts/ # Automation tools
βββ docs/ # Documentation
- Project Architecture: Complete system design and planning
- Data Acquisition: Download all 54 titles from GovInfo.gov
- XML Parsing: Extract hierarchical structure (titles β chapters β sections)
- Data Validation: Ensure completeness and accuracy
- Repository Structure: Organized directory hierarchy
- JSON Conversion: Structured data for programmatic access
- Markdown Generation: Human-readable format
- Metadata Extraction: Dates, citations, cross-references
- Quality Assurance: Validation and error correction
- Search Indexing: Prepare for full-text search
- SQLite Implementation: Local database with full-text search
- PostgreSQL Schema: Enterprise-grade database design
- Data Import Pipeline: Automated database population
- Search Optimization: Fast query performance
- API Development: RESTful API for data access
- Entity Extraction: Legal concepts, agencies, procedures
- Relationship Mapping: Cross-title references and dependencies
- Graph Database: Neo4j implementation
- Visualization Tools: Interactive legal network exploration
- Semantic Search: Concept-based statute discovery
- Vector Embeddings: Semantic representations of statutes
- RAG Pipeline: Retrieval-Augmented Generation system
- Legal Chatbot: AI assistant for federal law questions
- Multi-language Support: Spanish translations for accessibility
- Legal Analytics: AI-powered insights and analysis
- Web Platform: Public legal knowledge portal
- Mobile Apps: Accessible legal information on-the-go
- Developer Tools: SDKs and libraries for integration
- Community Features: Annotations, discussions, contributions
- Educational Resources: Civics education materials
graph LR
A[GovInfo.gov] --> B[USLM XML Download]
B --> C[Structure Parser]
C --> D[Title/Chapter/Section Extraction]
D --> E[JSON Conversion]
E --> F[Markdown Generation]
F --> G[Database Population]
G --> H[Search Indexing]
H --> I[API Endpoints]
I --> J[Web Interface]
J --> K[AI Integration]
- Data Collection: bash, curl, XML parsing
- Data Processing: Python, jq, xmllint, pandoc
- Databases: SQLite, PostgreSQL, Neo4j
- Search: Elasticsearch, full-text indexing
- AI/ML: Python, Transformers, LangChain, OpenAI
- Web: FastAPI, React, Next.js
- Infrastructure: Docker, GitHub Actions, AWS/GCP
- π Quick Start Guide
- π₯ Installation Instructions
- π§ Configuration Options
- π‘ Usage Examples
- π US Code Structure Guide
- π·οΈ Legal Metadata Schema
- π Coverage Statistics
- βοΈ Legal Disclaimers
We welcome contributions from developers, legal experts, researchers, and citizens!
- π¨βπ» Code: Improve scripts, add features, fix bugs
- π Documentation: Write guides, improve README, create tutorials
- π Data Quality: Validate parsing, report errors, suggest improvements
- π‘ Ideas: Propose features, share use cases, provide feedback
- π Accessibility: Help with translations and accessibility features
- π Analysis: Conduct legal research, create insights, find patterns
- β Star this repository
- π΄ Fork the project
- π Check open issues
- π¬ Join our discussions
- π Submit pull requests
- Research: Find relevant statutes and regulations quickly
- Analysis: Cross-reference federal laws efficiently
- Compliance: Stay updated with federal requirements
- Education: Teach law with comprehensive materials
- Legal Tech: Build innovative legal applications
- AI Research: Train federal law language models
- Data Science: Analyze legal trends and patterns
- Academic Research: Conduct federal law studies
- Policy Analysis: Understand federal legal landscape
- Compliance Tools: Build agency-specific compliance systems
- Public Education: Educate citizens about federal law
- International Cooperation: Share legal frameworks globally
- Civic Education: Learn about American legal system
- Rights & Duties: Understand federal protections and obligations
- Research: Access official federal statutes easily
- Democratic Participation: Engage in informed civic discourse
- πΊπΈ American Citizens: 330M+ people with better legal access
- ποΈ Government Agencies: Enhanced transparency and efficiency
- π Educational Institutions: Comprehensive legal education resource
- βοΈ Legal Professionals: Improved research and analysis tools
- π€ Federal Legal AI: Foundation for US legal AI systems
- π Policy Analytics: Data-driven policy insights
- π Legal Search: Advanced federal law information retrieval
- π± Civic Apps: Mobile applications for citizen engagement
- βοΈ Justice Access: Democratize federal legal knowledge
- ποΈ Government Transparency: Open federal legal information
- π Education: Improve civics and legal education
- π Innovation: Enable federal legal technology advancement
- ποΈ Government Publishing Office - Source of official US Code data
- π GovInfo.gov - Providing free access to federal documents
- π Open Source Community - Tools and inspiration
- π₯ Contributors - Everyone who helps build this project
This project is licensed under the MIT License - see the LICENSE file for details.
If this project helps you or your organization, consider:
- β Starring the repository
- π¦ Sharing on social media
- π‘ Contributing improvements
- β Sponsoring development
π Project Stats (Updated: 2025)
βββ ποΈ Titles: 54 complete US Code titles (planned)
βββ π Sections: ~50,000 federal law sections (estimated)
βββ πΎ Data: ~2.5GB of structured federal legal information
βββ π§ Scripts: Comprehensive automation and processing tools
βββ π Docs: Complete documentation and guides
βββ π Impact: Serving legal professionals, researchers, and citizens
βββ π Future: Building the next generation of American legal AI
Together, we're building the future of accessible American legal information
β Star this Project β’ π€ Contribute β’ π¬ Discuss β’ π§ Contact
"A government of laws, not of men" - John Adams
Let's make federal law accessible to every American ππΊπΈ
- β Project Architecture: Complete system design and planning
- π οΈ Download System: Automated US Code acquisition from GovInfo.gov
- π Repository Structure: Organized directory hierarchy for all 54 titles
- π Documentation: Comprehensive project documentation
- π Open Source: Public repository with MIT license
- π₯ Data Acquisition: Download all 54 US Code titles
- π JSON Conversion: Structured data for programmatic access
- π Search System: Full-text search across all federal statutes
- π€ AI Integration: Legal AI assistant for federal law questions
Last updated: August 2025 Project Status: Architecture Complete - Ready for Data Acquisition