Skip to content

Commit 31cfa98

Browse files
committed
Initial commit: idd-spatial-analysis package
0 parents  commit 31cfa98

File tree

12 files changed

+776
-0
lines changed

12 files changed

+776
-0
lines changed

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install poetry
28+
poetry install
29+
30+
- name: Run tests
31+
run: |
32+
poetry run pytest
33+
34+
- name: Check code formatting
35+
run: |
36+
poetry run black --check src/
37+
poetry run isort --check-only src/

β€Ž.gitignoreβ€Ž

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
23+
# Virtual environments
24+
venv/
25+
env/
26+
ENV/
27+
.venv
28+
29+
# Poetry
30+
poetry.lock
31+
32+
# Jupyter
33+
.ipynb_checkpoints
34+
*.ipynb
35+
36+
# IDEs
37+
.vscode/
38+
.idea/
39+
*.swp
40+
*.swo
41+
*~
42+
43+
# OS
44+
.DS_Store
45+
Thumbs.db
46+
47+
# Data files
48+
*.shp
49+
*.shx
50+
*.dbf
51+
*.prj
52+
*.tif
53+
*.tiff
54+
*.nc
55+
*.zarr
56+
*.csv
57+
*.parquet
58+
59+
# Exclude data directories but keep structure
60+
data/*
61+
!data/.gitkeep
62+
63+
# Logs
64+
*.log
65+
66+
# Testing
67+
.pytest_cache/
68+
.coverage
69+
htmlcov/
70+
71+
# Documentation
72+
docs/_build/

β€ŽDESCRIPTION.yamlβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: idd-spatial-analysis
2+
version: 0.1.0
3+
description: Geospatial analysis tools for IDD research
4+
authors:
5+
- name: Your Name
6+
email: your.email@uw.edu
7+
license: MIT
8+
repository: https://github.com/ihmeuw/idd-spatial-analysis
9+
keywords:
10+
- geospatial
11+
- gis
12+
- spatial-analysis
13+
- geopandas
14+
- climate
15+
- epidemiology
16+
python_requires: ">=3.10"

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Institute for Health Metrics and Evaluation (IHME)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# IDD Spatial Analysis
2+
3+
[![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
4+
[![Poetry](https://img.shields.io/badge/poetry-managed-blue.svg)](https://python-poetry.org/)
5+
6+
Repository for IDD geospatial analysis tools and utilities in Python.
7+
8+
## πŸš€ Quick Start
9+
10+
### Local Installation
11+
12+
#### Option 1: Using Conda (Recommended)
13+
14+
```bash
15+
# Clone the repository
16+
git clone https://github.com/ihmeuw/idd-spatial-analysis.git
17+
cd idd-spatial-analysis
18+
19+
# Create and activate the conda environment
20+
conda env create -f environment.yml
21+
conda activate idd-spatial-analysis
22+
```
23+
24+
#### Option 2: Using Poetry
25+
26+
```bash
27+
# Clone the repository
28+
git clone https://github.com/ihmeuw/idd-spatial-analysis.git
29+
cd idd-spatial-analysis
30+
31+
# Install dependencies with poetry
32+
poetry install
33+
poetry shell
34+
```
35+
36+
#### Option 3: Install as a Python package (from GitHub)
37+
38+
You can install and use `idd_spatial_analysis` in other projects/environments:
39+
40+
```bash
41+
pip install git+https://github.com/ihmeuw/idd-spatial-analysis.git
42+
```
43+
44+
Then, in your Python code:
45+
46+
```python
47+
from idd_spatial_analysis import spatial_utils
48+
49+
# Your geospatial analysis code here
50+
```
51+
52+
## πŸ“¦ Package Structure
53+
54+
```
55+
idd-spatial-analysis/
56+
β”œβ”€β”€ src/
57+
β”‚ └── idd_spatial_analysis/ # Main package
58+
β”‚ β”œβ”€β”€ __init__.py
59+
β”‚ └── spatial_utils.py # Core spatial utilities
60+
β”œβ”€β”€ notebooks/ # Example notebooks
61+
β”œβ”€β”€ tests/ # Unit tests
62+
β”œβ”€β”€ pyproject.toml # Poetry configuration
63+
β”œβ”€β”€ environment.yml # Conda environment
64+
└── README.md
65+
```
66+
67+
## πŸ› οΈ Development
68+
69+
### Running Tests
70+
71+
```bash
72+
poetry run pytest
73+
```
74+
75+
### Code Formatting
76+
77+
```bash
78+
# Format with black
79+
poetry run black src/
80+
81+
# Sort imports
82+
poetry run isort src/
83+
```
84+
85+
## πŸ“ License
86+
87+
MIT License - see LICENSE file for details.

0 commit comments

Comments
Β (0)