Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Commit 970ef7c

Browse files
author
dwcaraway
committed
Added JSON schema representations for 1.0 Final schema format and updated metadata-resources.md to link to the files
1 parent 7318df0 commit 970ef7c

3 files changed

Lines changed: 228 additions & 0 deletions

File tree

metadata-resources.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ filename: "metadata-resources.md"
88

99
This section provides further background and resources to assist agencies in implementing the [common core metadata schema](/schema/).
1010

11+
In addition to template and sample files we also produce Common Core Metadata schema in JSON schema format. [JSON schema](http://json-schema.org/) describes a JSON data format. It can be used to automatically validate Data.json files and to generate forms for creating JSON.
12+
13+
### JSON Schema Files ###
14+
15+
* 1.0 Final Schema: [Single Entry](/schema/1_0_final/single_entry.json) and [Catalog](/schema/1_0_final/catalog.json)
16+
17+
1118
### Template Data Files
1219

1320
<table width="60%">

schema/1_0_final/catalog.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "http://project-open-data.github.io/schema/1_0_final/catalog.json#",
4+
"title": "Data.json object",
5+
"description": "Validates an entire collection of common core metadata JSON objects. Agencies produce said collections in the form of Data.json files.",
6+
"type": "array",
7+
"items":{
8+
"$ref":"single_entry.json",
9+
"minItems": 1,
10+
"uniqueItems": true
11+
}
12+
}

