From 7873d8afd5dac78d328008699ba3defc0c443ef0 Mon Sep 17 00:00:00 2001 From: James McKinney Date: Thu, 16 May 2013 19:05:07 -0400 Subject: [PATCH] Use file size in bytes, which is less error-prone and conforms to DCAT --- examples/catalog-sample-extended.csv | 6 +++--- examples/catalog-sample-extended.html | 6 +++--- examples/catalog-sample-extended.json | 2 +- examples/catalog-sample-extended.xml | 6 +++--- schema.md | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/catalog-sample-extended.csv b/examples/catalog-sample-extended.csv index 8eac3daf..f1ea6457 100644 --- a/examples/catalog-sample-extended.csv +++ b/examples/catalog-sample-extended.csv @@ -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",john.smith@agency.gov,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",jane.smith@agency.gov,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",bill.smith@agency.gov,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",john.smith@agency.gov,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",jane.smith@agency.gov,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",bill.smith@agency.gov,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 diff --git a/examples/catalog-sample-extended.html b/examples/catalog-sample-extended.html index 5d9b604c..d87e57dc 100644 --- a/examples/catalog-sample-extended.html +++ b/examples/catalog-sample-extended.html @@ -120,7 +120,7 @@

Office Locations

  • Size: - 44KB + 44000
  • @@ -261,7 +261,7 @@

    Database Export

  • Size: - 5MB + 5000000
  • @@ -402,7 +402,7 @@

    System Data API

  • Size: - 300MB + 300000000
  • diff --git a/examples/catalog-sample-extended.json b/examples/catalog-sample-extended.json index 0013386c..b06a973a 100644 --- a/examples/catalog-sample-extended.json +++ b/examples/catalog-sample-extended.json @@ -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", diff --git a/examples/catalog-sample-extended.xml b/examples/catalog-sample-extended.xml index bd79874d..b8c4290d 100644 --- a/examples/catalog-sample-extended.xml +++ b/examples/catalog-sample-extended.xml @@ -47,7 +47,7 @@ - 44KB + 44000 @@ -104,7 +104,7 @@ - 5MB + 5000000 http://www.agency.gov/data/information/database @@ -161,7 +161,7 @@ - 300MB + 300000000 diff --git a/schema.md b/schema.md index f54ece14..d0c36c50 100644 --- a/schema.md +++ b/schema.md @@ -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 @@ -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** | - @@ -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**