Skip to content

Commit

Permalink
Merge pull request #1 from kamangir/firms-datacubes-a
Browse files Browse the repository at this point in the history
firms datacube discovery and access
  • Loading branch information
kamangir authored Jul 14, 2024
2 parents 5cbb8de + 21f9e4a commit 55907eb
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 79 deletions.
78 changes: 7 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,87 +6,23 @@ AI for precise geospatial data analysis and visualization.
pip install blue-geo
```

🔷 [QGIS](#QGIS) 🔷 [ukraine-timemap](#ukraine-timemap-) 🇺🇦 🔷 [vancouver-watching](#vancouver-watching-) 🌈 🔹 [sources](./sources.yaml) 🔷
| | | |
|-|-|-|
| 🌐 [QGIS](./blue_geo/.abcli/QGIS/README.md) | 🇺🇦 [ukraine-timemap](./blue_geo/.abcli/ukraine-timemap/README.md) | 🌈 [vancouver-watching](https://github.com/kamangir/Vancouver-Watching) |
| [![image](https://github.com/kamangir/assets/blob/main/blue-geo/QGIS.png?raw=true)](./blue_geo/.abcli/QGIS/README.md) | [![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true)](./blue_geo/.abcli/ukraine-timemap/README.md) | [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif?raw=true)](https://github.com/kamangir/Vancouver-Watching) |
| an AI terraform for [QGIS](https://www.qgis.org/). | ingests the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json), and generates a `geojson`, a QGIS project, and [more](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap/ukraine_timemap.png). | 🌈 Vancouver watching with AI, last build: [🔗](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif). | |

---

## QGIS

```bash
> QGIS help
QGIS seed [screen]
. seed 🌱 QGIS.
QGIS expressions pull
. pull QGIS expressions.
QGIS expressions push [push]
. push QGIS expressions.
📂 /Users/kamangir/Library/Application Support/QGIS/QGIS3/profiles/default/python/expressions
📂 /Users/kamangir/git/blue-geo/blue_geo/QGIS/expressions
QGIS serve[r] [start]
. start QGIS server.
```

to start, generate the seed 🌱,

```bash
QGIS seed
```

and paste it in the Python Console in QGIS.

![image](https://github.com/kamangir/assets/blob/main/blue-geo/QGIS-python-console.png?raw=true)

---

## ukraine-timemap 🇺🇦

[`ukraine-timemap`](./blue_geo/.abcli/ukraine-timemap/) ingests the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json), and generates a `geojson`, a QGIS project, and more.

```bash
> ukraine_timemap help
ukraine_timemap browse \
[dataset|github]
. browse ukraine-timemap.
ukraine_timemap ingest \
[dryrun,~upload] \
[-|<object-name>] \
[--verbose 1]
. ingest the latest dataset from https://github.com/bellingcat/ukraine-timemap.
```

example use,

```
@select ukraine-timemap-$(@@timestamp)
ukraine_timemap ingest - . --verbose 1
@open . QGIS
@publish tar .
```

![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/ingest_log.png?raw=true)

latest ingested object: [ukraine-timemap.tar.gz](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap.tar.gz), sandbox: [ukraine-timemap/sandbox.ipynb](./notebooks/ukraine-timemap/sandbox.ipynb).

last build [🔗](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap/ukraine_timemap.png)

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap/ukraine_timemap.png)

![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true)

more: https://arash-kamangir.medium.com/%EF%B8%8F-openai-experiments-93-bf0cee062693

---

## vancouver-watching 🌈

last build [🔗](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif) - [github/kamangir/vancouver-watching](https://github.com/kamangir/vancouver-watching).

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/test_vancouver_watching_ingest/animation.gif?raw=true)
[![PyPI version](https://img.shields.io/pypi/v/blue-geo.svg)](https://pypi.org/project/blue-geo/)

![image](https://github.com/kamangir/assets/blob/main/vanwatch/2024-01-06-20-39-46-73614-QGIS.gif?raw=true?raw=1)
📜 [metadata](./metadata.yaml)

---

[![PyPI version](https://img.shields.io/pypi/v/blue-geo.svg)](https://pypi.org/project/blue-geo/)

To use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `<plugin-name>` with the name of the plugin and follow [these instructions](https://github.com/kamangir/notebooks-and-scripts/blob/main/SageMaker.md).
33 changes: 33 additions & 0 deletions blue_geo/.abcli/QGIS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 🌐 QGIS

🌐 an AI terraform for [QGIS](https://www.qgis.org/).

```bash
pip install blue-geo
```

```bash
> QGIS help
QGIS seed [screen]
. seed 🌱 QGIS.
QGIS expressions pull
. pull QGIS expressions.
QGIS expressions push [push]
. push QGIS expressions.
📂 /Users/kamangir/Library/Application Support/QGIS/QGIS3/profiles/default/python/expressions
📂 /Users/kamangir/git/blue-geo/blue_geo/QGIS/expressions
QGIS serve[r] [start]
. start QGIS server.
```

to terraform QGIS, generate the seed 🌱,

```bash
QGIS seed
```

and paste it in the Python Console in QGIS.

![image](https://github.com/kamangir/assets/blob/main/blue-geo/QGIS-python-console.png?raw=true)

![image](https://github.com/kamangir/assets/blob/main/blue-geo/QGIS.png?raw=true)
40 changes: 40 additions & 0 deletions blue_geo/.abcli/ukraine-timemap/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ukraine-timemap 🇺🇦

`ukraine-timemap` ingests the [Bellingcat](https://www.bellingcat.com/) [Civilian Harm in Ukraine TimeMap](https://github.com/bellingcat/ukraine-timemap) dataset, available through [this UI](https://ukraine.bellingcat.com/) and [this API](https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json), and generates a `geojson`, a QGIS project, and more.

```bash
pip install blue-geo
```

```bash
> ukraine_timemap help
ukraine_timemap browse \
[dataset|github]
. browse ukraine-timemap.
ukraine_timemap ingest \
[dryrun,~upload] \
[-|<object-name>] \
[--verbose 1]
. ingest the latest dataset from https://github.com/bellingcat/ukraine-timemap.
```

example use,

```
@select ukraine-timemap-$(@@timestamp)
ukraine_timemap ingest - . --verbose 1
@open . QGIS
@publish tar .
```

![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/ingest_log.png?raw=true)

latest ingested object: [ukraine-timemap.tar.gz](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap.tar.gz), sandbox: [ukraine-timemap/sandbox.ipynb](./notebooks/ukraine-timemap/sandbox.ipynb).

last build [🔗](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap/ukraine_timemap.png)

![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/ukraine_timemap/ukraine_timemap.png)

![image](https://github.com/kamangir/assets/blob/main/nbs/ukraine-timemap/QGIS.png?raw=true)

more: https://arash-kamangir.medium.com/%EF%B8%8F-openai-experiments-93-bf0cee062693
4 changes: 2 additions & 2 deletions blue_geo/.abcli/ukraine-timemap/ingest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function ukraine_timemap_ingest() {
local open_options=$3
local do_open=$(abcli_option_int "$open_options" open 0)
[[ "$do_open" == 1 ]] &&
abcli_open $object_name \
QGIS,$open_options
abcli_open QGIS,$open_options \
$object_name

return 0
}
2 changes: 1 addition & 1 deletion blue_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization."

VERSION = "4.36.1"
VERSION = "4.38.1"

REPO_NAME = "blue-geo"

Expand Down
11 changes: 8 additions & 3 deletions sources.yaml → metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
list:
applications:
ukraine_timemap:
url: https://github.com/kamangir/blue-geo?ukraine-timemap-
url: https://github.com/kamangir/blue-geo/tree/main/blue_geo/.abcli/ukraine-timemap
callable: ukraine_timemap
QGIS-application: ukraine_timemap
association: bellingcat
vancouver_watching:
url: https://github.com/kamangir/Vancouver-Watching
callable: vancouver_watching
QGIS-application: vancouver_watching
vis_tj_kg_map_2022:
url: https://github.com/bellingcat/vis-tj-kg-map-2022
callable: not_available
callable:
comments: before/after non-geo-tagged high-res images of conflict zones.
association: bellingcat
datacube-sources:
firms:
url: https://firms.modaps.eosdis.nasa.gov/map/
associations:
bellingcat:
urls:
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
NAME: [
"config.env",
".abcli/**/*.sh",
"**/README.md",
],
},
)


0 comments on commit 55907eb

Please sign in to comment.