You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
THIS DOCUMENT IS OUTDATED: Please use the `--help` flag of the CLI.
3
+
The Mapswipe Backend provides a Command Line Interface(CLI) with which the users can interact with the program.
4
+
They can be used for example to create projects, which were uploaded to the [manager-dashboard](for_mapswipe_managers.html),
5
+
or to export statistics on the finished projects. To get a comprehensible lists of the available commands use the ```--help``` flag.
4
6
5
-
---
6
-
7
-
This document describes how to use the command line interface of MapSwipe Worker.
7
+
```mapswipe_workers --help``` would get you all possible commands, while e.g. ```mapswipe_workers archive --help``` would get you additional information on how to use that command.
8
8
9
9
In our current deployment setup the commands of the MapSwipe Workers CLI are hard-coded in the Docker-Compose File.
10
10
@@ -13,148 +13,3 @@ You can run these commands also using docker-compose:
13
13
```
14
14
docker-compose run mapswipe_workers mapswipe_workers --help
Copy file name to clipboardExpand all lines: docs/source/configuration.md
+27-8Lines changed: 27 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,24 @@ In following chapters configuration values and keys are discussed for each part
13
13
All configuration values for MapSwipe Workers are stored in environment variables.
14
14
15
15
Required environment variables are:
16
+
### Firebase
16
17
- FIREBASE_API_KEY
17
18
- FIREBASE_DB
19
+
- FIREBASE_TOKEN
20
+
- GOOGLE_APPLICATION_CREDENTIALS
21
+
22
+
### Postgres DB
18
23
- POSTGRES_DB
19
24
- POSTGRES_HOST
20
25
- POSTGRES_PASSWORD
21
26
- POSTGRES_PORT
22
27
- POSTGRES_USER
23
28
24
-
Optional environment variables are:
29
+
### OSMCha
30
+
31
+
- OSMCHA_API_KEY
32
+
33
+
### Optional environment variables:
25
34
- SLACK_CHANNEL
26
35
- SLACK_TOKEN
27
36
- SENTRY_DSN
@@ -34,19 +43,16 @@ For satellite imagery access to at least one provider is needed. Define the API
34
43
- IMAGE_ESRI_API_KEY
35
44
- IMAGE_ESRI_BETA_API_KEY
36
45
37
-
In addition to get access to Firebase a Service Account Key is required.
38
-
The path the Service Account Key is defined in:
39
-
- GOOGLE_APPLICATION_CREDENTIALS
40
-
41
46
> Notes: When deploying using `docker` or `docker-compose``POSTGRES_HOST` should have the value `postgres` and the Service Account Key (`serviceAccountKey.json`) should be copied to `mapswipe_workers/serviceAccountKey.json` so that during the build of the image the file can by copied by Docker.
42
47
43
-
44
48
### Elaboration
45
49
46
50
**Firebase**: MapSwipe Workers use the Firebase Python SDK and the Firebase REST API. Both require the database name (`FIREBASE_DB`) and the API-Key from the Firebase instance. The Firebase Python SDK does also need a Service Account Key. The path to this file is set in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
47
51
48
52
**Postgres**: MapSwipe Workers writes data to a Postgres database and generate files for the API based data in Postgres.
49
53
54
+
**OSMCha**: MapSwipe Workers enriches some Projects with data from OSM changelogs which are requested from OSMCha. Create an account, you will find you api key in your profile e.g. `Token 589adf125234a`
55
+
50
56
**Sentry (optional)**: MapSwipe workers use sentry to capture exceptions. You can find your project’s DSN in the “Client Keys” section of your “Project Settings” in Sentry. Check [Sentry's documentation](https://docs.sentry.io/error-reporting/configuration/?platform=python) for more information.
51
57
52
58
**Slack (optional)**: The MapSwipe workers send messages to slack when a project has been created successfully, the project creation failed or an exception gets raised. refer to [Python slackclient's documentation](https://github.com/slackapi/python-slackclient) how to get a Slack Token.
@@ -80,13 +86,26 @@ The Service Account Key (`serviceAccountKey.json`) should be saved to `postgres/
80
86
81
87
## Manager Dashboard
82
88
89
+
Please refer to the official [documentation](https://firebase.google.com/docs/web/learn-more#config-object) if you set up your own firebase.
90
+
Otherwise you can request guidance on the settings from the mapswipe team. The structure of your app.js should look like below.
Copy file name to clipboardExpand all lines: docs/source/data.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Attributes:
31
31
32
32
33
33
## Aggregated Results
34
-
This gives you the unfiltered MapSwipe results. This is most suited if you want to apply some custom data processing with the MapSwipe data, e.g. select only specific tasks for machine learning. If you want to use MapSwipe data in the Tasking Manager you might look for the data explained below.
34
+
This gives you the unfiltered MapSwipe results. This is most suited if you want to apply some custom data processing with the MapSwipe data, e.g. select only specific tasks for machine learning. If you want to use MapSwipe data in the Tasking Manager you might look for the data described below.
35
35
36
36
Files:
37
37
-`aggregated_results_{project_id}.csv`, e.g. [agg\_results\_-M56eeMCZ5VeOHjJN4Bx.csv](https://apps.mapswipe.org/api/agg_results/agg_results_-M56eeMCZ5VeOHjJN4Bx.csv)
@@ -51,11 +51,13 @@ Files:
51
51
| 2_share | float | 2_count divived by total_count. This gives you the share of all users who marked as 2. |
52
52
| 3_share | float | 3_count divived by total_count. This gives you the share of all users who marked as 3. |
53
53
| agreement | float | This is defined as [Scott's Pi](https://en.wikipedia.org/wiki/Scott%27s_Pi) and gives you an understanding of inter-rater reliability. The value is 1.0 if all users agree, e.g. all users classify as "building". If users disagree this value will be lower. |
54
-
| geom | string | The geometry of this task as WKT geometry. |
54
+
| geom | string | The geometry of this task as WKT geometry. |
55
55
56
+
Additionally, project type specific data can be found here. E.g. footprint projects which were created based on OSM data, will have data describing the original OSM object included.
56
57
57
-
## HOT Tasking Manager Geometries
58
-
This gives you filtered MapSwipe data ready to be imported to the HOT Tasking Manager. Currently, the geometries in this dataset consist of maximum 15 MapSwipe Tasks, where at least 35% of all users indicated the presence of a building by classifying as "yes" or "maybe".
58
+
59
+
## HOT Tasking Manager Geometries
60
+
This gives you filtered MapSwipe data ready to be imported to the HOT Tasking Manager. Currently, the geometries in this dataset consist of maximum 15 MapSwipe Tasks, where at least 35% of all users indicated the presence of a building by classifying as "yes" or "maybe".
59
61
60
62
Files:
61
63
-`hot_tm_{project_id}.geojson`, e.g. [hot\_tm\_-M56eeMCZ5VeOHjJN4Bx.geojson](https://apps.mapswipe.org/api/hot_tm/hot_tm_-M56eeMCZ5VeOHjJN4Bx.geojson)
| groups_completed | integer | Number of groups completed |
80
+
| total_contributions | integer | Number of tasks completed |
81
+
| agreeing_contributions | integer | Tasks with the same result as the final result (e.g. Tile has buildings). |
82
+
| disagreeing_contributions | integer | Tasks with other result as the final result. |
83
+
| simple_agreement_score | float | Share of tasks which had the same result as the final result. E.g. 0.8 would mean that the user labeled 80% of the tiles the same way as the majority of voters. |
0 commit comments