Metadata-Version: 2.4
Name: georocdata
Version: 0.1.0
Summary: GEOROC database downloader and SQLite converter
Author: GeoPyTool Team
License: GPLv3+
Project-URL: Homepage, https://github.com/GeoPyTool/GeoRocData
Project-URL: Repository, https://github.com/GeoPyTool/GeoRocData
Project-URL: Bug Tracker, https://github.com/GeoPyTool/GeoRocData/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Database
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# GeoRocData

GEOROC database downloader and SQLite converter.

Automatically downloads, processes, and builds a SQLite database from
[GEOROC](https://georoc.mpch-mainz.gwdg.de/georoc/) precompiled datasets.

## Features

- **Download** all GEOROC precompiled CSV data from the new georoc.eu DOI system
- **Legacy fallback** to georoc.mpch-mainz.gwdg.de for older data
- **Fix** CSV quote errors that GEOROC data commonly has
- **Split** each CSV into data, abbreviations, and references sections
- **Build** SQLite database with deduplication

## Installation

```bash
pip install georocdata
```

## Usage

### Command Line

```bash
# Full update: download + process + build DB
georocdata

# Only download
georocdata --download-only

# Only process existing CSVs + build DB
georocdata --process-only

# Use legacy georoc.mpch-mainz.gwdg.de source
georocdata --source legacy

# Both sources
georocdata --source both

# Skip steps
georocdata --skip-fix --skip-split

# Custom output directory and DB name
georocdata --output-dir ./my_data --db-name my_georoc.db
```

### Python API

```python
from georocdata import GEOROCDownloader, GEOROCProcessor

# Download
dl = GEOROCDownloader(output_dir="./data")
dl.download_new_source()

# Process
proc = GEOROCProcessor(data_dir="./data")
proc.fix_all_csvs()
proc.split_all_csvs()
proc.build_database(db_path="./GeoRoc.db")
```

## Data Sources

GEOROC provides 14 precompiled dataset categories:

| Category | DOI |
|----------|-----|
| Archaean Cratons | 10.25625/1KRR1P |
| Complex Volcanic Settings | 10.25625/1VOFM5 |
| Continental Flood Basalts | 10.25625/WSTPOX |
| Convergent Margins | 10.25625/PVFZCE |
| Intraplate Volcanic Rocks | 10.25625/RZZ9VM |
| Oceanic Plateaus | 10.25625/JRZIJF |
| Ocean Basin Flood Basalts | 10.25625/AVLFC2 |
| Ocean Island Groups | 10.25625/WFJZKY |
| Seamounts | 10.25625/JUQK7N |
| Rift Volcanics | 10.25625/KAIVCT |
| Rocks | 10.25625/2JETOA |
| Minerals | 10.25625/SGFTFN |
| Melt Inclusions | 10.25625/7JW6XU |
| Sample Metadata | 10.25625/4EZ7ID |

## License

GPLv3+
