Skip to content

Commit

Permalink
Merge pull request #126 from whosonfirst/stepps00/src-inception
Browse files Browse the repository at this point in the history
Added source inception dates
  • Loading branch information
Stephen Epps committed Jun 28, 2018
2 parents ec16973 + 2b7723a commit d4421d8
Show file tree
Hide file tree
Showing 153 changed files with 1,007 additions and 707 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ While a source .json file in the `whosonfirst-sources` repository does not requi

* `"edtf:deprecated":` Indicates the date when a source was determined to be invalid, was never a "going concern" (_string, optional property_). _Format: YYYY-MM-DD (though these dates can be encoded with any valid EDTF syntax)_.

* `"edtf:inception":` Indicates the date when a source was added to Who's On First. (_string, required property_). _Format: YYYY-MM-DD (though these dates can be encoded with any valid EDTF syntax)_.

## See also

* https://github.com/whosonfirst
Expand Down
10 changes: 7 additions & 3 deletions bin/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
docs = io.open(readme, "w")
docs.write("# sources\n\n")

docs.write("_This file was generated by the `bin/docs.py` script on %s_\n\n" % ymd)
docs.write("_This file was generated by the `bin/docs.py` script on %s._\n\n" % ymd)

source_count = 0
for file in os.listdir(sources):
Expand All @@ -63,10 +63,14 @@
if details.get('mz_associated'):
docs.write("_This is a Mapzen associated source._ \n\n")

#call out add date
if details.get('edtf:inception'):
docs.write("* %s: `%s`\n" % ('added', details['edtf:inception']))

#call out deprecated sources and their deprecated date
if details.get('edtf:deprecated'):
if not details['edtf:deprecated'] == 'uuuu':
docs.write("* %s %s.\n" % ('This source was deprecated on', details['edtf:deprecated']))
docs.write("* %s: `%s`\n" % ('deprecated', details['edtf:deprecated']))

for k in ('id', 'name', 'prefix'):

Expand Down Expand Up @@ -97,7 +101,7 @@
#list out all "via" sources with links to each source's source...
if details.get('src:via'):

docs.write("\n This source includes `CC-BY compatible` data from the following organizations:\n")
docs.write("\n This source includes `CC-BY compatible` data from the following organizations:\n")

for via in details['src:via']:

Expand Down
2 changes: 1 addition & 1 deletion data/sources-spec-20180627.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/sources-spec-20180628.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/sources-spec-latest.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions source_template.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"id": -1,
"description": "",
"edtf:deprecated": "YYY-MM-DD",
"edtf:inception": "YYY-MM-DD",
"fullname": "",
"name": "",
"prefix": "",
"id": -1,
"key": "",
"url": "",
"license": "",
"license_type": "",
"license_text": "",
"license_type": "",
"mz:associated": -1,
"mz:is_current": -1,
"name": "",
"prefix": "",
"src:via": [{
"context": "Canada",
"source_link": "http://statcan.gc.ca/",
"source_name": "Statistics Canada",
"source_note": "Canadian open data portal."
}],
"mz:associated":-1,
"mz:is_current": -1,
"edtf:deprecated": "YYY-MM-DD",
"url": "",
"usage_concordance": -1,
"usage_property": -1,
"usage_geometry": -1,
"description": ""
}
"usage_property": -1
}
Loading

0 comments on commit d4421d8

Please sign in to comment.