generated from kamangir/blue-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from kamangir/ukraine_timemap-2024-08-04-46875
ukraine-timemap datacubes
- Loading branch information
Showing
38 changed files
with
512 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
#! /usr/bin/env bash | ||
|
||
function ukraine() { | ||
ukraine_timemap "$@" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
|
||
alias @catalog=blue_geo_catalog | ||
alias @datacube=blue_geo_datacube | ||
|
||
alias @geo=blue_geo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
#! /usr/bin/env bash | ||
|
||
function blue_geo_catalog_ingest_firms() { | ||
local ingest_options=$1 | ||
|
||
local options=$2 | ||
|
||
if [ $(abcli_option_int "$options" help 0) == 1 ]; then | ||
ingest_options=$blue_geo_datacube_ingest_options | ||
options="dryrun" | ||
abcli_show_usage "@datacube ingest firms$ABCUL[$ingest_options]$ABCUL[.|<object-name>]$ABCUL[$options]$ABCUL[<args>]" \ | ||
"firms -ingest-> <object-name>." | ||
return | ||
fi | ||
|
||
local do_dryrun=$(abcli_option_int "$options" dryrun 0) | ||
|
||
local object_name=$(abcli_clarify_object $2 .) | ||
|
||
abcli_eval dryrun=$do_dryrun \ | ||
python3 -m blue_geo.catalog.firms \ | ||
ingest \ | ||
--object_name $object_name \ | ||
"${@:3}" | ||
blue_geo_catalog_ingest_generic \ | ||
,$1 \ | ||
"$2" \ | ||
$3,catalog=firms \ | ||
"${@:4}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /usr/bin/env bash | ||
|
||
function blue_geo_catalog_ingest_generic() { | ||
local ingest_options=$1 | ||
|
||
local options=$3 | ||
local catalog=$(abcli_option "$options" catalog generic) | ||
|
||
if [ $(abcli_option_int "$options" help 0) == 1 ]; then | ||
ingest_options=$blue_geo_datacube_ingest_options | ||
options="dryrun" | ||
abcli_show_usage "@datacube ingest $catalog$ABCUL[$ingest_options]$ABCUL[.|<object-name>]$ABCUL[$options]$ABCUL[<args>]" \ | ||
"$catalog -ingest-> <object-name>." | ||
return | ||
fi | ||
|
||
local do_dryrun=$(abcli_option_int "$options" dryrun 0) | ||
|
||
local object_name=$(abcli_clarify_object $2 .) | ||
|
||
abcli_eval dryrun=$do_dryrun \ | ||
python3 -m blue_geo.catalog.$catalog \ | ||
ingest \ | ||
--object_name $object_name \ | ||
"${@:4}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 🇺🇦 ukraine-timemap | ||
|
||
the `ukraine-timemap` catalog covers 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). | ||
|
||
## query | ||
|
||
``` | ||
> @catalog query ukraine_timemap help | ||
@catalog query ukraine_timemap \ | ||
[download,ingest,select,upload] \ | ||
[-|<object-name>] \ | ||
[dryrun] | ||
. ukraine_timemap -query-> <object-name>. | ||
``` | ||
|
||
## example use | ||
|
||
```bash | ||
@catalog query ukraine_timemap \ | ||
ingest,select - | ||
|
||
@open QGIS . | ||
@publish tar . | ||
``` | ||
|
||
 | ||
|
||
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) | ||
|
||
 | ||
|
||
 | ||
|
||
more: https://arash-kamangir.medium.com/%EF%B8%8F-openai-experiments-93-bf0cee062693 |
4 changes: 2 additions & 2 deletions
4
blue_geo/.abcli/ukraine-timemap/browse.sh → .../.abcli/catalog/ukraine_timemap/browse.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /usr/bin/env bash | ||
|
||
function blue_geo_catalog_ingest_ukraine_timemap() { | ||
blue_geo_catalog_ingest_generic \ | ||
,$1 \ | ||
"$2" \ | ||
$3,catalog=ukraine_timemap \ | ||
"${@:4}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#! /usr/bin/env bash | ||
|
||
function blue_geo_catalog_query_ukraine_timemap() { | ||
local options=$1 | ||
|
||
blue_geo_catalog_query_generic \ | ||
$options,catalog=ukraine_timemap \ | ||
"${@:2}" | ||
} | ||
|
||
function blue_geo_catalog_query_ukraine_timemap_ukraine_timemap() { | ||
local options=$1 | ||
|
||
local catalog="ukraine_timemap" | ||
|
||
if [ $(abcli_option_int "$options" help 0) == 1 ]; then | ||
options="dryrun" | ||
abcli_show_usage "@catalog query $catalog$ABCUL[$blue_geo_catalog_query_options]$ABCUL[-|<object-name>]$ABCUL[$options]" \ | ||
"$catalog -query-> <object-name>." | ||
return | ||
fi | ||
|
||
local do_dryrun=$(abcli_option_int "$options" dryrun 0) | ||
|
||
local object_name=$(abcli_clarify_object $2 -) | ||
|
||
abcli_log "🌐 query: $catalog -> $object_name" | ||
|
||
abcli_eval dryrun=$do_dryrun \ | ||
python3 -m blue_geo.catalog.$catalog \ | ||
query \ | ||
--object_name $object_name \ | ||
"${@:3}" | ||
|
||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.