Skip to content

Commit 7cc1777

Browse files
first commit
0 parents  commit 7cc1777

26 files changed

+3999
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Deploy book to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.11"
16+
17+
- name: Install dependencies
18+
run: pip install -r requirements.txt
19+
20+
- name: Deploy to GitHub Pages
21+
run: mkdocs gh-deploy --force
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
site/
2+
.venv/
3+
__pycache__/
4+
*.pyc
5+
.ipynb_checkpoints/
6+
.DS_Store

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Geospatial Modeling with Python
2+
3+
**Sergio Souza Costa** — LambdaGEO, UFMA
4+
5+
A practical guide to geographic data science and discrete spatial simulation
6+
using the Python ecosystem and the [DisSModel](https://github.com/lambdageo/dissmodel) framework.
7+
8+
## Build the book
9+
10+
```bash
11+
pip install -r requirements.txt
12+
mkdocs serve # preview at http://127.0.0.1:8000
13+
mkdocs build # build static site to site/
14+
mkdocs gh-deploy # deploy to GitHub Pages
15+
```
16+
17+
## Structure
18+
19+
```
20+
docs/
21+
index.md
22+
part1/ ch01 … ch05 # Python for Data Science
23+
part2/ ch06 … ch10 # Geographic Data Science
24+
part3/ ch11 … ch20 # Discrete Spatial Modeling
25+
```
26+
27+
## Contributing
28+
29+
Each chapter lives on its own branch: `chapter/chNN-slug`.
30+
Open a PR to `main` when a chapter is ready for review.
31+
32+
---
33+
*LambdaGEO Research Group · Federal University of Maranhão (UFMA)*

docs/index.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Geospatial Modeling with Python
2+
3+
**Sergio Souza Costa** — LambdaGEO, UFMA
4+
5+
---
6+
7+
This book is a practical guide to geographic data science and discrete spatial
8+
simulation using the Python ecosystem.
9+
10+
It is organized in three parts:
11+
12+
- **Part I** — Python for Data Science
13+
Core tools: Pandas, EDA, software engineering.
14+
15+
- **Part II** — Geographic Data Science
16+
Spatial data types, GeoPandas, rasterio, libpysal, visualization.
17+
18+
- **Part III** — Discrete Spatial Modeling
19+
Cellular automata, salabim, NumPy vectorization, and the
20+
[DisSModel](https://github.com/lambdageo/dissmodel) framework —
21+
including a full coastal dynamics case study.
22+
23+
---
24+
25+
## How to Use This Book
26+
27+
Each chapter is a Jupyter notebook. You can read it as a book or run it
28+
interactively. Code cells are self-contained within each chapter.
29+
30+
## Installation
31+
32+
```bash
33+
pip install dissmodel>=0.2.0 geopandas rasterio libpysal salabim
34+
```
35+
36+
For the coastal dynamics case study (Chapter 18):
37+
38+
```bash
39+
pip install coastal-dynamics
40+
```
41+
42+
---
43+
44+
## Source Code
45+
46+
All notebooks and supporting code are available at:
47+
48+
- Book repository: [github.com/lambdageo/geospatial-modeling-book](https://github.com/lambdageo/geospatial-modeling-book)
49+
- DisSModel framework: [github.com/lambdageo/dissmodel](https://github.com/lambdageo/dissmodel)
50+
- Coastal dynamics models: [github.com/lambdageo/coastal-dynamics](https://github.com/lambdageo/coastal-dynamics)
51+
52+
---
53+
54+
## Citation
55+
56+
If you use this material in your research or teaching, please cite:
57+
58+
```
59+
Costa, S. S. (2026). Geospatial Modeling with Python.
60+
LambdaGEO Research Group, Federal University of Maranhão (UFMA).
61+
https://lambdageo.github.io/geospatial-modeling-book
62+
```
63+
64+
---
65+
66+
*LambdaGEO Research Group · Federal University of Maranhão (UFMA)*
67+
[lambdageo.github.io](https://lambdageo.github.io)

docs/part1/ch01_ecosystem.ipynb

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 5,
4+
"metadata": {
5+
"kernelspec": {
6+
"display_name": "Python 3",
7+
"language": "python",
8+
"name": "python3"
9+
},
10+
"language_info": {
11+
"name": "python",
12+
"version": "3.11.0"
13+
},
14+
"book_metadata": {
15+
"part": 1,
16+
"chapter": 1,
17+
"title": "The Python Scientific Ecosystem",
18+
"path": "part1/ch01_ecosystem.ipynb"
19+
}
20+
},
21+
"cells": [
22+
{
23+
"cell_type": "markdown",
24+
"metadata": {},
25+
"source": [
26+
"# Chapter 1: The Python Scientific Ecosystem\n",
27+
"\n",
28+
"*Part I — Python for Data Science*\n"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"## Learning Objectives\n",
36+
"\n",
37+
"By the end of this chapter you will be able to:\n",
38+
"\n",
39+
"- Set up a reproducible development environment (conda/mamba, VS Code, Jupyter)\n",
40+
"- Understand the role of each core library: NumPy, Pandas, Matplotlib, GeoPandas\n",
41+
"- Manage packages and environments for reproducible science\n"
42+
]
43+
},
44+
{
45+
"cell_type": "markdown",
46+
"metadata": {},
47+
"source": [
48+
"```{note}\n",
49+
"Keep tool installation instructions in a collapsible admonition block.\n",
50+
"```\n"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": null,
56+
"metadata": {},
57+
"outputs": [],
58+
"source": [
59+
"# Standard imports — add chapter-specific imports below\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n"
60+
]
61+
},
62+
{
63+
"cell_type": "markdown",
64+
"metadata": {},
65+
"source": [
66+
"## Why Python for Data Science\n",
67+
"\n",
68+
"*TODO: write content.*\n"
69+
]
70+
},
71+
{
72+
"cell_type": "code",
73+
"execution_count": null,
74+
"metadata": {},
75+
"outputs": [],
76+
"source": [
77+
"# Code for section: Why Python for Data Science\n"
78+
]
79+
},
80+
{
81+
"cell_type": "markdown",
82+
"metadata": {},
83+
"source": [
84+
"## Setting Up Your Environment\n",
85+
"\n",
86+
"*TODO: write content.*\n"
87+
]
88+
},
89+
{
90+
"cell_type": "code",
91+
"execution_count": null,
92+
"metadata": {},
93+
"outputs": [],
94+
"source": [
95+
"# Code for section: Setting Up Your Environment\n"
96+
]
97+
},
98+
{
99+
"cell_type": "markdown",
100+
"metadata": {},
101+
"source": [
102+
"## Package Management with conda and pip\n",
103+
"\n",
104+
"*TODO: write content.*\n"
105+
]
106+
},
107+
{
108+
"cell_type": "code",
109+
"execution_count": null,
110+
"metadata": {},
111+
"outputs": [],
112+
"source": [
113+
"# Code for section: Package Management with conda and pip\n"
114+
]
115+
},
116+
{
117+
"cell_type": "markdown",
118+
"metadata": {},
119+
"source": [
120+
"## Core Libraries at a Glance\n",
121+
"\n",
122+
"*TODO: write content.*\n"
123+
]
124+
},
125+
{
126+
"cell_type": "code",
127+
"execution_count": null,
128+
"metadata": {},
129+
"outputs": [],
130+
"source": [
131+
"# Code for section: Core Libraries at a Glance\n"
132+
]
133+
},
134+
{
135+
"cell_type": "markdown",
136+
"metadata": {},
137+
"source": [
138+
"## Jupyter Notebooks and VS Code\n",
139+
"\n",
140+
"*TODO: write content.*\n"
141+
]
142+
},
143+
{
144+
"cell_type": "code",
145+
"execution_count": null,
146+
"metadata": {},
147+
"outputs": [],
148+
"source": [
149+
"# Code for section: Jupyter Notebooks and VS Code\n"
150+
]
151+
},
152+
{
153+
"cell_type": "markdown",
154+
"metadata": {},
155+
"source": [
156+
"## Summary and Further Reading\n",
157+
"\n",
158+
"*TODO: write content.*\n"
159+
]
160+
},
161+
{
162+
"cell_type": "code",
163+
"execution_count": null,
164+
"metadata": {},
165+
"outputs": [],
166+
"source": [
167+
"# Code for section: Summary and Further Reading\n"
168+
]
169+
},
170+
{
171+
"cell_type": "markdown",
172+
"metadata": {},
173+
"source": [
174+
"## Summary\n",
175+
"\n",
176+
"*TODO: summarise key takeaways.*\n",
177+
"\n",
178+
"### Key concepts introduced\n",
179+
"\n",
180+
"- TODO\n- TODO\n- TODO\n"
181+
]
182+
},
183+
{
184+
"cell_type": "markdown",
185+
"metadata": {},
186+
"source": [
187+
"## Further Reading\n",
188+
"\n",
189+
"- *TODO: add references.*\n"
190+
]
191+
}
192+
]
193+
}

0 commit comments

Comments
 (0)