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

Use file size in bytes, which is less error-prone and conforms to DCAT #55

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/catalog-sample-extended.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title,description,keyword,modified,publisher,person,mbox,identifier,accessLevel,dataDictionary,accessURL,webService,format,license,spatial,temporal,issued,accrualPeriodicity,language,granularity,dataQuality,theme,references,size,landingPage,feed,systemOfRecords
Office Locations,A list of the agency's office locations and contact information.,keyword1,1/1/2013,Agency,"John, Smith",[email protected],1,Public,http://www.agency.gov/data/information/locations,http://www.agency.gov/data/raw/locations.zip,http://www.agency.gov/data/raw/locations.json,csv,public domain,United States,today,7/9/2012,6 months,English,Address,TRUE,Energy,http://www.agency.gov/data/information/locations/document.doc,44KB,http://www.agency.gov/offices,,
Database Export,A full export of the agency's database.,keyword2,2/1/2013,Agency,"Jane, Smith",[email protected],2,Public,http://www.agency.gov/data/information/database,http://www.agency.gov/data/raw/database.csv,,xml,public domain,United States,2001-current,3/1/2012,yearly,English,Station,TRUE,Education,"http://www.agency.gov/bureau1/document3.doc, http://www.agency.gov/bureau1/document5.txt",5MB,http://www.agency.gov/data/information/database,http://www.agency.gov/data/raw/database.rss,http://www.agency.gov/systemsofrecord/system2
System Data API,A restful web service for a system's data set from 2012.,"keyword1, keyword2",12/15/2012,Agency,"Bill, Smith",[email protected],3,Public,http://www.agency.gov/data/information/system_api,http://www.agency.gov/data/raw/system_2012.csv,http://www.agency.gov/data/raw/data_api.json,"csv, json",creative commons Cco,United States,2012,2/15/2013,weekly,English,Individual,TRUE,"Health, Education",http://www.agency.gov/bureau1/document3.pdf,300MB,http://www.agency.gov/developer/system,http://api.agency.gov/system.rss,http://www.agency.gov/systemsofrecord/system1
Office Locations,A list of the agency's office locations and contact information.,keyword1,1/1/2013,Agency,"John, Smith",[email protected],1,Public,http://www.agency.gov/data/information/locations,http://www.agency.gov/data/raw/locations.zip,http://www.agency.gov/data/raw/locations.json,csv,public domain,United States,today,7/9/2012,6 months,English,Address,TRUE,Energy,http://www.agency.gov/data/information/locations/document.doc,44000,http://www.agency.gov/offices,,
Database Export,A full export of the agency's database.,keyword2,2/1/2013,Agency,"Jane, Smith",[email protected],2,Public,http://www.agency.gov/data/information/database,http://www.agency.gov/data/raw/database.csv,,xml,public domain,United States,2001-current,3/1/2012,yearly,English,Station,TRUE,Education,"http://www.agency.gov/bureau1/document3.doc, http://www.agency.gov/bureau1/document5.txt",5000000,http://www.agency.gov/data/information/database,http://www.agency.gov/data/raw/database.rss,http://www.agency.gov/systemsofrecord/system2
System Data API,A restful web service for a system's data set from 2012.,"keyword1, keyword2",12/15/2012,Agency,"Bill, Smith",[email protected],3,Public,http://www.agency.gov/data/information/system_api,http://www.agency.gov/data/raw/system_2012.csv,http://www.agency.gov/data/raw/data_api.json,"csv, json",creative commons Cco,United States,2012,2/15/2013,weekly,English,Individual,TRUE,"Health, Education",http://www.agency.gov/bureau1/document3.pdf,30000000,http://www.agency.gov/developer/system,http://api.agency.gov/system.rss,http://www.agency.gov/systemsofrecord/system1
6 changes: 3 additions & 3 deletions examples/catalog-sample-extended.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3>Office Locations</h3>

<li>
<strong>Size:</strong>
<span rel="dcat:size">44KB</span>
<span rel="dcat:size">44000</span>
</li>

<li>
Expand Down Expand Up @@ -261,7 +261,7 @@ <h3>Database Export</h3>

<li>
<strong>Size:</strong>
<span rel="dcat:size">5MB</span>
<span rel="dcat:size">5000000</span>
</li>

<li>
Expand Down Expand Up @@ -402,7 +402,7 @@ <h3>System Data API</h3>

<li>
<strong>Size:</strong>
<span rel="dcat:size">300MB</span>
<span rel="dcat:size">300000000</span>
</li>

<li>
Expand Down
2 changes: 1 addition & 1 deletion examples/catalog-sample-extended.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
"accessURL": "https://explore.data.gov/views/ykv5-fn9t/rows.csv?accessType=DOWNLOAD",
"format": "csv",
"size": "200mb"
"size": "200000000"
},
{
"accessURL": "https://explore.data.gov/views/ykv5-fn9t/rows.json?accessType=DOWNLOAD",
Expand Down
6 changes: 3 additions & 3 deletions examples/catalog-sample-extended.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<attribute rel="dcat:distribution"></attribute>

<attribute rel="dcat:size">44KB</attribute>
<attribute rel="dcat:size">44000</attribute>

<attribute rel="foaf:homepage"></attribute>

Expand Down Expand Up @@ -104,7 +104,7 @@

<attribute rel="dcat:distribution"></attribute>

<attribute rel="dcat:size">5MB</attribute>
<attribute rel="dcat:size">5000000</attribute>

<attribute rel="foaf:homepage">http://www.agency.gov/data/information/database</attribute>

Expand Down Expand Up @@ -161,7 +161,7 @@

<attribute rel="dcat:distribution"></attribute>

<attribute rel="dcat:size">300MB</attribute>
<attribute rel="dcat:size">300000000</attribute>

<attribute rel="foaf:homepage"></attribute>

Expand Down
8 changes: 4 additions & 4 deletions schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Granularity | Level of granularity of the dataset.
Data Quality | Whether the dataset meets the agency's Information Quality Guidelines (true/false). | dataQuality
Category | Main thematic category of the dataset. | theme
Related Documents | Related documents such as technical information about a dataset, developer documentation, etc. | references
Size | The size of the downloadable dataset. | size
Size | The size in bytes of the downloadable dataset. | size
Homepage URL | 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. | landingPage
RSS Feed | URL for an RSS feed that provides access to the dataset. | feed
System of Records | URL to the System of Records related to this dataset. | systemOfRecords
Expand Down Expand Up @@ -308,7 +308,7 @@ Field | title
**Accepted Values** | See Usage Notes
**Usage Notes** | Distribution is a concatenation, as appropriate, of the following elements: download url, format, endpoint, language, size. An example of this this model is:

"distribution": [`{"accessURL": "http://data.mcc.gov/example_resource/data.json", "format":"JSON", "size":"22mb"}`,`{"accessURL":"http://data.mcc.gov/example_/data.xml", "format":"XML", "size":"24mb"}`]
"distribution": [`{"accessURL": "http://data.mcc.gov/example_resource/data.json", "format":"JSON", "size":"22000000"}`,`{"accessURL":"http://data.mcc.gov/example_/data.xml", "format":"XML", "size":"24000000"}`]

**Example** | -

Expand All @@ -318,8 +318,8 @@ Field | title
**Cardinality** | (0,n)
**Required** | No
**Accepted Values** | See Usage Notes
**Usage Notes** | Sizes should be formatted as (e.g.), 52kb, 140mb, 2gb.
**Example** | `{"size":"3mb"}`
**Usage Notes** | The file size in bytes should be an integer.
**Example** | `{"size":3000000}`

{.table .table-striped}
**Field** | **landingPage**
Expand Down