Metadata-Version: 2.4
Name: IODLoader
Version: 0.1.0
Summary: Download and process English Indices of Deprivation data
Project-URL: Homepage, https://github.com/CHRISCARLON/iod-loader
Project-URL: Repository, https://github.com/CHRISCARLON/iod-loader
Project-URL: Issues, https://github.com/CHRISCARLON/iod-loader/issues
Author: Chris Carlon
License: MIT
License-File: LICENSE
Keywords: data-loading,duckdb,indices-of-deprivation,iod,uk-statistics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4==4.14.0
Requires-Dist: duckdb==1.4.1
Requires-Dist: openpyxl==3.1.0
Requires-Dist: pandas==2.3.3
Requires-Dist: requests==2.32.5
Description-Content-Type: text/markdown

# IOD 2025 Data Loader 🦆

A simple Python package and CLI for downloading and loading the latest English Indices of Deprivation 2025 data into DuckDB.

IOD Source Data -> [Click Here](https://www.gov.uk/government/statistics/english-indices-of-deprivation-2025)

## Installation

```bash
pip install iod-loader
```

Or with uv:

```bash
uv add iod-loader
```

## Quick Start

### CLI Usage (Recommended)

Use the CLI tool to load and query the data directly.

```bash
# Load all IOD 2025 data
iod load

# List all tables
iod list-tables

# Query the data
iod query "SELECT * FROM your_schema.your_table LIMIT 10"
```

### Python Library Usage

Or use in a Python script.

```python
from IodLoader import load_with_progress

if __name__ == "__main__":
    load_with_progress()
```

## Database Structure

The loader creates a DuckDB database with the following structure:

- **Schemas**: Named after the Excel filename
- **Tables**: Named after the Excel sheet names

## Querying the Data

You can query the data through:

- **CLI tool**: `iod query "SELECT * FROM ..."`
- **Python package**: Import `query` from `IodLoader`
- **DuckDB CLI**: Run `duckdb IOD2025.duckdb` in your terminal

### Example Query

```bash
iod query "SELECT * FROM file_2_iod2025_domains_of_deprivation.iod2025_domains LIMIT 10"
```
