Skip to content

Commit

Permalink
Add Population Date and Population Source fields (#261)
Browse files Browse the repository at this point in the history
* Added Population Date and Population Source fields

* drop icon

Co-authored-by: Martin Raifer <martin@raifer.tech>
  • Loading branch information
1ec5 and tyrasd authored Oct 14, 2022
1 parent 130e5dd commit 1b29e3b
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 9 deletions.
5 changes: 4 additions & 1 deletion data/fields/population.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"key": "population",
"type": "number",
"minValue": 0,
"label": "Population"
"label": "Population",
"terms": [
"census"
]
}
12 changes: 12 additions & 0 deletions data/fields/population/date.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "population:date",
"type": "text",
"label": "Population Date",
"placeholder": "YYYY-MM-DD",
"prerequisiteTag": {
"key": "population"
},
"terms": [
"census date"
]
}
14 changes: 14 additions & 0 deletions data/fields/source/population.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"key": "source:population",
"type": "combo",
"label": "Population Source",
"prerequisiteTag": {
"key": "population"
},
"snake_case": false,
"caseSensitive": true,
"terms": [
"census",
"population reference"
]
}
4 changes: 3 additions & 1 deletion data/presets/amenity/refugee_site.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"informal",
"start_date",
"capacity",
"population"
"population",
"population/date",
"source/population"
],
"moreFields": [
"internet_access",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/city.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-city",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/hamlet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-triangle-stroked",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/neighbourhood.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-triangle-stroked",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"moreFields": [
"gnis/feature_id-US"
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/quarter.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-triangle-stroked",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/suburb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-triangle-stroked",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/town.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-town",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
4 changes: 3 additions & 1 deletion data/presets/place/village.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"icon": "maki-village",
"fields": [
"name",
"population"
"population",
"population/date",
"source/population"
],
"geometry": [
"point",
Expand Down
8 changes: 8 additions & 0 deletions interim/source_strings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2509,6 +2509,11 @@ en:
population:
# population=*
label: Population
population/date:
# 'population:date=*'
label: Population Date
# population/date field placeholder
placeholder: YYYY-MM-DD
portable:
# portable=*
label: Portable
Expand Down Expand Up @@ -3094,6 +3099,9 @@ en:
survey: Survey
# 'terms: reference'
terms: '[translate with synonyms or related terms for ''Sources'', separated by commas]'
source/population:
# 'source:population=*'
label: Population Source
species:
# species=*
label: Species
Expand Down

0 comments on commit 1b29e3b

Please sign in to comment.