Add new statistics view

This commit is contained in:
Pieter Vander Vennet 2022-08-22 13:34:47 +02:00
parent 6f6a5d7092
commit 716fda39aa
10 changed files with 342 additions and 171 deletions

View file

@ -31,9 +31,6 @@
"geoJsonZoomLevel": 8,
"maxCacheAge": 0
},
"calculatedTags": [
"_last_edit:contributor:lc:=feat.properties['_last_edit:contributor'].toLowerCase()"
],
"title": {
"render": {
"en": "Changeset for {theme}"
@ -51,34 +48,61 @@
},
{
"id": "contributor",
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}{user}</a>"
},
"question": {
"en": "What contributor made this change?"
"en": "What contributor did make this change?"
},
"freeform": {
"key": "user"
},
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
}
},
{
"id": "theme",
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
},
"question":{
"en": "What theme was this change made with?"
"question": {
"en": "What theme was used to make this change?"
},
"freeform": {
"key": "theme"
},
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
}
},
{
"id": "locale",
"freeform": {
"key": "locale"
},
"question": {
"en": "What locale (language) was this change made in?"
},
"render": {
"en": "User locale is {locale}"
}
},
{
"id": "host",
"render": {
"en": "Change with with <a href='{host}'>{host}</a>"
},
"question": {
"en": "What host (website) was this change made with?"
},
"freeform": {
"key": "host"
},
"mappings": [
{
"hideInAnswer": true,
"if": "theme~http.*",
"then": {
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
}
"if": "host~https://mapcomplete.osm.be/.*",
"then": "MapComplete",
"hideInAnswer": true
},
{
"if": "host~https://pietervdvn.github.io/mc/develop/.*",
"then": "Develop",
"hideInAnswer": true
}
]
}
@ -394,12 +418,7 @@
"id": "created_by",
"options": [
{
"osmTags": {
"or":[
"_last_edit:contributor:lc~i~.*{search}.*",
"user~i~.*{search}.*"
]
},
"osmTags": "user~i~.*{search}.*",
"fields": [
{
"name": "search"
@ -415,7 +434,7 @@
"id": "not_created_by",
"options": [
{
"osmTags": "_last_edit:contributor:lc!~i~.*{search}.*",
"osmTags": "user!~i~.*{search}.*",
"fields": [
{
"name": "search"
@ -426,6 +445,38 @@
}
}
]
},
{
"id": "locale-filter",
"options": [
{
"osmTags": "locale~i~.*{search}.*",
"fields": [
{
"name": "search"
}
],
"question": {
"en": "User language (iso-code) {search}"
}
}
]
},
{
"id": "host_name",
"options": [
{
"osmTags": "host~i~.*{search}.*",
"fields": [
{
"name": "search"
}
],
"question": {
"en": "Made with host {search}"
}
}
]
}
]
},

View file

@ -48,21 +48,60 @@
},
{
"id": "contributor",
"question": {
"en": "What contributor did make this change?"
},
"freeform": {
"key": "user"
},
"render": {
"en": "Change made by <a href='https://openstreetmap.org/user/{_last_edit:contributor}' target='_blank'>{_last_edit:contributor}</a>"
"en": "Change made by <a href='https://openstreetmap.org/user/{user}' target='_blank'>{user}</a>"
}
},
{
"id": "theme",
"question": {
"en": "What theme was used to make this change?"
},
"freeform": {
"key": "theme"
},
"render": {
"en": "Change with theme <a href='https://mapcomplete.osm.be/{theme}'>{theme}</a>"
}
},
{
"id": "locale",
"freeform": {
"key": "locale"
},
"question": {
"en": "What locale (language) was this change made in?"
},
"render": {
"en": "User locale is {locale}"
}
},
{
"id": "host",
"render": {
"en": "Change with with <a href='{host}'>{host}</a>"
},
"question": {
"en": "What host (website) was this change made with?"
},
"freeform": {
"key": "host"
},
"mappings": [
{
"if": "theme~http.*",
"then": {
"en": "Change with <b>unofficial</b> theme <a href='https://mapcomplete.osm.be/theme.html?userlayout={theme}'>{theme}</a>"
},
"if": "host=www.waldbrand-app.de",
"then": "waldbrand-app.de",
"hideInAnswer": true
},
{
"if": "host~https://pietervdvn.github.io/mc/develop/.*",
"then": "Develop",
"hideInAnswer": true
}
]
@ -128,6 +167,38 @@
}
}
]
},
{
"id": "locale-filter",
"options": [
{
"osmTags": "locale~i~.*{search}.*",
"fields": [
{
"name": "search"
}
],
"question": {
"en": "User language (iso-code) {search}"
}
}
]
},
{
"id": "host_name",
"options": [
{
"osmTags": "host~i~.*{search}.*",
"fields": [
{
"name": "search"
}
],
"question": {
"en": "Made with host {search}"
}
}
]
}
]
},