pygeoglim


Namepygeoglim JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryFast access to GLiM and GLHYMPS geology attributes for watersheds
upload_time2025-09-10 16:45:12
maintainerNone
docs_urlNone
authorMohammad Galib
requires_python>=3.8
licenseMIT
keywords geology hydrology watershed glim glhymps geospatial
VCS
bugtrack_url
requirements geopandas shapely numpy pandas
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pygeoglim

Fast Python package for extracting **geology attributes** (GLiM lithology + GLHYMPS hydrogeology) from Hugging Face datasets for any watershed or region.

## 🚀 Performance

- **Individual watersheds**: 1-5 seconds ⚡
- **Regional analysis**: 10-30 seconds
- **Large areas**: 1-2 minutes
- **Direct from Hugging Face**: No local downloads needed

## 📦 Installation

### From PyPI (Recommended)
```bash
pip install pygeoglim
```

### From GitHub
```bash
pip install git+https://github.com/galib9690/pygeoglim.git
```

### For Development
```bash
git clone https://github.com/galib9690/pygeoglim.git
cd pygeoglim
pip install -e .
```

## 🔧 Quick Start

```python
from pygeoglim import load_geometry, glim_attributes, glhymps_attributes

# Example 1: Using bounding box
geom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])

# Get GLiM lithology attributes
glim_attrs = glim_attributes(geom)
print("GLiM attributes:", glim_attrs)

# Get GLHYMPS hydrogeology attributes  
glhymps_attrs = glhymps_attributes(geom)
print("GLHYMPS attributes:", glhymps_attrs)

# Example 2: Using shapefile
geom = load_geometry(shapefile="path/to/watershed.shp")
attrs = {**glim_attributes(geom), **glhymps_attributes(geom)}
```

## 📊 Output Attributes

### GLiM Lithology
- `geol_1st_class`: Dominant lithology class
- `glim_1st_class_frac`: Fraction of dominant class
- `geol_2nd_class`: Second most common class
- `glim_2nd_class_frac`: Fraction of second class
- `carbonate_rocks_frac`: Fraction of carbonate rocks

### GLHYMPS Hydrogeology
- `geol_permeability`: Area-weighted permeability (m²)
- `geol_porosity`: Area-weighted porosity (fraction)

## 🌍 Data Sources

- **GLiM**: Global Lithological Map from Hugging Face Hub
- **GLHYMPS**: Global Hydrogeology Maps from Hugging Face Hub (Parquet format)
- **Coverage**: Continental United States (CONUS)

## 🔄 Recent Updates

- ✅ Reverted to reliable .gpkg format for GLHYMPS data
- ✅ Simplified data loading with direct mask-based filtering
- ✅ Updated column mappings for actual dataset structure (`logK_Ice_x`, `Porosity_x`)
- ✅ Streamlined error handling

## 📋 Requirements

- Python >= 3.8
- geopandas >= 0.12.0
- shapely >= 1.8.0
- numpy >= 1.20.0
- pandas >= 1.3.0

## 🐛 Troubleshooting