schema/1_0_final/single_entry.json

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "http://project-open-data.github.io/schema/1_0_final/single_entry.json#",
4+
"title": "Common Core Metadata Schema",
5+
"description": "The metadata format for all federal open data. Validates a single JSON object entry (as opposed to entire Data.json catalog).",
6+
"type": "object",
7+
"required": ["title", "description", "keyword", "modified", "publisher", "contactPoint", "mbox", "identifier", "accessLevel"],
8+
"properties": {
9+
"accessLevel": {
10+
"description":"The degree to which this dataset could be made publicly-available, regardless of whether it has been made available. Choices: public (Data asset is or could be made publicly available to all without restrictions), restricted public (Data asset is available under certain use restrictions), or non-public (Data asset is not available to members of the public)",
11+
"title": "Public Access Level",
12+
"enum": ["public", "restricted public", "non-public"]
13+
},
14+
"accessLevelComment": {
15+
"title":"Access Level Comment",
16+
"description":"An explanation for the selected \"accessLevel\" including instructions for how to access a restricted file, if applicable, or explanation for why a \"non-public\" or \"restricted public\" data assetis not \"public,\" if applicable. Text, 255 characters.",
17+
"type": "string",
18+
"maxLength":255
19+
},
20+
"accrualPeriodicity": {
21+
"title":"Frequency",
22+
"description":"Frequency with which dataset is published.",
23+
"enum": ["Annual", "Bimonthly", "Semiweekly", "Daily", "Biweekly", "Semiannual", "Biennial", "Triennial",
24+
"Three times a week", "Three times a month", "Continuously updated", "Monthly", "Quarterly", "Semimonthly",
25+
"Three times a year", "Weekly", "Completely irregular"]
26+
},
27+
"bureauCode": {
28+
"title":"Bureau Code",
29+
"description":"Federal agencies, combined agency and bureau code from <a href=\"http://www.whitehouse.gov/sites/default/files/omb/assets/a11_current_year/app_c.pdf\">OMB Circular A-11, Appendix C</a> in the format of <code>015:010</code>.",
30+
"type": "array",
31+
"items": {
32+
"type": "string",
33+
"pattern": "[0-9]{3}:[0-9]{2}"
34+
},
35+
"minItems": 1,
36+
"uniqueItems": true
37+
},
38+
"contactPoint": {
39+
"title":"Contact Name",
40+
"description":"Contact person’s name for the asset.",
41+
"type": "string"
42+
},
43+
"dataDictionary": {
44+
"title":"Data Dictionary",
45+
"description":"URL to the data dictionary for the dataset or API. Note that documentation other than a data dictionary can be referenced using Related Documents as shown in the expanded fields.",
46+
"type": "string",
47+
"format": "uri"
48+
},
49+
"dataQuality": {
50+
"title":"Data Quality",
51+
"description":"Whether the dataset meets the agency’s Information Quality Guidelines (true/false).",
52+
"type": "boolean"
53+
},
54+
"description": {
55+
"title" : "Description",
56+
"description": "Human-readable description (e.g., an abstract) with sufficient detail to enable a user to quickly understand whether the asset is of interest.",
57+
"type": "string"
58+
},
59+
"distribution": {
60+
"title":"Distribution",
61+
"description":"Holds multiple download URLs for datasets composed of multiple files and/or file types",
62+
"type": "array",
63+
"items": {
64+
"type": "object",
65+
"properties": {
66+
"accessURL": {
67+
"title":"Download URL",
68+
"description":"URL providing direct access to the downloadable distribution of a dataset.",
69+
"type": "string",
70+
"format": "uri"
71+
},
72+
"format": {
73+
"title":"Format",
74+
"description":"The file format or API type of the distribution.",
75+
"pattern": "^[-\\w]+/[-\\w]+([+][-\\w]+)?$",
76+
"type": "string"
77+
}
78+
}
79+
},
80+
"minItems": 1,
81+
"uniqueItems": true
82+
},
83+
"identifier": {
84+
"title":"Unique Identifier",
85+
"description":"A unique identifier for the dataset or API as maintained within an Agency catalog or database.",
86+
"type": "string",
87+
"pattern": "[\\w]+"
88+
},
89+
"issued": {
90+
"title":"Release Date",
91+
"description":"Date of formal issuance.",
92+
"type": "string",
93+
"format": "date-time"
94+
},
95+
"keyword": {
96+
"title": "Tags",
97+
"description": "Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.",
98+
"type": "array",
99+
"items": {
100+
"type": "string"
101+
},
102+
"minItems": 1,
103+
"uniqueItems": true
104+
},
105+
"landingPage": {
106+
"title":"Homepage URL",
107+
"description":"Alternative landing page used to redirect user to a contextual, Agency-hosted “homepage” for the Dataset or API when selecting this resource from the Data.gov user interface.",
108+
"type": "string",
109+
"format": "uri"
110+
},
111+
"language": {
112+
"title":"Language",
113+
"description":"The language of the dataset.",
114+
"type": "array",
115+
"items": {
116+
"type": "string",
117+
"pattern": "^[a-zA-Z0-9-]+/[a-zA-Z0-9-]+([+][a-zA-Z0-9-]+)$"
118+
}
119+
},
120+
"license": {
121+
"title":"License",
122+
"description":"The license dataset or API is published with. See <a href=\"http://project-open-data.github.io/open-licenses/\">Open Licenses</a> for more information.",
123+
"type": "string"
124+
},
125+
"mbox": {
126+
"title":"Contact Email",
127+
"description":"Contact person’s email address.",
128+
"type": "string",
129+
"format": "email"
130+
},
131+
"modified": {
132+
"title": "Last Update",
133+
"description": "Most recent date on which the dataset was changed, updated or modified.",
134+
"type": "string",
135+
"format": "date-time"
136+
},
137+
"PrimaryITInvestmentUII": {
138+
"title":"Primary IT Investment UII",
139+
"description":"For linking a dataset with an IT Unique Investment Identifier (UII)",
140+
"type": "string"
141+
},
142+
"programCode": {
143+
"title":"Program Code",
144+
"description":"Federal agencies, list the primary program related to this data asset, from the <a href=\"http://goals.performance.gov/sites/default/files/images/FederalProgramInventory_FY13_MachineReadable_091613.xls\">Federal Program Inventory</a>. Use the format of <code>015:001</code>",
145+
"type": "array",
146+
"items": {
147+
"type": "string",
148+
"pattern": "[0-9]{3}:[0-9]{3}"
149+
},
150+
"minItems": 1,
151+
"uniqueItems": true
152+
},
153+
"publisher": {
154+
"title":"Publisher",
155+
"description": "The publishing entity.",
156+
"type": "string"
157+
},
158+
"references": {
159+
"title":"Related Documents",
160+
"description":"Related documents such as technical information about a dataset, developer documentation, etc.",
161+
"type": "array",
162+
"items": {
163+
"type": "string",
164+
"format": "uri"
165+
},
166+
"minItems": 1,
167+
"uniqueItems": true
168+
},
169+
"spatial": {
170+
"title":"Spatial",
171+
"description":"The range of spatial applicability of a dataset. Could include a spatial region like a bounding box or a named place.",
172+
"type": "string"
173+
},
174+
"systemOfRecords": {
175+
"title":"System of Records",
176+
"description":"If the systems is designated as a system of records under the Privacy Act of 1974, provide the URL to the System of Records Notice related to this dataset.",
177+
"type": "string"
178+
},
179+
"temporal": {
180+
"title":"Temporal",
181+
"description":"The range of temporal applicability of a dataset (i.e., a start and end date of applicability for the data).",
182+
"type": "array",
183+
"items": {
184+
"type": "string"
185+
}
186+
},
187+
"theme": {
188+
"title":"Category",
189+
"description":"Main thematic category of the dataset.",
190+
"type": "array",
191+
"items": {
192+
"type": "string"
193+
},
194+
"minItems": 1,
195+
"uniqueItems": true
196+
},
197+
"title": {
198+
"title": "Title",
199+
"description": "Human-readable name of the asset. Should be in plain English and include sufficient detail to facilitate search and discovery.",
200+
"type": "string"
201+
},
202+
"webService": {
203+
"title":"Endpoint",
204+
"description":"Endpoint of web service to access dataset.",
205+
"type": "string",
206+
"format": "uri"
207+
}
208+
}
209+
}

0 commit comments

Comments
 (0)