If you encounter issues with GLHYMPS data loading, the package includes automatic fallback mechanisms and error reporting to help diagnose problems.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pygeoglim",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "geology, hydrology, watershed, GLiM, GLHYMPS, geospatial",
    "author": "Mohammad Galib",
    "author_email": "Mohammad Galib <mgalib@purdue.edu>",
    "download_url": "https://files.pythonhosted.org/packages/7c/89/25410984c93aec0811bc00ba6a9337325e1f0387a5e040ff60dda5c0b6c8/pygeoglim-1.0.1.tar.gz",
    "platform": null,
    "description": "# pygeoglim\n\nFast Python package for extracting **geology attributes** (GLiM lithology + GLHYMPS hydrogeology) from Hugging Face datasets for any watershed or region.\n\n## \ud83d\ude80 Performance\n\n- **Individual watersheds**: 1-5 seconds \u26a1\n- **Regional analysis**: 10-30 seconds\n- **Large areas**: 1-2 minutes\n- **Direct from Hugging Face**: No local downloads needed\n\n## \ud83d\udce6 Installation\n\n### From PyPI (Recommended)\n```bash\npip install pygeoglim\n```\n\n### From GitHub\n```bash\npip install git+https://github.com/galib9690/pygeoglim.git\n```\n\n### For Development\n```bash\ngit clone https://github.com/galib9690/pygeoglim.git\ncd pygeoglim\npip install -e .\n```\n\n## \ud83d\udd27 Quick Start\n\n```python\nfrom pygeoglim import load_geometry, glim_attributes, glhymps_attributes\n\n# Example 1: Using bounding box\ngeom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])\n\n# Get GLiM lithology attributes\nglim_attrs = glim_attributes(geom)\nprint(\"GLiM attributes:\", glim_attrs)\n\n# Get GLHYMPS hydrogeology attributes  \nglhymps_attrs = glhymps_attributes(geom)\nprint(\"GLHYMPS attributes:\", glhymps_attrs)\n\n# Example 2: Using shapefile\ngeom = load_geometry(shapefile=\"path/to/watershed.shp\")\nattrs = {**glim_attributes(geom), **glhymps_attributes(geom)}\n```\n\n## \ud83d\udcca Output Attributes\n\n### GLiM Lithology\n- `geol_1st_class`: Dominant lithology class\n- `glim_1st_class_frac`: Fraction of dominant class\n- `geol_2nd_class`: Second most common class\n- `glim_2nd_class_frac`: Fraction of second class\n- `carbonate_rocks_frac`: Fraction of carbonate rocks\n\n### GLHYMPS Hydrogeology\n- `geol_permeability`: Area-weighted permeability (m\u00b2)\n- `geol_porosity`: Area-weighted porosity (fraction)\n\n## \ud83c\udf0d Data Sources\n\n- **GLiM**: Global Lithological Map from Hugging Face Hub\n- **GLHYMPS**: Global Hydrogeology Maps from Hugging Face Hub (Parquet format)\n- **Coverage**: Continental United States (CONUS)\n\n## \ud83d\udd04 Recent Updates\n\n- \u2705 Reverted to reliable .gpkg format for GLHYMPS data\n- \u2705 Simplified data loading with direct mask-based filtering\n- \u2705 Updated column mappings for actual dataset structure (`logK_Ice_x`, `Porosity_x`)\n- \u2705 Streamlined error handling\n\n## \ud83d\udccb Requirements\n\n- Python >= 3.8\n- geopandas >= 0.12.0\n- shapely >= 1.8.0\n- numpy >= 1.20.0\n- pandas >= 1.3.0\n\n## \ud83d\udc1b Troubleshooting\n\nIf you encounter issues with GLHYMPS data loading, the package includes automatic fallback mechanisms and error reporting to help diagnose problems.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fast access to GLiM and GLHYMPS geology attributes for watersheds",
    "version": "1.0.1",
    "project_urls": {
        "Documentation": "https://github.com/galib9690/pygeoglim#readme",
        "Homepage": "https://github.com/galib9690/pygeoglim",
        "Issues": "https://github.com/galib9690/pygeoglim/issues",
        "Repository": "https://github.com/galib9690/pygeoglim.git"
    },
    "split_keywords": [
        "geology",
        " hydrology",
        " watershed",
        " glim",
        " glhymps",
        " geospatial"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "191785c25d46a1b1bbc574ee7e5fe90a40e73428b8c12e1a171cd92056505476",
                "md5": "bd4ae18cbdf1da3b08ce2af046c439cf",
                "sha256": "383c8147fa7687941b3b532a5bc9e1a9e6221ae60a1e50259ed1edee454c5db2"
            },
            "downloads": -1,
            "filename": "pygeoglim-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bd4ae18cbdf1da3b08ce2af046c439cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7256,
            "upload_time": "2025-09-10T16:45:10",
            "upload_time_iso_8601": "2025-09-10T16:45:10.781182Z",
            "url": "https://files.pythonhosted.org/packages/19/17/85c25d46a1b1bbc574ee7e5fe90a40e73428b8c12e1a171cd92056505476/pygeoglim-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7c8925410984c93aec0811bc00ba6a9337325e1f0387a5e040ff60dda5c0b6c8",
                "md5": "6dbffdf47d32ae55e28f589ee0b498ff",
                "sha256": "4e7bd8d3a39c1c0c7cea294e3eaecb0a3d55c9619d541ee1addbf2fceb3c2210"
            },
            "downloads": -1,
            "filename": "pygeoglim-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6dbffdf47d32ae55e28f589ee0b498ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6450,
            "upload_time": "2025-09-10T16:45:12",
            "upload_time_iso_8601": "2025-09-10T16:45:12.032869Z",
            "url": "https://files.pythonhosted.org/packages/7c/89/25410984c93aec0811bc00ba6a9337325e1f0387a5e040ff60dda5c0b6c8/pygeoglim-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-10 16:45:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "galib9690",
    "github_project": "pygeoglim#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "geopandas",
            "specs": [
                [
                    ">=",
                    "0.12.0"
                ]
            ]
        },
        {
            "name": "shapely",
            "specs": [
                [
                    ">=",
                    "1.8.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.20.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "1.3.0"
                ]
            ]
        }
    ],
    "lcname": "pygeoglim"
}
        
Elapsed time: 1.19491s