diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..80d5299 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +#production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b8b7806 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Datopian + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/api/data.json b/api/data.json new file mode 100644 index 0000000..61bb6d2 --- /dev/null +++ b/api/data.json @@ -0,0 +1 @@ +{"@context":"https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld","@id":"http://demo.getdkan.com/data.json","@type":"dcat:Catalog","conformsTo":"https://project-open-data.cio.gov/v1.1/schema","describedBy":"https://project-open-data.cio.gov/v1.1/schema/catalog.json","dataset":[{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

This data created by the National Democratic Institute (NDI) in partnership with Development Seed, a Washington, D.C.-based online communications consultancy, is designed to make data from the August 20, 2009, Afghanistan presidential election accessible and transparent. We have provided this csv file as there is no download for the whole dataset. There are many more files on the website.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/district_centerpoints_0.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"c9e2d352-e24c-4051-9158-f48127aa5692","issued":"2012-10-30","keyword":[{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}},{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/afghanistan-election-districts","license":"http://opendefinition.org/licenses/odc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((60.8642578125 29.878755346038, 61.787109375 30.977609093349, 61.7431640625 31.391157522825, 60.7763671875 31.653381399664, 60.8642578125 32.361403315275, 60.556640625 33.137551192346, 60.908203125 33.578014746144, 60.5126953125 33.614619292334, 60.5126953125 34.307143856288, 60.8642578125 34.343436068483, 61.3037109375 35.603718740697, 62.666015625 35.353216101238, 64.5556640625 36.421282443649, 64.86328125 37.195330582801, 65.654296875 37.195330582801, 65.654296875 37.474858084971, 67.9833984375 37.055177106661, 68.7744140625 37.265309955619, 69.345703125 37.125286284967, 69.697265625 37.683820326694, 70.3125 37.683820326694, 70.3125 38.065392351332, 71.0595703125 38.582526159353, 71.279296875 37.78808138412, 71.7626953125 37.926867601481, 71.4990234375 37.405073750177, 71.630859375 36.738884124394, 73.3447265625 37.474858084971, 73.7841796875 37.474858084971, 73.7841796875 37.265309955619, 74.7509765625 37.335224359306, 74.9267578125 37.160316546737, 74.1357421875 36.809284702059, 72.9931640625 36.949891786813, 71.54296875 36.315125147481, 71.2353515625 36.066862132579, 71.5869140625 35.460669951495, 71.54296875 34.813803317113, 71.103515625 34.560859367084, 71.1474609375 34.08906131585, 70.3125 33.979808728725, 69.873046875 33.979808728725, 70.2685546875 33.321348526699, 69.345703125 32.916485347314, 69.2578125 32.324275588877, 69.1259765625 31.802892586707, 68.7744140625 31.578535426473, 68.0712890625 31.802892586707, 67.67578125 31.615965936476, 67.8515625 31.353636941501, 67.4560546875 31.278550858947, 67.0166015625 31.278550858947, 66.4892578125 30.939924331023, 66.2255859375 30.334953881989, 66.357421875 29.91685223307, 65.0390625 29.535229562948, 64.248046875 29.611670115197, 64.2041015625 29.420460341013, 63.4130859375 29.458731185355, 62.6220703125 29.420460341013))","title":"Afghanistan Election Districts","interra":{"id":"afghanistan-election-dist","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Data is split into two categories:

\n

Violent Crime: Includes aggravated assault, murder, rape and robbery.
Property Crime: Includes arson, burglary, larceny-theft and motor vehicle theft.

\n

Top 10 Most Populous U.S. Cities:

\n
    \n
  1. New York, NY
  2. \n
  3. Los Angeles, CA
  4. \n
  5. Chicago, IL
  6. \n
  7. Houston, TX
  8. \n
  9. Philadelphia, PA
  10. \n
  11. Las Vegas, NV
  12. \n
  13. Phoenix, AZ
  14. \n
  15. San Antonio, TX
  16. \n
  17. San Diego, TX
  18. \n
  19. Dallas, TX
  20. \n
\n

Related Data Dashboard: Crime in America's Top 10 Most Populous Cities

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/PropertyCrimesByCity_3.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/PropertyCrimeRates_1.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"d460252e-d42c-474a-9ea9-5287b1d595f6","issued":"2016-04-20","keyword":[{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}},{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}}],"landingPage":"http://demo.getdkan.com/dataset/crime-data-ten-most-populous-cities-us","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"demo.getdkan.com","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-129.7265625 24.046463999667, -129.7265625 51.835777520452, -65.390625 51.835777520452, -65.390625 24.046463999667))","temporal":"2014-01-01T05:00:00+00:00/2014-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}}],"title":"Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"crime-data-for-the-ten-mo","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"admin","hasEmail":"mailto:noemailprovided@usa.gov"},"description":"

Data on bike lanes in Florida.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"cedcd327-4e5d-43f9-8eb1-c11850fa7c55","issued":"2016-06-22","landingPage":"http://demo.getdkan.com/dataset/florida-bike-lanes","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"demo.getdkan.com","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"theme":[{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}},{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}}],"title":"Florida Bike Lanes ","keyword":[{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}}],"interra":{"id":"florida-bike-lanes","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Monthly gold prices (USD) in London from Bundesbank.

\n

General: 1 ounce of fine gold = 31.1034768g.

\n

Method of calculation:

\n\n

License: PDDL (Source indicates no restrictions on data).

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/data_0.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"5dc1cfcf-8028-476c-a020-f58ec6dd621c","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}},{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}}],"landingPage":"http://demo.getdkan.com/dataset/gold-prices-london-1950-2008-monthly","license":"http://opendefinition.org/licenses/odc-pddl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"demo.getdkan.com","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-0.56854248046875 51.253320526331, -0.56854248046875 51.725326868065, 0.3076171875 51.725326868065, 0.3076171875 51.253320526331))","temporal":"1950-01-01T05:00:00+00:00/1950-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"Gold Prices in London 1950-2008 (Monthly)","interra":{"id":"gold-prices-in-london-195","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Deprivation is measured across seven different areas or domains - income, employment, health, education, living environment, crime and barriers to services using a wide range of indicators, and the methods used show how each area compares with other areas across England using a combination of all these indicators.

\n

As stated by The Guardian, \"the data is based on a close analysis of the UK government's Indices of Multiple Deprivation - which measures relative poverty across England – by Alasdair Rae at the University of Sheffield.\" (Source)

\n

Source: http://data.london.gov.uk/dataset/indices-of-deprivation-2015

\n

Related Data Story: London Income Analysis

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"fb3525f2-d32a-451e-8869-906ed41f7695","issued":"2016-04-21","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}},{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}}],"landingPage":"http://demo.getdkan.com/dataset/london-deprivation-index","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council, Committee on International Affairs","interra":{"id":"state-economic-council-co","source":"dkandemo"},"identifier":"3590d6cd-dd24-4347-9d98-c8d5583e566d","created":"2017-11-17","modified":"2017-11-17"},"references":["http://www.lfpress.com/2016/05/13/expert-panel-says-londons-living-wage-is-1553h-londoners-need-30284-to-meet-basic-needs"],"spatial":"POLYGON ((-1.1178588867187 51.08282186161, -1.1178588867187 51.859531509855, 1.1178588867187 51.859531509855, 1.1178588867187 51.08282186161))","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"London Deprivation Index","interra":{"id":"london-deprivation-index","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Stefanie Gray","hasEmail":"mailto:stefanie@example.com"},"description":"

Information about the state workforce, broken down into four generational cohorts.

\n

Note: This dataset has been given a vague name because it is anonymized demo data, not actual state data.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"95f8eac4-fd1f-4b35-8472-5c87e9425dfa","issued":"2016-04-11","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}},{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}}],"landingPage":"http://demo.getdkan.com/dataset/state-workforce-generation-2011-2015","license":"http://opendefinition.org/licenses/gfdl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"temporal":"2011-01-01T05:00:00+00:00/2011-01-01T05:00:00+00:00","title":"State Workforce by Generation (2011-2015)","interra":{"id":"state-workforce-by-genera","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

County data: http://www.npr.org/templates/story/story.php?storyId=111494514

\n

State data: http://statehealthfacts.org/comparetable.jsp?ind=649&cat=1

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/us_foreclosures_jan_2012_by_state_0.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"74c06c81-9fe0-439c-aba9-cd5c980a6df4","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/us-national-foreclosure-statistics-january-2012","license":"http://opendefinition.org/licenses/cc-zero/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"demo.getdkan.com","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-126.9140625 24.046463999667, -126.9140625 50.625073063414, -65.56640625 50.625073063414, -65.56640625 24.046463999667))","temporal":"2012-01-01T05:00:00+00:00/2012-01-01T05:00:00+00:00","title":"US National Foreclosure Statistics January 2012","interra":{"id":"us-national-foreclosure-s","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Statistics on U.S. smoking rates and tobacco taxation rates for all fifty states.

\n

Source: Centers for Disease Control and Prevention, 2015
http://www.cdc.gov/tobacco/data_statistics/state_data/

\n

Related Data Story: State-Level Policies Reduce Smoking Rates Nationwide

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/TobaccoTaxes2016_2_1.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"1f2042ad-c513-4fcf-a933-cae6c6fd35e6","issued":"2016-04-10","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/us-tobacco-usage-statistics","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-127.705078125 24.206889622398, -127.705078125 50.625073063414, -63.193359375 50.625073063414, -63.193359375 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"U.S. Tobacco Usage Statistics","interra":{"id":"us-tobacco-usage-statisti","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Centers for Disease Control and Prevention data regarding varicella (chickenpox) virus incidence and mortality rates.

\n

Source: https://data.cdc.gov/NNDSS/NNDSS-Table-II-Varicella-to-West-Nile-virus-d...

\n

Related Data Story: An End to Chickenpox: The Varicella Vaccine's Success Story

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/varicellaincidencerates_0.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"e1f2ebcd-ee23-454f-87b5-df0306658418","issued":"2016-04-06","keyword":[{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/varicella-chickenpox-incidence-and-mortality-and-after-vaccine","license":"http://opendefinition.org/licenses/cc-by-sa/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-128.056640625 24.206889622398, -128.056640625 50.176898122001, -64.775390625 50.176898122001, -64.775390625 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"Varicella (Chickenpox) Incidence and Mortality, Before and After the Vaccine","interra":{"id":"varicella-chickenpox-inci","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Couch, Aaron","hasEmail":"mailto:datademo@example.com"},"description":"

Polling places in the state of Wisconsin.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://demo.getdkan.com/sites/default/files/Polling_Places_Madison_0.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"934400f2-a5dc-4abf-bf16-3f17335888d3","issued":"2013-02-11","keyword":[{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}}],"landingPage":"http://demo.getdkan.com/dataset/wisconsin-polling-places","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-90.415429 46.568478, -90.229213 46.508231, -90.119674 46.338446, -89.09001 46.135799, -88.662808 45.987922, -88.531362 46.020784, -88.10416 45.922199, -87.989145 45.796229, -87.781021 45.675736, -87.791975 45.500474, -87.885083 45.363551, -87.649574 45.341643, -87.742682 45.199243, -87.589328 45.095181, -87.627666 44.974688, -87.819359 44.95278, -87.983668 44.722749, -88.043914 44.563917, -87.928898 44.536533, -87.775544 44.640595, -87.611236 44.837764, -87.403112 44.914442, -87.238804 45.166381, -87.03068 45.22115, -87.047111 45.089704, -87.189511 44.969211, -87.468835 44.552964, -87.545512 44.322932, -87.540035 44.158624, -87.644097 44.103854, -87.737205 43.8793, -87.704344 43.687607, -87.791975 43.561637, -87.912467 43.249452, -87.885083 43.002989, -87.76459 42.783912, -87.802929 42.493634, -88.788778 42.493634, -90.639984 42.510065, -90.711184 42.636034, -91.067185 42.75105, -91.143862 42.909881, -91.176724 43.134436, -91.056231 43.254929, -91.204109 43.353514, -91.215062 43.501391, -91.269832 43.616407, -91.242447 43.775238, -91.43414 43.994316, -91.592971 44.032654, -91.877772 44.202439, -91.927065 44.333886, -92.233773 44.443425, -92.337835 44.552964, -92.545959 44.569394, -92.808852 44.750133, -92.737652 45.117088, -92.75956 45.286874, -92.644544 45.440228, -92.770513 45.566198, -92.885529 45.577151, -92.869098 45.719552, -92.639067 45.933153, -92.354266 46.015307, -92.29402 46.075553, -92.29402 46.667063, -92.091373 46.749217, -92.014696 46.705401, -91.790141 46.694447, -91.09457 46.864232, -90.837154 46.95734, -90.749522 46.88614, -90.886446 46.754694, -90.55783 46.584908))","title":"Wisconsin Polling Places","interra":{"id":"wisconsin-polling-places","source":"dkandemo"}}]} \ No newline at end of file diff --git a/api/dataset.json b/api/dataset.json new file mode 100644 index 0000000..a2dd3d5 --- /dev/null +++ b/api/dataset.json @@ -0,0 +1 @@ +[{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

This data created by the National Democratic Institute (NDI) in partnership with Development Seed, a Washington, D.C.-based online communications consultancy, is designed to make data from the August 20, 2009, Afghanistan presidential election accessible and transparent. We have provided this csv file as there is no download for the whole dataset. There are many more files on the website.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/district_centerpoints.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"schema":{"fields":[{"name":"state","type":"string"},{"name":"total.foreclosures","type":"integer"},{"name":"foreclosure.ratio","type":"integer"}]},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"c9e2d352-e24c-4051-9158-f48127aa5692","issued":"2012-10-30","keyword":[{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}},{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/afghanistan-election-districts","license":"http://opendefinition.org/licenses/odc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((60.8642578125 29.878755346038, 61.787109375 30.977609093349, 61.7431640625 31.391157522825, 60.7763671875 31.653381399664, 60.8642578125 32.361403315275, 60.556640625 33.137551192346, 60.908203125 33.578014746144, 60.5126953125 33.614619292334, 60.5126953125 34.307143856288, 60.8642578125 34.343436068483, 61.3037109375 35.603718740697, 62.666015625 35.353216101238, 64.5556640625 36.421282443649, 64.86328125 37.195330582801, 65.654296875 37.195330582801, 65.654296875 37.474858084971, 67.9833984375 37.055177106661, 68.7744140625 37.265309955619, 69.345703125 37.125286284967, 69.697265625 37.683820326694, 70.3125 37.683820326694, 70.3125 38.065392351332, 71.0595703125 38.582526159353, 71.279296875 37.78808138412, 71.7626953125 37.926867601481, 71.4990234375 37.405073750177, 71.630859375 36.738884124394, 73.3447265625 37.474858084971, 73.7841796875 37.474858084971, 73.7841796875 37.265309955619, 74.7509765625 37.335224359306, 74.9267578125 37.160316546737, 74.1357421875 36.809284702059, 72.9931640625 36.949891786813, 71.54296875 36.315125147481, 71.2353515625 36.066862132579, 71.5869140625 35.460669951495, 71.54296875 34.813803317113, 71.103515625 34.560859367084, 71.1474609375 34.08906131585, 70.3125 33.979808728725, 69.873046875 33.979808728725, 70.2685546875 33.321348526699, 69.345703125 32.916485347314, 69.2578125 32.324275588877, 69.1259765625 31.802892586707, 68.7744140625 31.578535426473, 68.0712890625 31.802892586707, 67.67578125 31.615965936476, 67.8515625 31.353636941501, 67.4560546875 31.278550858947, 67.0166015625 31.278550858947, 66.4892578125 30.939924331023, 66.2255859375 30.334953881989, 66.357421875 29.91685223307, 65.0390625 29.535229562948, 64.248046875 29.611670115197, 64.2041015625 29.420460341013, 63.4130859375 29.458731185355, 62.6220703125 29.420460341013))","title":"Afghanistan Election Districts","interra":{"id":"afghanistan-election-dist","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Data is split into two categories:

\n

Violent Crime: Includes aggravated assault, murder, rape and robbery.
Property Crime: Includes arson, burglary, larceny-theft and motor vehicle theft.

\n

Top 10 Most Populous U.S. Cities:

\n
    \n
  1. New York, NY
  2. \n
  3. Los Angeles, CA
  4. \n
  5. Chicago, IL
  6. \n
  7. Houston, TX
  8. \n
  9. Philadelphia, PA
  10. \n
  11. Las Vegas, NV
  12. \n
  13. Phoenix, AZ
  14. \n
  15. San Antonio, TX
  16. \n
  17. San Diego, TX
  18. \n
  19. Dallas, TX
  20. \n
\n

Related Data Dashboard: Crime in America's Top 10 Most Populous Cities

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimesByCity.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"d460252e-d42c-474a-9ea9-5287b1d595f6","issued":"2016-04-20","keyword":[{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}},{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}}],"landingPage":"http://demo.getdkan.com/dataset/crime-data-ten-most-populous-cities-us","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-129.7265625 24.046463999667, -129.7265625 51.835777520452, -65.390625 51.835777520452, -65.390625 24.046463999667))","temporal":"2014-01-01T05:00:00+00:00/2014-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}}],"title":"Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"crime-data-for-the-ten-mo","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"admin","hasEmail":"mailto:noemailprovided@usa.gov"},"description":"

Data on bike lanes in Florida.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"cedcd327-4e5d-43f9-8eb1-c11850fa7c55","issued":"2016-06-22","landingPage":"http://demo.getdkan.com/dataset/florida-bike-lanes","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"theme":[{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}},{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}}],"title":"Florida Bike Lanes ","keyword":[{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}}],"interra":{"id":"florida-bike-lanes","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Monthly gold prices (USD) in London from Bundesbank.

\n

General: 1 ounce of fine gold = 31.1034768g.

\n

Method of calculation:

\n\n

License: PDDL (Source indicates no restrictions on data).

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/data.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"5dc1cfcf-8028-476c-a020-f58ec6dd621c","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}},{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}}],"landingPage":"http://demo.getdkan.com/dataset/gold-prices-london-1950-2008-monthly","license":"http://opendefinition.org/licenses/odc-pddl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-0.56854248046875 51.253320526331, -0.56854248046875 51.725326868065, 0.3076171875 51.725326868065, 0.3076171875 51.253320526331))","temporal":"1950-01-01T05:00:00+00:00/1950-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"Gold Prices in London 1950-2008 (Monthly)","interra":{"id":"gold-prices-in-london-195","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Deprivation is measured across seven different areas or domains - income, employment, health, education, living environment, crime and barriers to services using a wide range of indicators, and the methods used show how each area compares with other areas across England using a combination of all these indicators.

\n

As stated by The Guardian, \"the data is based on a close analysis of the UK government's Indices of Multiple Deprivation - which measures relative poverty across England – by Alasdair Rae at the University of Sheffield.\" (Source)

\n

Source: http://data.london.gov.uk/dataset/indices-of-deprivation-2015

\n

Related Data Story: London Income Analysis

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"fb3525f2-d32a-451e-8869-906ed41f7695","issued":"2016-04-21","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}},{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}}],"landingPage":"http://demo.getdkan.com/dataset/london-deprivation-index","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"references":["http://www.lfpress.com/2016/05/13/expert-panel-says-londons-living-wage-is-1553h-londoners-need-30284-to-meet-basic-needs"],"spatial":"POLYGON ((-1.1178588867187 51.08282186161, -1.1178588867187 51.859531509855, 1.1178588867187 51.859531509855, 1.1178588867187 51.08282186161))","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"London Deprivation Index","interra":{"id":"london-deprivation-index","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Stefanie Gray","hasEmail":"mailto:stefanie@example.com"},"description":"

Information about the state workforce, broken down into four generational cohorts.

\n

Note: This dataset has been given a vague name because it is anonymized demo data, not actual state data.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"95f8eac4-fd1f-4b35-8472-5c87e9425dfa","issued":"2016-04-11","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}},{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}}],"landingPage":"http://demo.getdkan.com/dataset/state-workforce-generation-2011-2015","license":"http://opendefinition.org/licenses/gfdl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"temporal":"2011-01-01T05:00:00+00:00/2011-01-01T05:00:00+00:00","title":"State Workforce by Generation (2011-2015)","interra":{"id":"state-workforce-by-genera","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

County data: http://www.npr.org/templates/story/story.php?storyId=111494514

\n

State data: http://statehealthfacts.org/comparetable.jsp?ind=649&cat=1

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/us_foreclosures_jan_2012_by_state.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","schema":{"fields":[{"name":"lon","type":"number"},{"name":"lat","type":"number"},{"name":"Unit_Type","type":"string"},{"name":"Dist_Name","type":"string"},{"name":"Prov_Name","type":"string"},{"name":"Dari_Dist","type":"string"},{"name":"Dari_Prov","type":"string"},{"name":"Dist_ID","type":"integer"},{"name":"Prov_ID","type":"integer"}]},"created":"2017-11-17","modified":"2017-11-17"}],"identifier":"74c06c81-9fe0-439c-aba9-cd5c980a6df4","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/us-national-foreclosure-statistics-january-2012","license":"http://opendefinition.org/licenses/cc-zero/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-126.9140625 24.046463999667, -126.9140625 50.625073063414, -65.56640625 50.625073063414, -65.56640625 24.046463999667))","temporal":"2012-01-01T05:00:00+00:00/2012-01-01T05:00:00+00:00","title":"US National Foreclosure Statistics January 2012","interra":{"id":"us-national-foreclosure-s","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Statistics on U.S. smoking rates and tobacco taxation rates for all fifty states.

\n

Source: Centers for Disease Control and Prevention, 2015
http://www.cdc.gov/tobacco/data_statistics/state_data/

\n

Related Data Story: State-Level Policies Reduce Smoking Rates Nationwide

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/TobaccoTaxes2016.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"1f2042ad-c513-4fcf-a933-cae6c6fd35e6","issued":"2016-04-10","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/us-tobacco-usage-statistics","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-127.705078125 24.206889622398, -127.705078125 50.625073063414, -63.193359375 50.625073063414, -63.193359375 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"U.S. Tobacco Usage Statistics","interra":{"id":"us-tobacco-usage-statisti","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Centers for Disease Control and Prevention data regarding varicella (chickenpox) virus incidence and mortality rates.

\n

Source: https://data.cdc.gov/NNDSS/NNDSS-Table-II-Varicella-to-West-Nile-virus-d...

\n

Related Data Story: An End to Chickenpox: The Varicella Vaccine's Success Story

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicellaincidencerates.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"e1f2ebcd-ee23-454f-87b5-df0306658418","issued":"2016-04-06","keyword":[{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/varicella-chickenpox-incidence-and-mortality-and-after-vaccine","license":"http://opendefinition.org/licenses/cc-by-sa/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-128.056640625 24.206889622398, -128.056640625 50.176898122001, -64.775390625 50.176898122001, -64.775390625 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"Varicella (Chickenpox) Incidence and Mortality, Before and After the Vaccine","interra":{"id":"varicella-chickenpox-inci","source":"dkandemo"}},{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Couch, Aaron","hasEmail":"mailto:datademo@example.com"},"description":"

Polling places in the state of Wisconsin.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Polling_Places_Madison.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"934400f2-a5dc-4abf-bf16-3f17335888d3","issued":"2013-02-11","keyword":[{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}}],"landingPage":"http://demo.getdkan.com/dataset/wisconsin-polling-places","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-90.415429 46.568478, -90.229213 46.508231, -90.119674 46.338446, -89.09001 46.135799, -88.662808 45.987922, -88.531362 46.020784, -88.10416 45.922199, -87.989145 45.796229, -87.781021 45.675736, -87.791975 45.500474, -87.885083 45.363551, -87.649574 45.341643, -87.742682 45.199243, -87.589328 45.095181, -87.627666 44.974688, -87.819359 44.95278, -87.983668 44.722749, -88.043914 44.563917, -87.928898 44.536533, -87.775544 44.640595, -87.611236 44.837764, -87.403112 44.914442, -87.238804 45.166381, -87.03068 45.22115, -87.047111 45.089704, -87.189511 44.969211, -87.468835 44.552964, -87.545512 44.322932, -87.540035 44.158624, -87.644097 44.103854, -87.737205 43.8793, -87.704344 43.687607, -87.791975 43.561637, -87.912467 43.249452, -87.885083 43.002989, -87.76459 42.783912, -87.802929 42.493634, -88.788778 42.493634, -90.639984 42.510065, -90.711184 42.636034, -91.067185 42.75105, -91.143862 42.909881, -91.176724 43.134436, -91.056231 43.254929, -91.204109 43.353514, -91.215062 43.501391, -91.269832 43.616407, -91.242447 43.775238, -91.43414 43.994316, -91.592971 44.032654, -91.877772 44.202439, -91.927065 44.333886, -92.233773 44.443425, -92.337835 44.552964, -92.545959 44.569394, -92.808852 44.750133, -92.737652 45.117088, -92.75956 45.286874, -92.644544 45.440228, -92.770513 45.566198, -92.885529 45.577151, -92.869098 45.719552, -92.639067 45.933153, -92.354266 46.015307, -92.29402 46.075553, -92.29402 46.667063, -92.091373 46.749217, -92.014696 46.705401, -91.790141 46.694447, -91.09457 46.864232, -90.837154 46.95734, -90.749522 46.88614, -90.886446 46.754694, -90.55783 46.584908))","title":"Wisconsin Polling Places","interra":{"id":"wisconsin-polling-places","source":"dkandemo"}}] \ No newline at end of file diff --git a/api/dataset/afghanistan-election-dist.json b/api/dataset/afghanistan-election-dist.json new file mode 100644 index 0000000..b544e02 --- /dev/null +++ b/api/dataset/afghanistan-election-dist.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

This data created by the National Democratic Institute (NDI) in partnership with Development Seed, a Washington, D.C.-based online communications consultancy, is designed to make data from the August 20, 2009, Afghanistan presidential election accessible and transparent. We have provided this csv file as there is no download for the whole dataset. There are many more files on the website.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/district_centerpoints.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"schema":{"fields":[{"name":"state","type":"string"},{"name":"total.foreclosures","type":"integer"},{"name":"foreclosure.ratio","type":"integer"}]},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"c9e2d352-e24c-4051-9158-f48127aa5692","issued":"2012-10-30","keyword":[{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}},{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/afghanistan-election-districts","license":"http://opendefinition.org/licenses/odc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((60.8642578125 29.878755346038, 61.787109375 30.977609093349, 61.7431640625 31.391157522825, 60.7763671875 31.653381399664, 60.8642578125 32.361403315275, 60.556640625 33.137551192346, 60.908203125 33.578014746144, 60.5126953125 33.614619292334, 60.5126953125 34.307143856288, 60.8642578125 34.343436068483, 61.3037109375 35.603718740697, 62.666015625 35.353216101238, 64.5556640625 36.421282443649, 64.86328125 37.195330582801, 65.654296875 37.195330582801, 65.654296875 37.474858084971, 67.9833984375 37.055177106661, 68.7744140625 37.265309955619, 69.345703125 37.125286284967, 69.697265625 37.683820326694, 70.3125 37.683820326694, 70.3125 38.065392351332, 71.0595703125 38.582526159353, 71.279296875 37.78808138412, 71.7626953125 37.926867601481, 71.4990234375 37.405073750177, 71.630859375 36.738884124394, 73.3447265625 37.474858084971, 73.7841796875 37.474858084971, 73.7841796875 37.265309955619, 74.7509765625 37.335224359306, 74.9267578125 37.160316546737, 74.1357421875 36.809284702059, 72.9931640625 36.949891786813, 71.54296875 36.315125147481, 71.2353515625 36.066862132579, 71.5869140625 35.460669951495, 71.54296875 34.813803317113, 71.103515625 34.560859367084, 71.1474609375 34.08906131585, 70.3125 33.979808728725, 69.873046875 33.979808728725, 70.2685546875 33.321348526699, 69.345703125 32.916485347314, 69.2578125 32.324275588877, 69.1259765625 31.802892586707, 68.7744140625 31.578535426473, 68.0712890625 31.802892586707, 67.67578125 31.615965936476, 67.8515625 31.353636941501, 67.4560546875 31.278550858947, 67.0166015625 31.278550858947, 66.4892578125 30.939924331023, 66.2255859375 30.334953881989, 66.357421875 29.91685223307, 65.0390625 29.535229562948, 64.248046875 29.611670115197, 64.2041015625 29.420460341013, 63.4130859375 29.458731185355, 62.6220703125 29.420460341013))","title":"Afghanistan Election Districts","interra":{"id":"afghanistan-election-dist","source":"dkandemo"}} diff --git a/api/dataset/crime-data-for-the-ten-mo.json b/api/dataset/crime-data-for-the-ten-mo.json new file mode 100644 index 0000000..0bd65b3 --- /dev/null +++ b/api/dataset/crime-data-for-the-ten-mo.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Data is split into two categories:

\n

Violent Crime: Includes aggravated assault, murder, rape and robbery.
Property Crime: Includes arson, burglary, larceny-theft and motor vehicle theft.

\n

Top 10 Most Populous U.S. Cities:

\n
    \n
  1. New York, NY
  2. \n
  3. Los Angeles, CA
  4. \n
  5. Chicago, IL
  6. \n
  7. Houston, TX
  8. \n
  9. Philadelphia, PA
  10. \n
  11. Las Vegas, NV
  12. \n
  13. Phoenix, AZ
  14. \n
  15. San Antonio, TX
  16. \n
  17. San Diego, TX
  18. \n
  19. Dallas, TX
  20. \n
\n

Related Data Dashboard: Crime in America's Top 10 Most Populous Cities

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimesByCity.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"d460252e-d42c-474a-9ea9-5287b1d595f6","issued":"2016-04-20","keyword":[{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}},{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}}],"landingPage":"http://demo.getdkan.com/dataset/crime-data-ten-most-populous-cities-us","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-129.7265625 24.046463999667, -129.7265625 51.835777520452, -65.390625 51.835777520452, -65.390625 24.046463999667))","temporal":"2014-01-01T05:00:00+00:00/2014-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}}],"title":"Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"crime-data-for-the-ten-mo","source":"dkandemo"}} diff --git a/api/dataset/florida-bike-lanes.json b/api/dataset/florida-bike-lanes.json new file mode 100644 index 0000000..dead6fc --- /dev/null +++ b/api/dataset/florida-bike-lanes.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"admin","hasEmail":"mailto:noemailprovided@usa.gov"},"description":"

Data on bike lanes in Florida.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"cedcd327-4e5d-43f9-8eb1-c11850fa7c55","issued":"2016-06-22","landingPage":"http://demo.getdkan.com/dataset/florida-bike-lanes","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"theme":[{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}},{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}}],"title":"Florida Bike Lanes ","keyword":[{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}}],"interra":{"id":"florida-bike-lanes","source":"dkandemo"}} diff --git a/api/dataset/gold-prices-in-london-195.json b/api/dataset/gold-prices-in-london-195.json new file mode 100644 index 0000000..bf6efcb --- /dev/null +++ b/api/dataset/gold-prices-in-london-195.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Monthly gold prices (USD) in London from Bundesbank.

\n

General: 1 ounce of fine gold = 31.1034768g.

\n

Method of calculation:

\n\n

License: PDDL (Source indicates no restrictions on data).

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/data.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"5dc1cfcf-8028-476c-a020-f58ec6dd621c","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}},{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}}],"landingPage":"http://demo.getdkan.com/dataset/gold-prices-london-1950-2008-monthly","license":"http://opendefinition.org/licenses/odc-pddl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-0.56854248046875 51.253320526331, -0.56854248046875 51.725326868065, 0.3076171875 51.725326868065, 0.3076171875 51.253320526331))","temporal":"1950-01-01T05:00:00+00:00/1950-01-01T05:00:00+00:00","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"Gold Prices in London 1950-2008 (Monthly)","interra":{"id":"gold-prices-in-london-195","source":"dkandemo"}} diff --git a/api/dataset/london-deprivation-index.json b/api/dataset/london-deprivation-index.json new file mode 100644 index 0000000..eccbb28 --- /dev/null +++ b/api/dataset/london-deprivation-index.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

Deprivation is measured across seven different areas or domains - income, employment, health, education, living environment, crime and barriers to services using a wide range of indicators, and the methods used show how each area compares with other areas across England using a combination of all these indicators.

\n

As stated by The Guardian, \"the data is based on a close analysis of the UK government's Indices of Multiple Deprivation - which measures relative poverty across England – by Alasdair Rae at the University of Sheffield.\" (Source)

\n

Source: http://data.london.gov.uk/dataset/indices-of-deprivation-2015

\n

Related Data Story: London Income Analysis

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"fb3525f2-d32a-451e-8869-906ed41f7695","issued":"2016-04-21","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}},{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}}],"landingPage":"http://demo.getdkan.com/dataset/london-deprivation-index","license":"http://opendefinition.org/licenses/odc-odbl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"references":["http://www.lfpress.com/2016/05/13/expert-panel-says-londons-living-wage-is-1553h-londoners-need-30284-to-meet-basic-needs"],"spatial":"POLYGON ((-1.1178588867187 51.08282186161, -1.1178588867187 51.859531509855, 1.1178588867187 51.859531509855, 1.1178588867187 51.08282186161))","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"title":"London Deprivation Index","interra":{"id":"london-deprivation-index","source":"dkandemo"}} diff --git a/api/dataset/state-workforce-by-genera.json b/api/dataset/state-workforce-by-genera.json new file mode 100644 index 0000000..d45dda2 --- /dev/null +++ b/api/dataset/state-workforce-by-genera.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Stefanie Gray","hasEmail":"mailto:stefanie@example.com"},"description":"

Information about the state workforce, broken down into four generational cohorts.

\n

Note: This dataset has been given a vague name because it is anonymized demo data, not actual state data.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"95f8eac4-fd1f-4b35-8472-5c87e9425dfa","issued":"2016-04-11","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}},{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}}],"landingPage":"http://demo.getdkan.com/dataset/state-workforce-generation-2011-2015","license":"http://opendefinition.org/licenses/gfdl/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"temporal":"2011-01-01T05:00:00+00:00/2011-01-01T05:00:00+00:00","title":"State Workforce by Generation (2011-2015)","interra":{"id":"state-workforce-by-genera","source":"dkandemo"}} diff --git a/api/dataset/us-national-foreclosure-s.json b/api/dataset/us-national-foreclosure-s.json new file mode 100644 index 0000000..136e8db --- /dev/null +++ b/api/dataset/us-national-foreclosure-s.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"Gray, Stefanie","hasEmail":"mailto:datademo@example.com"},"description":"

County data: http://www.npr.org/templates/story/story.php?storyId=111494514

\n

State data: http://statehealthfacts.org/comparetable.jsp?ind=649&cat=1

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/us_foreclosures_jan_2012_by_state.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","schema":{"fields":[{"name":"lon","type":"number"},{"name":"lat","type":"number"},{"name":"Unit_Type","type":"string"},{"name":"Dist_Name","type":"string"},{"name":"Prov_Name","type":"string"},{"name":"Dari_Dist","type":"string"},{"name":"Dari_Prov","type":"string"},{"name":"Dist_ID","type":"integer"},{"name":"Prov_ID","type":"integer"}]},"created":"2017-11-17","modified":"2017-11-17"}],"identifier":"74c06c81-9fe0-439c-aba9-cd5c980a6df4","issued":"2013-02-10","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"landingPage":"http://demo.getdkan.com/dataset/us-national-foreclosure-statistics-january-2012","license":"http://opendefinition.org/licenses/cc-zero/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-126.9140625 24.046463999667, -126.9140625 50.625073063414, -65.56640625 50.625073063414, -65.56640625 24.046463999667))","temporal":"2012-01-01T05:00:00+00:00/2012-01-01T05:00:00+00:00","title":"US National Foreclosure Statistics January 2012","interra":{"id":"us-national-foreclosure-s","source":"dkandemo"}} diff --git a/api/dataset/us-tobacco-usage-statisti.json b/api/dataset/us-tobacco-usage-statisti.json new file mode 100644 index 0000000..be6324d --- /dev/null +++ b/api/dataset/us-tobacco-usage-statisti.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","accrualPeriodicity":"R/P1Y","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Statistics on U.S. smoking rates and tobacco taxation rates for all fifty states.

\n

Source: Centers for Disease Control and Prevention, 2015
http://www.cdc.gov/tobacco/data_statistics/state_data/

\n

Related Data Story: State-Level Policies Reduce Smoking Rates Nationwide

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/TobaccoTaxes2016.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"1f2042ad-c513-4fcf-a933-cae6c6fd35e6","issued":"2016-04-10","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/us-tobacco-usage-statistics","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-127.705078125 24.206889622398, -127.705078125 50.625073063414, -63.193359375 50.625073063414, -63.193359375 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"U.S. Tobacco Usage Statistics","interra":{"id":"us-tobacco-usage-statisti","source":"dkandemo"}} diff --git a/api/dataset/varicella-chickenpox-inci.json b/api/dataset/varicella-chickenpox-inci.json new file mode 100644 index 0000000..7829b36 --- /dev/null +++ b/api/dataset/varicella-chickenpox-inci.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"CDC INFO","hasEmail":"mailto:cdcinfo@cdc.gov"},"description":"

Centers for Disease Control and Prevention data regarding varicella (chickenpox) virus incidence and mortality rates.

\n

Source: https://data.cdc.gov/NNDSS/NNDSS-Table-II-Varicella-to-West-Nile-virus-d...

\n

Related Data Story: An End to Chickenpox: The Varicella Vaccine's Success Story

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicellaincidencerates.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"e1f2ebcd-ee23-454f-87b5-df0306658418","issued":"2016-04-06","keyword":[{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"landingPage":"http://demo.getdkan.com/dataset/varicella-chickenpox-incidence-and-mortality-and-after-vaccine","license":"http://opendefinition.org/licenses/cc-by-sa/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-128.056640625 24.206889622398, -128.056640625 50.176898122001, -64.775390625 50.176898122001, -64.775390625 24.206889622398))","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"title":"Varicella (Chickenpox) Incidence and Mortality, Before and After the Vaccine","interra":{"id":"varicella-chickenpox-inci","source":"dkandemo"}} diff --git a/api/dataset/wisconsin-polling-places.json b/api/dataset/wisconsin-polling-places.json new file mode 100644 index 0000000..d2faaa0 --- /dev/null +++ b/api/dataset/wisconsin-polling-places.json @@ -0,0 +1 @@ +{"@type":"dcat:Dataset","accessLevel":"public","contactPoint":{"fn":"Couch, Aaron","hasEmail":"mailto:datademo@example.com"},"description":"

Polling places in the state of Wisconsin.

\n","distribution":[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Polling_Places_Madison.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"934400f2-a5dc-4abf-bf16-3f17335888d3","issued":"2013-02-11","keyword":[{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}}],"landingPage":"http://demo.getdkan.com/dataset/wisconsin-polling-places","license":"http://opendefinition.org/licenses/cc-by/","modified":"2017-11-17","publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"spatial":"POLYGON ((-90.415429 46.568478, -90.229213 46.508231, -90.119674 46.338446, -89.09001 46.135799, -88.662808 45.987922, -88.531362 46.020784, -88.10416 45.922199, -87.989145 45.796229, -87.781021 45.675736, -87.791975 45.500474, -87.885083 45.363551, -87.649574 45.341643, -87.742682 45.199243, -87.589328 45.095181, -87.627666 44.974688, -87.819359 44.95278, -87.983668 44.722749, -88.043914 44.563917, -87.928898 44.536533, -87.775544 44.640595, -87.611236 44.837764, -87.403112 44.914442, -87.238804 45.166381, -87.03068 45.22115, -87.047111 45.089704, -87.189511 44.969211, -87.468835 44.552964, -87.545512 44.322932, -87.540035 44.158624, -87.644097 44.103854, -87.737205 43.8793, -87.704344 43.687607, -87.791975 43.561637, -87.912467 43.249452, -87.885083 43.002989, -87.76459 42.783912, -87.802929 42.493634, -88.788778 42.493634, -90.639984 42.510065, -90.711184 42.636034, -91.067185 42.75105, -91.143862 42.909881, -91.176724 43.134436, -91.056231 43.254929, -91.204109 43.353514, -91.215062 43.501391, -91.269832 43.616407, -91.242447 43.775238, -91.43414 43.994316, -91.592971 44.032654, -91.877772 44.202439, -91.927065 44.333886, -92.233773 44.443425, -92.337835 44.552964, -92.545959 44.569394, -92.808852 44.750133, -92.737652 45.117088, -92.75956 45.286874, -92.644544 45.440228, -92.770513 45.566198, -92.885529 45.577151, -92.869098 45.719552, -92.639067 45.933153, -92.354266 46.015307, -92.29402 46.075553, -92.29402 46.667063, -92.091373 46.749217, -92.014696 46.705401, -91.790141 46.694447, -91.09457 46.864232, -90.837154 46.95734, -90.749522 46.88614, -90.886446 46.754694, -90.55783 46.584908))","title":"Wisconsin Polling Places","interra":{"id":"wisconsin-polling-places","source":"dkandemo"}} diff --git a/api/distribution.json b/api/distribution.json new file mode 100644 index 0000000..845b74b --- /dev/null +++ b/api/distribution.json @@ -0,0 +1 @@ +[{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/us_foreclosures_jan_2012_by_state.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","schema":{"fields":[{"name":"lon","type":"number"},{"name":"lat","type":"number"},{"name":"Unit_Type","type":"string"},{"name":"Dist_Name","type":"string"},{"name":"Prov_Name","type":"string"},{"name":"Dari_Dist","type":"string"},{"name":"Dari_Prov","type":"string"},{"name":"Dist_ID","type":"integer"},{"name":"Prov_ID","type":"integer"}]},"created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/district_centerpoints.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"schema":{"fields":[{"name":"state","type":"string"},{"name":"total.foreclosures","type":"integer"},{"name":"foreclosure.ratio","type":"integer"}]},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Polling_Places_Madison.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimesByCity.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/data.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/TobaccoTaxes2016.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicellaincidencerates.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"}] \ No newline at end of file diff --git a/api/distribution/1-2012-foreclosures-by-st.json b/api/distribution/1-2012-foreclosures-by-st.json new file mode 100644 index 0000000..2d81e6f --- /dev/null +++ b/api/distribution/1-2012-foreclosures-by-st.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/us_foreclosures_jan_2012_by_state.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","schema":{"fields":[{"name":"lon","type":"number"},{"name":"lat","type":"number"},{"name":"Unit_Type","type":"string"},{"name":"Dist_Name","type":"string"},{"name":"Prov_Name","type":"string"},{"name":"Dari_Dist","type":"string"},{"name":"Dari_Prov","type":"string"},{"name":"Dist_ID","type":"integer"},{"name":"Prov_ID","type":"integer"}]},"created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/district-names.json b/api/distribution/district-names.json new file mode 100644 index 0000000..215a13a --- /dev/null +++ b/api/distribution/district-names.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/district_centerpoints.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"schema":{"fields":[{"name":"state","type":"string"},{"name":"total.foreclosures","type":"integer"},{"name":"foreclosure.ratio","type":"integer"}]},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/english-indices-of-depriv.json b/api/distribution/english-indices-of-depriv.json new file mode 100644 index 0000000..169891b --- /dev/null +++ b/api/distribution/english-indices-of-depriv.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/florida-bike-lanes.json b/api/distribution/florida-bike-lanes.json new file mode 100644 index 0000000..e29ab57 --- /dev/null +++ b/api/distribution/florida-bike-lanes.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/madison-polling-places.json b/api/distribution/madison-polling-places.json new file mode 100644 index 0000000..38cda8e --- /dev/null +++ b/api/distribution/madison-polling-places.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/Polling_Places_Madison.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/property-crime-rates-for-.json b/api/distribution/property-crime-rates-for-.json new file mode 100644 index 0000000..b11bdcc --- /dev/null +++ b/api/distribution/property-crime-rates-for-.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/property-crime-statistics.json b/api/distribution/property-crime-statistics.json new file mode 100644 index 0000000..7f38ed7 --- /dev/null +++ b/api/distribution/property-crime-statistics.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/PropertyCrimesByCity.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/retirements-2011-2015.json b/api/distribution/retirements-2011-2015.json new file mode 100644 index 0000000..af2eeb9 --- /dev/null +++ b/api/distribution/retirements-2011-2015.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/retirements-eligible-vs-a.json b/api/distribution/retirements-eligible-vs-a.json new file mode 100644 index 0000000..3ca3c32 --- /dev/null +++ b/api/distribution/retirements-eligible-vs-a.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/table-of-gold-prices.json b/api/distribution/table-of-gold-prices.json new file mode 100644 index 0000000..856b932 --- /dev/null +++ b/api/distribution/table-of-gold-prices.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/data.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/tobacco-taxation-by-state.json b/api/distribution/tobacco-taxation-by-state.json new file mode 100644 index 0000000..2b1c88a --- /dev/null +++ b/api/distribution/tobacco-taxation-by-state.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/TobaccoTaxes2016.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/us-adult-smoking-rate.json b/api/distribution/us-adult-smoking-rate.json new file mode 100644 index 0000000..9495170 --- /dev/null +++ b/api/distribution/us-adult-smoking-rate.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/varicella-incidence-rates.json b/api/distribution/varicella-incidence-rates.json new file mode 100644 index 0000000..527bd3c --- /dev/null +++ b/api/distribution/varicella-incidence-rates.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicellaincidencerates.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/varicella-mortality-by-ag.json b/api/distribution/varicella-mortality-by-ag.json new file mode 100644 index 0000000..2a60c5f --- /dev/null +++ b/api/distribution/varicella-mortality-by-ag.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/violent-crime-data-for-th.json b/api/distribution/violent-crime-data-for-th.json new file mode 100644 index 0000000..30410f7 --- /dev/null +++ b/api/distribution/violent-crime-data-for-th.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/violent-crime-statistics-.json b/api/distribution/violent-crime-statistics-.json new file mode 100644 index 0000000..39335ce --- /dev/null +++ b/api/distribution/violent-crime-statistics-.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/distribution/workforce-by-generation-2.json b/api/distribution/workforce-by-generation-2.json new file mode 100644 index 0000000..79557dd --- /dev/null +++ b/api/distribution/workforce-by-generation-2.json @@ -0,0 +1 @@ +{"@type":"dcat:Distribution","downloadURL":"http://catalog-demo.interra.io/media/media/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/keyword.json b/api/keyword.json new file mode 100644 index 0000000..994728d --- /dev/null +++ b/api/keyword.json @@ -0,0 +1 @@ +[{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}},{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}},{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}},{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}},{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}},{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}},{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}},{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}},{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}},{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}},{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}}] \ No newline at end of file diff --git a/api/keyword/country-afghanistan.json b/api/keyword/country-afghanistan.json new file mode 100644 index 0000000..de7912f --- /dev/null +++ b/api/keyword/country-afghanistan.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}} diff --git a/api/keyword/crime.json b/api/keyword/crime.json new file mode 100644 index 0000000..187740c --- /dev/null +++ b/api/keyword/crime.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}} diff --git a/api/keyword/demographics.json b/api/keyword/demographics.json new file mode 100644 index 0000000..fff08e4 --- /dev/null +++ b/api/keyword/demographics.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}} diff --git a/api/keyword/economy.json b/api/keyword/economy.json new file mode 100644 index 0000000..f749698 --- /dev/null +++ b/api/keyword/economy.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}} diff --git a/api/keyword/election.json b/api/keyword/election.json new file mode 100644 index 0000000..a2553af --- /dev/null +++ b/api/keyword/election.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}} diff --git a/api/keyword/health.json b/api/keyword/health.json new file mode 100644 index 0000000..3453b61 --- /dev/null +++ b/api/keyword/health.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}} diff --git a/api/keyword/no-keyword-provided.json b/api/keyword/no-keyword-provided.json new file mode 100644 index 0000000..9f98494 --- /dev/null +++ b/api/keyword/no-keyword-provided.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}} diff --git a/api/keyword/politics.json b/api/keyword/politics.json new file mode 100644 index 0000000..caca1d8 --- /dev/null +++ b/api/keyword/politics.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}} diff --git a/api/keyword/price.json b/api/keyword/price.json new file mode 100644 index 0000000..626438a --- /dev/null +++ b/api/keyword/price.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}} diff --git a/api/keyword/public-safety.json b/api/keyword/public-safety.json new file mode 100644 index 0000000..297540d --- /dev/null +++ b/api/keyword/public-safety.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}} diff --git a/api/keyword/socioeconomic.json b/api/keyword/socioeconomic.json new file mode 100644 index 0000000..c1d4352 --- /dev/null +++ b/api/keyword/socioeconomic.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}} diff --git a/api/keyword/spatial-data.json b/api/keyword/spatial-data.json new file mode 100644 index 0000000..52e045b --- /dev/null +++ b/api/keyword/spatial-data.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}} diff --git a/api/keyword/time-series.json b/api/keyword/time-series.json new file mode 100644 index 0000000..8977e42 --- /dev/null +++ b/api/keyword/time-series.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}} diff --git a/api/keyword/transparency.json b/api/keyword/transparency.json new file mode 100644 index 0000000..cb58e8a --- /dev/null +++ b/api/keyword/transparency.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}} diff --git a/api/keyword/united-kingdom.json b/api/keyword/united-kingdom.json new file mode 100644 index 0000000..ba71603 --- /dev/null +++ b/api/keyword/united-kingdom.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}} diff --git a/api/keyword/workforce.json b/api/keyword/workforce.json new file mode 100644 index 0000000..0453d6b --- /dev/null +++ b/api/keyword/workforce.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}} diff --git a/api/license.json b/api/license.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/api/license.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/api/organization.json b/api/organization.json new file mode 100644 index 0000000..ce82f64 --- /dev/null +++ b/api/organization.json @@ -0,0 +1 @@ +[{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"}] \ No newline at end of file diff --git a/api/organization/advisory-council-for-infe.json b/api/organization/advisory-council-for-infe.json new file mode 100644 index 0000000..8ac8d06 --- /dev/null +++ b/api/organization/advisory-council-for-infe.json @@ -0,0 +1 @@ +{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"http://catalog-demo.interra.io/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/organization/committee-on-internationa.json b/api/organization/committee-on-internationa.json new file mode 100644 index 0000000..903121e --- /dev/null +++ b/api/organization/committee-on-internationa.json @@ -0,0 +1 @@ +{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"http://catalog-demo.interra.io/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/organization/demogetdkancom.json b/api/organization/demogetdkancom.json new file mode 100644 index 0000000..a5d6d64 --- /dev/null +++ b/api/organization/demogetdkancom.json @@ -0,0 +1 @@ +{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"http://catalog-demo.interra.io/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/organization/state-economic-council-co.json b/api/organization/state-economic-council-co.json new file mode 100644 index 0000000..dc67be0 --- /dev/null +++ b/api/organization/state-economic-council-co.json @@ -0,0 +1 @@ +{"@type":"org:Organization","name":"State Economic Council, Committee on International Affairs","interra":{"id":"state-economic-council-co","source":"dkandemo"},"identifier":"3590d6cd-dd24-4347-9d98-c8d5583e566d","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/organization/state-economic-council.json b/api/organization/state-economic-council.json new file mode 100644 index 0000000..0a72bff --- /dev/null +++ b/api/organization/state-economic-council.json @@ -0,0 +1 @@ +{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"http://catalog-demo.interra.io/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"} diff --git a/api/routes.json b/api/routes.json new file mode 100644 index 0000000..eac09a2 --- /dev/null +++ b/api/routes.json @@ -0,0 +1 @@ +{"dataset":[{"c9e2d352-e24c-4051-9158-f48127aa5692":"afghanistan-election-dist"},{"d460252e-d42c-474a-9ea9-5287b1d595f6":"crime-data-for-the-ten-mo"},{"cedcd327-4e5d-43f9-8eb1-c11850fa7c55":"florida-bike-lanes"},{"5dc1cfcf-8028-476c-a020-f58ec6dd621c":"gold-prices-in-london-195"},{"fb3525f2-d32a-451e-8869-906ed41f7695":"london-deprivation-index"},{"95f8eac4-fd1f-4b35-8472-5c87e9425dfa":"state-workforce-by-genera"},{"74c06c81-9fe0-439c-aba9-cd5c980a6df4":"us-national-foreclosure-s"},{"1f2042ad-c513-4fcf-a933-cae6c6fd35e6":"us-tobacco-usage-statisti"},{"e1f2ebcd-ee23-454f-87b5-df0306658418":"varicella-chickenpox-inci"},{"934400f2-a5dc-4abf-bf16-3f17335888d3":"wisconsin-polling-places"}],"organization":[{"77df7dc5-7645-49de-bb0e-63e9c71a02d0":"advisory-council-for-infe"},{"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7":"committee-on-internationa"},{"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6":"demogetdkancom"},{"3590d6cd-dd24-4347-9d98-c8d5583e566d":"state-economic-council-co"},{"d48ea7d8-ef73-4d59-894a-327822b803db":"state-economic-council"}],"distribution":[{"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6":"1-2012-foreclosures-by-st"},{"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d":"district-names"},{"554f79c0-6911-4af7-8879-7f0a63fae186":"english-indices-of-depriv"},{"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a":"florida-bike-lanes"},{"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f":"madison-polling-places"},{"7df5eafa-1c27-42a0-9b90-7d20b3fef736":"property-crime-rates-for-"},{"c25cb14b-c662-4426-8002-c71174257dfb":"property-crime-statistics"},{"7b04f63a-9cc9-4566-a04b-c8c30fb2def4":"retirements-2011-2015"},{"813a7529-49d7-40be-ad97-dbd3abec1967":"retirements-eligible-vs-a"},{"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540":"table-of-gold-prices"},{"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5":"tobacco-taxation-by-state"},{"5eb31ded-2bb6-460f-bc39-f09f158219e7":"us-adult-smoking-rate"},{"f6d3e11d-c960-4a25-8b4e-e8098fed2401":"varicella-incidence-rates"},{"4c008779-109f-4048-a0bf-3f97c73c0bc7":"varicella-mortality-by-ag"},{"b5bee926-93b8-47b4-b325-f31bb2510426":"violent-crime-data-for-th"},{"c1989976-c5c4-4cd8-9702-a0c76db4c58c":"violent-crime-statistics-"},{"51e860de-401f-40ca-921a-1e6b498b8505":"workforce-by-generation-2"}]} \ No newline at end of file diff --git a/api/schema.json b/api/schema.json new file mode 100644 index 0000000..82e62e8 --- /dev/null +++ b/api/schema.json @@ -0,0 +1 @@ +{"collections":["dataset","organization","distribution","keyword","license","theme"],"schema":{"organization":{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://project-open-data.cio.gov/v1.1/schema/organization.json#","title":"Organization","description":"A Dataset Publisher Organization.","type":"object","required":["name"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be org:Organization for each publisher","type":"string","default":"org:Organization"},"name":{"title":"Publisher Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"description":{"title":"Description","type":"string","description":"Description of the organization"},"identifier":{"type":"string","title":"Identifier"},"image":{"title":"Image","description":"Image or logo for the organization","type":"string","format":"uri"},"subOrganizationOf":{"title":"Parent Organization","type":"string"}}},"distribution":{"title":"Project Open Data Distribution","type":"object","required":["title"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be dcat:Distribution for each Distribution","default":"dcat:Distribution","type":"string"},"title":{"title":"Title","description":"Human-readable name of the distribution","type":"string","minLength":1},"identifier":{"title":"Identifier","description":"Distribution identifier","type":"string"},"description":{"title":"Description","description":"Human-readable description of the distribution","type":"string","minLength":1},"fileLocation":{"title":" ","type":"string"},"format":{"title":"Format","description":"A human-readable description of the file format of a distribution","type":"string"},"mediaType":{"title":"Media Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s downloadURL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"mediaSize":{"title":"Media Size","description":"The size of the meida file.","type":"integer"},"downloadURL":{"title":"Download URL","description":"URL providing direct access to a downloadable file of a dataset","type":"string","format":"uri"},"accessURL":{"title":"Access URL","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"conformsTo":{"title":"Data Standard","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"describedBy":{"title":"Data Dictionary","description":"URL to the data dictionary for the distribution found at the downloadURL","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"isssued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"schema":{"title":"Schema","description":"Ref of https://frictionlessdata.io/schemas/table-schema.json","type":"object","properties":{"fields":{"type":"array","items":{"title":"Table Schema Field","type":"object","properties":{"name":{"title":"Name","description":"A name for this field.","type":"string"},"title":{"title":"Title","description":"A human-readable title.","type":"string"},"description":{"title":"Description","description":"A text description. Markdown is encouraged.","type":"string"},"type":{"description":"The type for the data.","enum":["string","integer","number","boolean","object","array","date","time","datetime","year","yearmonth","duration","geopoint","geojson"]},"format":{"description":"The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.","enum":["default","email","uri","binary","uuid"]}}}}}}}},"keyword":{"$schema":"http://json-schema.org/draft-04/schema","title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"license":{"$schema":"http://json-schema.org/draft-04/schema","title":"License","description":"A license for datasets","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"link":{"type":"string","description":"A link to the license definition","title":"definition","format":"uri"}}},"theme":{"$schema":"http://json-schema.org/draft-04/schema#","title":"Category","description":"Main thematic category of the dataset.","type":"object","required":["title","identifier","created","modified"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"dataset":{"$schema":"http://json-schema.org/draft-04/schema","id":"https://project-open-data.cio.gov/v1.1/schema/dataset.json#","title":"Project Open Data Dataset","description":"The metadata format for all federal open data. Validates a single JSON object entry (as opposed to entire Data.json catalog).","type":"object","required":["title","description","identifier","accessLevel"],"properties":{"@type":{"title":"Metadata Context","type":"string","description":"IRI for the JSON-LD data type. This should be dcat:Dataset for each Dataset","default":"dcat:Dataset"},"title":{"title":"Title","description":"Human-readable name of the asset. Should be in plain English and include sufficient detail to facilitate search and discovery.","type":"string","minLength":1},"identifier":{"title":"Unique Identifier","description":"A unique identifier for the dataset or API as maintained within an Agency catalog or database.","type":"string","minLength":1},"description":{"title":"Description","description":"Human-readable description (e.g., an abstract) with sufficient detail to enable a user to quickly understand whether the asset is of interest.","type":"string","minLength":1},"accessLevel":{"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)","title":"Public Access Level","type":"string","enum":["public","restricted public","non-public"]},"rights":{"title":"Rights","description":"This may include information regarding access or restrictions based on privacy, security, or other policies. This should also provide 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.","type":"string","maxLength":255},"accrualPeriodicity":{"title":"Frequency","description":"Frequency with which dataset is published.","type":"string"},"bureauCode":{"title":"Bureau Code","description":"Federal agencies, combined agency and bureau code from OMB Circular A-11, Appendix C in the format of 015:010.","type":"array","items":{"type":"string","pattern":"[0-9]{3}:[0-9]{2}"},"minItems":1,"uniqueItems":true},"describedBy":{"title":"Data Dictionary","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.","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"conformsTo":{"title":"Data Standard","description":"URI used to identify a standardized specification the dataset conforms to","type":"string","format":"uri"},"dataQuality":{"title":"Data Quality","description":"Whether the dataset meets the agency’s Information Quality Guidelines (true/false).","type":"boolean"},"contactPoint":{"title":"Contact","description":"Contact person for dataset.","type":"object","items":{"type":"object","properties":{"@type":{"type":"string","title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be vcard:Contact for contactPoint","default":"vcard:Contact"},"fn":{"title":"Contact Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"hasEmail":{"title":"Email","description":"Email address for the contact","pattern":"^mailto:[\\w\\_\\~\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=\\:.-]+@[\\w.-]+\\.[\\w.-]+?$","type":"string"}}}},"distribution":{"title":"Distribution","description":"A container for the array of Distribution objects","type":"array","items":{"minItems":1,"uniqueItems":true,"title":"Project Open Data Distribution","type":"object","required":["title"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be dcat:Distribution for each Distribution","default":"dcat:Distribution","type":"string"},"title":{"title":"Title","description":"Human-readable name of the distribution","type":"string","minLength":1},"identifier":{"title":"Identifier","description":"Distribution identifier","type":"string"},"description":{"title":"Description","description":"Human-readable description of the distribution","type":"string","minLength":1},"fileLocation":{"title":" ","type":"string"},"format":{"title":"Format","description":"A human-readable description of the file format of a distribution","type":"string"},"mediaType":{"title":"Media Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s downloadURL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"mediaSize":{"title":"Media Size","description":"The size of the meida file.","type":"integer"},"downloadURL":{"title":"Download URL","description":"URL providing direct access to a downloadable file of a dataset","type":"string","format":"uri"},"accessURL":{"title":"Access URL","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"conformsTo":{"title":"Data Standard","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"describedBy":{"title":"Data Dictionary","description":"URL to the data dictionary for the distribution found at the downloadURL","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"isssued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"schema":{"title":"Schema","description":"Ref of https://frictionlessdata.io/schemas/table-schema.json","type":"object","properties":{"fields":{"type":"array","items":{"title":"Table Schema Field","type":"object","properties":{"name":{"title":"Name","description":"A name for this field.","type":"string"},"title":{"title":"Title","description":"A human-readable title.","type":"string"},"description":{"title":"Description","description":"A text description. Markdown is encouraged.","type":"string"},"type":{"description":"The type for the data.","enum":["string","integer","number","boolean","object","array","date","time","datetime","year","yearmonth","duration","geopoint","geojson"]},"format":{"description":"The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.","enum":["default","email","uri","binary","uuid"]}}}}}}}}},"issued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"keyword":{"title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema","title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}}},"landingPage":{"title":"Homepage URL","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.","type":"string","format":"uri"},"language":{"title":"Language","description":"The language of the dataset.","type":"array","default":["en"],"items":{"type":"string","pattern":"^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$"}},"license":{"title":"License","description":"The license dataset or API is published with. See Open Licenses for more information.","type":"string","format":"uri"},"modified":{"title":"Last Update","description":"Most recent date on which the dataset was changed, updated or modified.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"primaryITInvestmentUII":{"title":"Primary IT Investment UII","description":"For linking a dataset with an IT Unique Investment Identifier (UII)","type":"string","pattern":"[0-9]{3}-[0-9]{9}"},"programCode":{"title":"Program Code","description":"Federal agencies, list the primary program related to this data asset, from the Federal Program Inventory. Use the format of 015:001","type":"array","items":{"type":"string","pattern":"[0-9]{3}:[0-9]{3}"},"minItems":1,"uniqueItems":true},"publisher":{"type":"object","properties":{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://project-open-data.cio.gov/v1.1/schema/organization.json#","title":"Organization","description":"A Dataset Publisher Organization.","type":"object","required":["name"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be org:Organization for each publisher","type":"string","default":"org:Organization"},"name":{"title":"Publisher Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"description":{"title":"Description","type":"string","description":"Description of the organization"},"identifier":{"type":"string","title":"Identifier"},"image":{"title":"Image","description":"Image or logo for the organization","type":"string","format":"uri"},"subOrganizationOf":{"title":"Parent Organization","type":"string"}}}},"references":{"title":"Related Documents","description":"Related documents such as technical information about a dataset, developer documentation, etc.","type":"array","items":{"type":"string","format":"uri"}},"spatial":{"title":"Spatial","description":"The range of spatial applicability of a dataset. Could include a spatial region like a bounding box or a named place.","type":"string","minLength":1},"systemOfRecords":{"title":"System of Records","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.","minLength":1,"type":"string"},"temporal":{"title":"Temporal","description":"The range of temporal applicability of a dataset (i.e., a start and end date of applicability for the data).","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"isPartOf":{"title":"Collection","description":"The collection of which the dataset is a subset","type":"string","minLength":1},"theme":{"title":"Category","description":"Main thematic category of the dataset.","type":"array","items":{"minLength":1,"minItems":1,"$schema":"http://json-schema.org/draft-04/schema#","title":"Category","description":"Main thematic category of the dataset.","type":"object","required":["title","identifier","created","modified"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"uniqueItems":true}}}},"map":{"organization":{"name":"title"},"dataset":{"issued":"created"}},"uiSchema":{"datasets":{"description":{"ui:widget":"textarea"},"identifier":{"ui:placeholder":"This will be computed from the title if not provided"},"@type":{"ui:widget":"hidden"},"contactPoint":{"items":{"@type":{"ui:widget":"hidden"}}},"distribution":{"items":{"ui:widget":"referenced","ui:options":{"collection":"distribution"}}},"theme":{"items":{"ui:widget":"referenced","ui:options":{"collection":"keyword"}}},"license":{"ui:widget":"referenced","ui:options":{"collection":"license"}},"ui:order":["@type","title","identifier","description","distribution","keyword","theme","accessLevel","rights","accrualPeriodicity","bureauCode","describedBy","describedByType","conformsTo","dataQuality","contactPoint","landingPage","language","primaryITInvestmentUII","programCode","publisher","references","spatial","systemOfRecords","temporal","license","isPartOf","issued","modified"]},"distributions":{"description":{"ui:widget":"textarea"},"identifier":{"ui:placeholder":"This will be computed from the title if not provided"},"@type":{"ui:widget":"hidden"},"describedBy":{"ui:widget":"hidden"},"describedByType":{"ui:widget":"hidden"},"conformsTo":{"ui:widget":"hidden"},"mediaType":{"ui:readonly":true},"mediaSize":{"ui:readonly":true},"accessURL":{"ui:readonly":true},"downloadURL":{"ui:readonly":true},"fileLocation":{"ui:widget":"distUpload"}},"organizations":{"@type":{"ui:widget":"hidden"},"image":{"ui:widget":"image"}}},"pageSchema":{"dataset":{"Main":{"description":{"type":"Text"},"theme":{"type":"Theme"},"keyword":{"type":"Tag"},"distribution":{"type":"Resource"}},"Table":{"issued":{"type":"String","label":true},"identifier":{"type":"String","label":true},"modified":{"type":"String","label":true},"programCode":{"type":"String","label":true},"bureauCode":{"type":"String","label":true},"conformsTo":{"type":"String","label":true},"dataQuality":{"type":"String","label":true},"accessLevel":{"type":"String","label":true},"temporal":{"type":"String","label":true},"rights":{"type":"String","label":true},"describedBy":{"type":"String","label":true},"describedByType":{"type":"String","label":true},"accrualPeriodicity":{"type":"String","label":true},"primaryITInvestmentUII":{"type":"String","label":true},"landingPage":{"type":"String","label":true},"isPartOf":{"type":"String","label":true},"systemOfRecords":{"type":"String","label":true},"spatial":{"type":"String","label":true}},"Left":{"publisher":{"type":"Org","labe":false},"spatial":{"type":"ExtentMap","label":true},"widget":{"type":"Social"}}},"distribution":{"Main":{"description":{"type":"Text"},"downloadURL":{"type":"FileDownload"},"accessURL":{"type":"FileDownload"},"widget":{"type":"FilePreview","fields":["downloadURL","accessURL"]},"schema":{"type":"Schema"}},"Table":{"isssued":{"type":"String","label":true},"identifier":{"type":"String","label":true},"format":{"type":"String","label":true},"fileLocation":{"type":"String","label":true},"mediaType":{"type":"String","label":true},"mediaSize":{"type":"String","label":true},"conformsTo":{"type":"String","label":true},"describedBy":{"type":"String","label":true},"describedByType":{"type":"String","label":true}}},"organization":{"Main":{"image":{"type":"Image","lable":false,"float":"left"},"description":{"type":"Text"},"widget":{"type":"SearchPage","collection":"publisher","arg":"name"}}}},"facets":{"keyword":{"label":"Tags","field":"keyword.title"},"theme":{"label":"Category","field":"theme.title"},"publisher":{"label":"Organization","field":"publisher.name"},"distribution":{"label":"Format","field":"distribution.format"}}} diff --git a/api/search-index.json b/api/search-index.json new file mode 100644 index 0000000..2427335 --- /dev/null +++ b/api/search-index.json @@ -0,0 +1 @@ +[{"doc":{"title":"Afghanistan Election Districts","keyword":[{"created":"2017-11-17T21:51:13.596Z","title":"country-afghanistan","modified":"2017-11-17T21:51:13.596Z","identifier":"country-afghanistan","interra":{"id":"country-afghanistan"}},{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"[interraUrl]/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"description":"

This data created by the National Democratic Institute (NDI) in partnership with Development Seed, a Washington, D.C.-based online communications consultancy, is designed to make data from the August 20, 2009, Afghanistan presidential election accessible and transparent. We have provided this csv file as there is no download for the whole dataset. There are many more files on the website.

\n","modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/district_centerpoints.csv","mediaType":"text/csv","format":"csv","description":"

You can see this data plotted on a map, by clicking on 'Map' below. Individual data records can be seen by clicking on each point.

\n","title":"District Names","interra":{"id":"district-names","source":"dkandemo"},"schema":{"fields":[{"name":"state","type":"string"},{"name":"total.foreclosures","type":"integer"},{"name":"foreclosure.ratio","type":"integer"}]},"identifier":"f8d6eeda-a0ca-4a0f-9bfd-7955cdbae92d","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"c9e2d352-e24c-4051-9158-f48127aa5692","interra":{"id":"afghanistan-election-dist","source":"dkandemo"}},"ref":"afghanistan-election-dist"},{"doc":{"title":"Crime Data for the Ten Most Populous Cities in the U.S.","keyword":[{"created":"2017-11-17T21:51:13.542Z","title":"crime","modified":"2017-11-17T21:51:13.542Z","identifier":"crime","interra":{"id":"crime"}},{"created":"2017-11-17T21:51:13.543Z","title":"public safety","modified":"2017-11-17T21:51:13.543Z","identifier":"public-safety","interra":{"id":"public-safety"}}],"publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"[interraUrl]/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Data is split into two categories:

\n

Violent Crime: Includes aggravated assault, murder, rape and robbery.
Property Crime: Includes arson, burglary, larceny-theft and motor vehicle theft.

\n

Top 10 Most Populous U.S. Cities:

\n
    \n
  1. New York, NY
  2. \n
  3. Los Angeles, CA
  4. \n
  5. Chicago, IL
  6. \n
  7. Houston, TX
  8. \n
  9. Philadelphia, PA
  10. \n
  11. Las Vegas, NV
  12. \n
  13. Phoenix, AZ
  14. \n
  15. San Antonio, TX
  16. \n
  17. San Diego, TX
  18. \n
  19. Dallas, TX
  20. \n
\n

Related Data Dashboard: Crime in America's Top 10 Most Populous Cities

\n","theme":[{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/ViolentCrimeRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n

Includes information on the frequency of violent crimes in general, murder and non-negligent manslaughter, aggravated assault, rape and robbery. All crime rates are per 100,000 people.

\n","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S.","interra":{"id":"violent-crime-data-for-th","source":"dkandemo"},"identifier":"b5bee926-93b8-47b4-b325-f31bb2510426","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/PropertyCrimesByCity_3.csv","mediaType":"text/csv","format":"csv","title":"Property Crime Statistics by City","interra":{"id":"property-crime-statistics","source":"dkandemo"},"identifier":"c25cb14b-c662-4426-8002-c71174257dfb","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/PropertyCrimeRates_1.csv","mediaType":"text/csv","format":"csv","description":"

Source: FBI Uniform Crime Report, 2014 (https://www.fbi.gov/about-us/cjis/ucr/ucr)

\n","title":"Property Crime Rates for 10 Most Populous US Cities (2015)","interra":{"id":"property-crime-rates-for-","source":"dkandemo"},"identifier":"7df5eafa-1c27-42a0-9b90-7d20b3fef736","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/NumbersByCity.csv","mediaType":"text/csv","format":"csv","title":"Violent Crime Statistics by City ","interra":{"id":"violent-crime-statistics-","source":"dkandemo"},"identifier":"c1989976-c5c4-4cd8-9702-a0c76db4c58c","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"d460252e-d42c-474a-9ea9-5287b1d595f6","interra":{"id":"crime-data-for-the-ten-mo","source":"dkandemo"}},"ref":"crime-data-for-the-ten-mo"},{"doc":{"title":"Florida Bike Lanes ","keyword":[{"created":"2017-11-17T21:51:13.503Z","title":"No keyword provided","modified":"2017-11-17T21:51:13.503Z","identifier":"no-keyword-provided","interra":{"id":"no-keyword-provided"}}],"publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"[interraUrl]/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"description":"

Data on bike lanes in Florida.

\n","theme":[{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}},{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/Bike_Lane.csv","mediaType":"text/csv","format":"csv","title":"Florida Bike Lanes","interra":{"id":"florida-bike-lanes","source":"dkandemo"},"identifier":"bfcd3357-1e14-4ab0-bf9c-5a64bdcc623a","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"cedcd327-4e5d-43f9-8eb1-c11850fa7c55","interra":{"id":"florida-bike-lanes","source":"dkandemo"}},"ref":"florida-bike-lanes"},{"doc":{"title":"Gold Prices in London 1950-2008 (Monthly)","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.591Z","title":"price","modified":"2017-11-17T21:51:13.591Z","identifier":"price","interra":{"id":"price"}},{"created":"2017-11-17T21:51:13.591Z","title":"time-series","modified":"2017-11-17T21:51:13.591Z","identifier":"time-series","interra":{"id":"time-series"}}],"publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"[interraUrl]/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"description":"

Monthly gold prices (USD) in London from Bundesbank.

\n

General: 1 ounce of fine gold = 31.1034768g.

\n

Method of calculation:

\n\n

License: PDDL (Source indicates no restrictions on data).

\n","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/data_0.csv","mediaType":"text/csv","format":"csv","description":"

CSV file extracted and cleaned from source excel.

\n

Click on Graph button under Preview and plot date (x-axis) against price (y-axis) to see a line graph. Hovering over a point gives you the value of that data entry.

\n","title":"Table of Gold Prices","interra":{"id":"table-of-gold-prices","source":"dkandemo"},"identifier":"b9ed31f7-a4f2-4e98-98b3-fd28d3d97540","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"5dc1cfcf-8028-476c-a020-f58ec6dd621c","interra":{"id":"gold-prices-in-london-195","source":"dkandemo"}},"ref":"gold-prices-in-london-195"},{"doc":{"title":"London Deprivation Index","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.530Z","title":"spatial data","modified":"2017-11-17T21:51:13.530Z","identifier":"spatial-data","interra":{"id":"spatial-data"}},{"created":"2017-11-17T21:51:13.531Z","title":"United Kingdom","modified":"2017-11-17T21:51:13.531Z","identifier":"united-kingdom","interra":{"id":"united-kingdom"}}],"publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"[interraUrl]/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"description":"

Deprivation is measured across seven different areas or domains - income, employment, health, education, living environment, crime and barriers to services using a wide range of indicators, and the methods used show how each area compares with other areas across England using a combination of all these indicators.

\n

As stated by The Guardian, \"the data is based on a close analysis of the UK government's Indices of Multiple Deprivation - which measures relative poverty across England – by Alasdair Rae at the University of Sheffield.\" (Source)

\n

Source: http://data.london.gov.uk/dataset/indices-of-deprivation-2015

\n

Related Data Story: London Income Analysis

\n","theme":[{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/media/IMD-MAPS.zip","mediaType":"application/zip","format":"zip","title":"English Indices of Deprivation 2010","interra":{"id":"english-indices-of-depriv","source":"dkandemo"},"identifier":"554f79c0-6911-4af7-8879-7f0a63fae186","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"fb3525f2-d32a-451e-8869-906ed41f7695","interra":{"id":"london-deprivation-index","source":"dkandemo"}},"ref":"london-deprivation-index"},{"doc":{"title":"State Workforce by Generation (2011-2015)","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.558Z","title":"socioeconomic","modified":"2017-11-17T21:51:13.558Z","identifier":"socioeconomic","interra":{"id":"socioeconomic"}},{"created":"2017-11-17T21:51:13.559Z","title":"workforce","modified":"2017-11-17T21:51:13.559Z","identifier":"workforce","interra":{"id":"workforce"}}],"publisher":{"@type":"org:Organization","name":"State Economic Council","description":"The State Economic Council is responsible for increasing economic development of the state by collecting statistics and performing analysis on the labor force, workforce and employer demographics, generational trends, etc.","image":"[interraUrl]/media/money-saving.png","interra":{"id":"state-economic-council","source":"dkandemo"},"identifier":"d48ea7d8-ef73-4d59-894a-327822b803db","created":"2017-11-17","modified":"2017-11-17"},"description":"

Information about the state workforce, broken down into four generational cohorts.

\n

Note: This dataset has been given a vague name because it is anonymized demo data, not actual state data.

\n","modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/media/GenChart_0_0.csv","mediaType":"text/csv","format":"csv","description":"

Population of state employees broken down into Gen X, Gen Y, Baby Boomers and Over 65+.

\n","title":"Workforce By Generation (2011-2015)","interra":{"id":"workforce-by-generation-2","source":"dkandemo"},"identifier":"51e860de-401f-40ca-921a-1e6b498b8505","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/retirements_0.csv","mediaType":"text/csv","format":"csv","description":"

Total number of employees who retired from the state workforce, 2011-2015.

\n","title":"Retirements (2011 - 2015)","interra":{"id":"retirements-2011-2015","source":"dkandemo"},"identifier":"7b04f63a-9cc9-4566-a04b-c8c30fb2def4","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/2015EligibleVsActual.csv","mediaType":"text/csv","format":"csv","description":"

This data, ranging from fiscal year 2011 to fiscal year 2015, depicts the percentage of the workforce that is eligible to retire compared to the percentage of the workforce who actually retired.

\n","title":"Retirements: Eligible vs. Actual","interra":{"id":"retirements-eligible-vs-a","source":"dkandemo"},"identifier":"813a7529-49d7-40be-ad97-dbd3abec1967","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"95f8eac4-fd1f-4b35-8472-5c87e9425dfa","interra":{"id":"state-workforce-by-genera","source":"dkandemo"}},"ref":"state-workforce-by-genera"},{"doc":{"title":"US National Foreclosure Statistics January 2012","keyword":[{"created":"2017-11-17T21:51:13.589Z","title":"economy","modified":"2017-11-17T21:51:13.589Z","identifier":"economy","interra":{"id":"economy"}},{"created":"2017-11-17T21:51:13.598Z","title":"politics","modified":"2017-11-17T21:51:13.598Z","identifier":"politics","interra":{"id":"politics"}},{"created":"2017-11-17T21:51:13.598Z","title":"transparency","modified":"2017-11-17T21:51:13.598Z","identifier":"transparency","interra":{"id":"transparency"}}],"publisher":{"@type":"org:Organization","name":"DKAN Demo Examples","description":"These are examples from the DKAN demo site.","image":"[interraUrl]/media/dkan-logo.svg","interra":{"id":"demogetdkancom","source":"dkandemo"},"identifier":"3a326e8b-0aa0-497c-9f2b-c7d0bd083fc6","created":"2017-11-17","modified":"2017-11-17"},"description":"

County data: http://www.npr.org/templates/story/story.php?storyId=111494514

\n

State data: http://statehealthfacts.org/comparetable.jsp?ind=649&cat=1

\n","modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/us_foreclosures_jan_2012_by_state.csv","mediaType":"text/csv","format":"csv","description":"

US National Foreclosure Statistics - By State - January 2012

\n","title":"1-2012-Foreclosures-by-State","interra":{"id":"1-2012-foreclosures-by-st","source":"dkandemo"},"identifier":"eb8f7a37-8e9f-4799-ba75-8e1abafb18c6","schema":{"fields":[{"name":"lon","type":"number"},{"name":"lat","type":"number"},{"name":"Unit_Type","type":"string"},{"name":"Dist_Name","type":"string"},{"name":"Prov_Name","type":"string"},{"name":"Dari_Dist","type":"string"},{"name":"Dari_Prov","type":"string"},{"name":"Dist_ID","type":"integer"},{"name":"Prov_ID","type":"integer"}]},"created":"2017-11-17","modified":"2017-11-17"}],"identifier":"74c06c81-9fe0-439c-aba9-cd5c980a6df4","interra":{"id":"us-national-foreclosure-s","source":"dkandemo"}},"ref":"us-national-foreclosure-s"},{"doc":{"title":"U.S. Tobacco Usage Statistics","keyword":[{"created":"2017-11-17T21:51:13.565Z","title":"demographics","modified":"2017-11-17T21:51:13.565Z","identifier":"demographics","interra":{"id":"demographics"}},{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"[interraUrl]/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"description":"

Statistics on U.S. smoking rates and tobacco taxation rates for all fifty states.

\n

Source: Centers for Disease Control and Prevention, 2015
http://www.cdc.gov/tobacco/data_statistics/state_data/

\n

Related Data Story: State-Level Policies Reduce Smoking Rates Nationwide

\n","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/TobaccoTaxes2016_2_1.csv","mediaType":"text/csv","format":"csv","description":"

Source: The Campaign for Tobacco-Free Kids, April 2016: https://www.tobaccofreekids.org/research/factsheets/pdf/0097.pdf

\n","title":"Tobacco Taxation by State as of April 2016","interra":{"id":"tobacco-taxation-by-state","source":"dkandemo"},"identifier":"3b60d94a-21f0-4a4f-a99c-e234c8ec00b5","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/CDCSmokingRates.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention, 2015

\n","title":"U.S. Adult Smoking Rate","interra":{"id":"us-adult-smoking-rate","source":"dkandemo"},"identifier":"5eb31ded-2bb6-460f-bc39-f09f158219e7","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"1f2042ad-c513-4fcf-a933-cae6c6fd35e6","interra":{"id":"us-tobacco-usage-statisti","source":"dkandemo"}},"ref":"us-tobacco-usage-statisti"},{"doc":{"title":"Varicella (Chickenpox) Incidence and Mortality, Before and After the Vaccine","keyword":[{"created":"2017-11-17T21:51:13.573Z","title":"health","modified":"2017-11-17T21:51:13.573Z","identifier":"health","interra":{"id":"health"}}],"publisher":{"@type":"org:Organization","name":"Advisory Council for Infectious Disease","description":"Advisory Council for Infectious Disease is a working group that performs research and prepares reports to inform treatment and prevention programs nationally.","image":"[interraUrl]/media/clipboard.png","interra":{"id":"advisory-council-for-infe","source":"dkandemo"},"identifier":"77df7dc5-7645-49de-bb0e-63e9c71a02d0","created":"2017-11-17","modified":"2017-11-17"},"description":"

Centers for Disease Control and Prevention data regarding varicella (chickenpox) virus incidence and mortality rates.

\n

Source: https://data.cdc.gov/NNDSS/NNDSS-Table-II-Varicella-to-West-Nile-virus-d...

\n

Related Data Story: An End to Chickenpox: The Varicella Vaccine's Success Story

\n","theme":[{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}}],"modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/varicelladeaths1970_1994.csv","mediaType":"text/csv","format":"csv","description":"

Source: Centers for Disease Control and Prevention in Atlanta, Georgia. “Varicella Mortality: Trends before Vaccine Licensure in the United States, 1970–1994” published August 2000 in the Journal of Infectious Diseases.

\n","title":"Varicella Mortality by Age Group, 1970-1994","interra":{"id":"varicella-mortality-by-ag","source":"dkandemo"},"identifier":"4c008779-109f-4048-a0bf-3f97c73c0bc7","created":"2017-11-17","modified":"2017-11-17"},{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/varicellaincidencerates_0.csv","mediaType":"text/csv","format":"csv","description":"

Source: \"Impact of Vaccination on the Epidemiology of Varicella: 1995–2009\" published in the journal Pediatrics in August 2011.

\n","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009","interra":{"id":"varicella-incidence-rates","source":"dkandemo"},"identifier":"f6d3e11d-c960-4a25-8b4e-e8098fed2401","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"e1f2ebcd-ee23-454f-87b5-df0306658418","interra":{"id":"varicella-chickenpox-inci","source":"dkandemo"}},"ref":"varicella-chickenpox-inci"},{"doc":{"title":"Wisconsin Polling Places","keyword":[{"created":"2017-11-17T21:51:13.597Z","title":"election","modified":"2017-11-17T21:51:13.597Z","identifier":"election","interra":{"id":"election"}}],"publisher":{"@type":"org:Organization","name":"Committee on International Affairs","description":"The Committee on International Affairs is a working group to identify opportunities to learn from and collaborate with government and organizations across the globe.","image":"[interraUrl]/media/map.png","interra":{"id":"committee-on-internationa","source":"dkandemo"},"identifier":"3b611ac7-17a1-48ee-a4e7-4fd08d9af3f7","created":"2017-11-17","modified":"2017-11-17"},"description":"

Polling places in the state of Wisconsin.

\n","modified":"2017-11-17","distribution":[{"@type":"dcat:Distribution","downloadURL":"[interraUrl]/media/Polling_Places_Madison_0.csv","mediaType":"text/csv","format":"csv","description":"

This is a list and map of polling places in Madison, WI.

\n

Original data here:
https://data.cityofmadison.com/Polling-Places/Polling-Places/rtyh-6ucr

\n","title":"Madison Polling Places","interra":{"id":"madison-polling-places","source":"dkandemo"},"identifier":"6f9d3daf-d415-4f70-ba4d-a9e4437d0c2f","created":"2017-11-17","modified":"2017-11-17"}],"identifier":"934400f2-a5dc-4abf-bf16-3f17335888d3","interra":{"id":"wisconsin-polling-places","source":"dkandemo"}},"ref":"wisconsin-polling-places"}] \ No newline at end of file diff --git a/api/sitemap.json b/api/sitemap.json new file mode 100644 index 0000000..5993183 --- /dev/null +++ b/api/sitemap.json @@ -0,0 +1 @@ +[{"title":"Home","loc":"/","children":[{"title":"About","loc":"/about"},{"title":"Search","loc":"/search"},{"title":"API","loc":"/api"},{"title":"Groups","loc":"/groups","children":[{"loc":"/organization/committee-on-internationa","title":"Committee on International Affairs","children":[{"loc":"/dataset/afghanistan-election-dist","title":"Afghanistan Election Districts","children":[{"loc":"/distribution/district-names","title":"District Names"}]},{"loc":"/dataset/wisconsin-polling-places","title":"Wisconsin Polling Places","children":[{"loc":"/distribution/madison-polling-places","title":"Madison Polling Places"}]}]},{"loc":"/organization/demogetdkancom","title":"demo.getdkan.com","children":[{"loc":"/dataset/crime-data-for-the-ten-mo","title":"Crime Data for the Ten Most Populous Cities in the U.S.","children":[{"loc":"/distribution/violent-crime-data-for-th","title":"Violent Crime Data for the Ten Most Populous Cities in the U.S."},{"loc":"/distribution/property-crime-statistics","title":"Property Crime Statistics by City"},{"loc":"/distribution/property-crime-rates-for-","title":"Property Crime Rates for 10 Most Populous US Cities (2015)"},{"loc":"/distribution/violent-crime-statistics-","title":"Violent Crime Statistics by City "}]},{"loc":"/dataset/florida-bike-lanes","title":"Florida Bike Lanes ","children":[{"loc":"/distribution/florida-bike-lanes","title":"Florida Bike Lanes"}]},{"loc":"/dataset/gold-prices-in-london-195","title":"Gold Prices in London 1950-2008 (Monthly)","children":[{"loc":"/distribution/table-of-gold-prices","title":"Table of Gold Prices"}]},{"loc":"/dataset/us-national-foreclosure-s","title":"US National Foreclosure Statistics January 2012","children":[{"loc":"/distribution/1-2012-foreclosures-by-st","title":"1-2012-Foreclosures-by-State"}]}]},{"loc":"/organization/state-economic-council","title":"State Economic Council, Committee on International Affairs","children":[{"loc":"/dataset/london-deprivation-index","title":"London Deprivation Index","children":[{"loc":"/distribution/english-indices-of-depriv","title":"English Indices of Deprivation 2010"}]}]},{"loc":"/organization/state-economic-council","title":"State Economic Council","children":[{"loc":"/dataset/state-workforce-by-genera","title":"State Workforce by Generation (2011-2015)","children":[{"loc":"/distribution/workforce-by-generation-2","title":"Workforce By Generation (2011-2015)"},{"loc":"/distribution/retirements-2011-2015","title":"Retirements (2011 - 2015)"},{"loc":"/distribution/retirements-eligible-vs-a","title":"Retirements: Eligible vs. Actual"}]}]},{"loc":"/organization/advisory-council-for-infe","title":"Advisory Council for Infectious Disease","children":[{"loc":"/dataset/us-tobacco-usage-statisti","title":"U.S. Tobacco Usage Statistics","children":[{"loc":"/distribution/tobacco-taxation-by-state","title":"Tobacco Taxation by State as of April 2016"},{"loc":"/distribution/us-adult-smoking-rate","title":"U.S. Adult Smoking Rate"}]},{"loc":"/dataset/varicella-chickenpox-inci","title":"Varicella (Chickenpox) Incidence and Mortality, Before and After the Vaccine","children":[{"loc":"/distribution/varicella-mortality-by-ag","title":"Varicella Mortality by Age Group, 1970-1994"},{"loc":"/distribution/varicella-mortality-by-ag","title":"Varicella Mortality by Age Group, 1970-1994"},{"loc":"/distribution/varicella-incidence-rates","title":"Varicella Incidence Rates After Vaccine Introduced in U.S., 1995-2009"}]}]}]}]}] diff --git a/api/swagger.json b/api/swagger.json new file mode 100644 index 0000000..a45d501 --- /dev/null +++ b/api/swagger.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"description":"Interra Open Data Catalog APIs. These are all read endpoints since Interra Generate runs without a server. Full CRUD APIs are available with Interra Admin.","version":"0.0.1","title":"DKAN Demo Data Catalog API"},"paths":{"/data.json":{"get":{"summary":"Project Open Data inspired endpoint","operationId":"dataJson","description":"A list of all of the datasets as fully rendered documents. If using the pod-full schema this will be Project Open Data compliant.","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/dataset"}}}}}},"/schema.json":{"get":{"summary":"Schema for the catalog","operationId":"schema","description":"A list of all of the schemas for the catalog.","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"string","title":"Collections","description":"A list of strings of the collections in the catalog."}},"schema":{"type":"object","title":"Schema","description":"Schemas for all of the catalog collections"},"map":{"type":"object","description":"A mapping of expected keys for collections and the actual value. For example every collection should have an identifier. Map allows implementing a different key for identifier or other required keys.","title":"Map"},"uiSchema":{"type":"object","title":"UISchema","description":"A UISchema for the forms for each collection. See Mozilla's react-json-schema-form for details."}}}}}}},"/routes.json":{"get":{"summary":"A list of routes for the catalog.","description":"This list is used by the front end to determine what routes are rendered as well as the build process for rendering each HTML page.","operationId":"routes","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"type":"string"}}}}}},"/latest.json":{"get":{"summary":"A list of datasets in descending date order.","description":"This list is used by the front end to determine what routes are rendered as well as the build process for rendering each HTML page.","operationId":"latest","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string"},"modified":{"type":"string"}}}}}}}},"/collections/organization.json":{"get":{"summary":"All results for organization collection","operationId":"organizationCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/organization"}}}}}},"/collections/organization/{document}.json":{"get":{"summary":"All results for organization collection","operationId":"organizationCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/organization"}}}},"description":"An individual document in the organization","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}},"/collections/distribution.json":{"get":{"summary":"All results for distribution collection","operationId":"distributionCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/distribution"}}}}}},"/collections/distribution/{document}.json":{"get":{"summary":"All results for distribution collection","operationId":"distributionCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/distribution"}}}},"description":"An individual document in the distribution","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}},"/collections/keyword.json":{"get":{"summary":"All results for keyword collection","operationId":"keywordCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/keyword"}}}}}},"/collections/keyword/{document}.json":{"get":{"summary":"All results for keyword collection","operationId":"keywordCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/keyword"}}}},"description":"An individual document in the keyword","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}},"/collections/license.json":{"get":{"summary":"All results for license collection","operationId":"licenseCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/license"}}}}}},"/collections/license/{document}.json":{"get":{"summary":"All results for license collection","operationId":"licenseCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/license"}}}},"description":"An individual document in the license","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}},"/collections/theme.json":{"get":{"summary":"All results for theme collection","operationId":"themeCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/theme"}}}}}},"/collections/theme/{document}.json":{"get":{"summary":"All results for theme collection","operationId":"themeCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/theme"}}}},"description":"An individual document in the theme","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}},"/collections/dataset.json":{"get":{"summary":"All results for dataset collection","operationId":"datasetCollection","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/dataset"}}}}}},"/collections/dataset/{document}.json":{"get":{"summary":"All results for dataset collection","operationId":"datasetCollectionDoc","produces":["application/json"],"responses":{"200":{"description":"This is a file so will either be 200 or 404","schema":{"type":"array","items":{"$ref":"#/definitions/dataset"}}}},"description":"An individual document in the dataset","parameters":[{"in":"path","name":"document","type":"string","required":true,"description":"The identifier for the document."}]}}},"definitions":{"organization":{"title":"Organization","description":"A Dataset Publisher Organization.","type":"object","required":["name"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be org:Organization for each publisher","type":"string","default":"org:Organization"},"name":{"title":"Publisher Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"description":{"title":"Description","type":"string","description":"Description of the organization"},"identifier":{"type":"string","title":"Identifier"},"image":{"title":"Image","description":"Image or logo for the organization","type":"string","format":"uri"},"subOrganizationOf":{"title":"Parent Organization","type":"string"}}},"distribution":{"title":"Project Open Data Distribution","type":"object","required":["title"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be dcat:Distribution for each Distribution","default":"dcat:Distribution","type":"string"},"title":{"title":"Title","description":"Human-readable name of the distribution","type":"string","minLength":1},"identifier":{"title":"Identifier","description":"Distribution identifier","type":"string"},"description":{"title":"Description","description":"Human-readable description of the distribution","type":"string","minLength":1},"fileLocation":{"title":" ","type":"string"},"format":{"title":"Format","description":"A human-readable description of the file format of a distribution","type":"string"},"mediaType":{"title":"Media Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s downloadURL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"mediaSize":{"title":"Media Size","description":"The size of the meida file.","type":"integer"},"downloadURL":{"title":"Download URL","description":"URL providing direct access to a downloadable file of a dataset","type":"string","format":"uri"},"accessURL":{"title":"Access URL","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"conformsTo":{"title":"Data Standard","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"describedBy":{"title":"Data Dictionary","description":"URL to the data dictionary for the distribution found at the downloadURL","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"isssued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},"keyword":{"title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"license":{"title":"License","description":"A license for datasets","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"link":{"type":"string","description":"A link to the license definition","title":"definition","format":"uri"}}},"theme":{"title":"Category","description":"Main thematic category of the dataset.","type":"object","required":["title","identifier","created","modified"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"dataset":{"title":"Project Open Data Dataset","description":"The metadata format for all federal open data. Validates a single JSON object entry (as opposed to entire Data.json catalog).","type":"object","required":["title","description","identifier","accessLevel"],"properties":{"@type":{"title":"Metadata Context","type":"string","description":"IRI for the JSON-LD data type. This should be dcat:Dataset for each Dataset","default":"dcat:Dataset"},"title":{"title":"Title","description":"Human-readable name of the asset. Should be in plain English and include sufficient detail to facilitate search and discovery.","type":"string","minLength":1},"identifier":{"title":"Unique Identifier","description":"A unique identifier for the dataset or API as maintained within an Agency catalog or database.","type":"string","minLength":1},"description":{"title":"Description","description":"Human-readable description (e.g., an abstract) with sufficient detail to enable a user to quickly understand whether the asset is of interest.","type":"string","minLength":1},"accessLevel":{"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)","title":"Public Access Level","type":"string","enum":["public","restricted public","non-public"]},"rights":{"title":"Rights","description":"This may include information regarding access or restrictions based on privacy, security, or other policies. This should also provide 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.","type":"string","maxLength":255},"accrualPeriodicity":{"title":"Frequency","description":"Frequency with which dataset is published.","type":"string"},"bureauCode":{"title":"Bureau Code","description":"Federal agencies, combined agency and bureau code from OMB Circular A-11, Appendix C in the format of 015:010.","type":"array","items":{"type":"string","pattern":"[0-9]{3}:[0-9]{2}"},"minItems":1,"uniqueItems":true},"describedBy":{"title":"Data Dictionary","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.","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"conformsTo":{"title":"Data Standard","description":"URI used to identify a standardized specification the dataset conforms to","type":"string","format":"uri"},"dataQuality":{"title":"Data Quality","description":"Whether the dataset meets the agency’s Information Quality Guidelines (true/false).","type":"boolean"},"contactPoint":{"title":"Contact","description":"Contact person for dataset.","type":"object","items":{"type":"object","properties":{"@type":{"type":"string","title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be vcard:Contact for contactPoint","default":"vcard:Contact"},"fn":{"title":"Contact Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"hasEmail":{"title":"Email","description":"Email address for the contact","pattern":"^mailto:[\\w\\_\\~\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=\\:.-]+@[\\w.-]+\\.[\\w.-]+?$","type":"string"}}}},"distribution":{"title":"Distribution","description":"A container for the array of Distribution objects","type":"array","items":{"minItems":1,"uniqueItems":true,"title":"Project Open Data Distribution","type":"object","required":["title"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be dcat:Distribution for each Distribution","default":"dcat:Distribution","type":"string"},"title":{"title":"Title","description":"Human-readable name of the distribution","type":"string","minLength":1},"identifier":{"title":"Identifier","description":"Distribution identifier","type":"string"},"description":{"title":"Description","description":"Human-readable description of the distribution","type":"string","minLength":1},"fileLocation":{"title":" ","type":"string"},"format":{"title":"Format","description":"A human-readable description of the file format of a distribution","type":"string"},"mediaType":{"title":"Media Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s downloadURL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"mediaSize":{"title":"Media Size","description":"The size of the meida file.","type":"integer"},"downloadURL":{"title":"Download URL","description":"URL providing direct access to a downloadable file of a dataset","type":"string","format":"uri"},"accessURL":{"title":"Access URL","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"conformsTo":{"title":"Data Standard","description":"URL providing indirect access to a dataset","type":"string","format":"uri"},"describedBy":{"title":"Data Dictionary","description":"URL to the data dictionary for the distribution found at the downloadURL","type":"string","format":"uri"},"describedByType":{"title":"Data Dictionary Type","description":"The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL","pattern":"^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$","type":"string"},"isssued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}}},"issued":{"title":"Release Date","description":"Date of formal issuance.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"keyword":{"title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"array","items":{"$schema":"http://json-schema.org/draft-04/schema","title":"Tags","description":"Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.","type":"object","required":["title","identifier"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}}},"landingPage":{"title":"Homepage URL","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.","type":"string","format":"uri"},"language":{"title":"Language","description":"The language of the dataset.","type":"array","default":["en"],"items":{"type":"string","pattern":"^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$"}},"license":{"title":"License","description":"The license dataset or API is published with. See Open Licenses for more information.","type":"string","format":"uri"},"modified":{"title":"Last Update","description":"Most recent date on which the dataset was changed, updated or modified.","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"primaryITInvestmentUII":{"title":"Primary IT Investment UII","description":"For linking a dataset with an IT Unique Investment Identifier (UII)","type":"string","pattern":"[0-9]{3}-[0-9]{9}"},"programCode":{"title":"Program Code","description":"Federal agencies, list the primary program related to this data asset, from the Federal Program Inventory. Use the format of 015:001","type":"array","items":{"type":"string","pattern":"[0-9]{3}:[0-9]{3}"},"minItems":1,"uniqueItems":true},"publisher":{"type":"object","properties":{"$schema":"http://json-schema.org/draft-04/schema#","id":"https://project-open-data.cio.gov/v1.1/schema/organization.json#","title":"Organization","description":"A Dataset Publisher Organization.","type":"object","required":["name"],"properties":{"@type":{"title":"Metadata Context","description":"IRI for the JSON-LD data type. This should be org:Organization for each publisher","type":"string","default":"org:Organization"},"name":{"title":"Publisher Name","description":"A full formatted name, eg Firstname Lastname","type":"string","minLength":1},"description":{"title":"Description","type":"string","description":"Description of the organization"},"identifier":{"type":"string","title":"Identifier"},"image":{"title":"Image","description":"Image or logo for the organization","type":"string","format":"uri"},"subOrganizationOf":{"title":"Parent Organization","type":"string"}}}},"references":{"title":"Related Documents","description":"Related documents such as technical information about a dataset, developer documentation, etc.","type":"array","items":{"type":"string","format":"uri"}},"spatial":{"title":"Spatial","description":"The range of spatial applicability of a dataset. Could include a spatial region like a bounding box or a named place.","type":"string","minLength":1},"systemOfRecords":{"title":"System of Records","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.","minLength":1,"type":"string"},"temporal":{"title":"Temporal","description":"The range of temporal applicability of a dataset (i.e., a start and end date of applicability for the data).","type":"string","pattern":"^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},"isPartOf":{"title":"Collection","description":"The collection of which the dataset is a subset","type":"string","minLength":1},"theme":{"title":"Category","description":"Main thematic category of the dataset.","type":"array","items":{"minLength":1,"minItems":1,"$schema":"http://json-schema.org/draft-04/schema#","title":"Category","description":"Main thematic category of the dataset.","type":"object","required":["title","identifier","created","modified"],"properties":{"title":{"title":"Title","type":"string"},"identifier":{"type":"string","title":"Identifier"},"created":{"type":"string","title":"Created","format":"date-time"},"modified":{"type":"string","title":"Modified","format":"date-time"},"icon":{"type":"string","title":"icon"}}},"uniqueItems":true}}}},"host":"","basePath":"/api/v1/","schemes":["https","http"]} diff --git a/api/theme.json b/api/theme.json new file mode 100644 index 0000000..f0905b0 --- /dev/null +++ b/api/theme.json @@ -0,0 +1 @@ +[{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}},{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}},{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}},{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}},{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}}] \ No newline at end of file diff --git a/api/theme/city-planning.json b/api/theme/city-planning.json new file mode 100644 index 0000000..73e1a16 --- /dev/null +++ b/api/theme/city-planning.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.509Z","title":"City Planning","modified":"2017-11-17T21:51:13.509Z","identifier":"city-planning","icon":"building-12","interra":{"id":"city-planning"}} diff --git a/api/theme/finance-and-budgeting.json b/api/theme/finance-and-budgeting.json new file mode 100644 index 0000000..40bb54b --- /dev/null +++ b/api/theme/finance-and-budgeting.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.592Z","title":"Finance and Budgeting","modified":"2017-11-17T21:51:13.592Z","identifier":"finance-and-budgeting","icon":"budget","interra":{"id":"finance-and-budgeting"}} diff --git a/api/theme/health-care.json b/api/theme/health-care.json new file mode 100644 index 0000000..16ddad6 --- /dev/null +++ b/api/theme/health-care.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.574Z","title":"Health Care","modified":"2017-11-17T21:51:13.574Z","identifier":"health-care","icon":"healthcare","interra":{"id":"health-care"}} diff --git a/api/theme/public-safety.json b/api/theme/public-safety.json new file mode 100644 index 0000000..6714e56 --- /dev/null +++ b/api/theme/public-safety.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.545Z","title":"Public Safety","modified":"2017-11-17T21:51:13.545Z","identifier":"public-safety","icon":"safety","interra":{"id":"public-safety"}} diff --git a/api/theme/transportation.json b/api/theme/transportation.json new file mode 100644 index 0000000..d0413b6 --- /dev/null +++ b/api/theme/transportation.json @@ -0,0 +1 @@ +{"created":"2017-11-17T21:51:13.508Z","title":"Transportation","modified":"2017-11-17T21:51:13.508Z","identifier":"transportation","icon":"transport","interra":{"id":"transportation"}} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ae324c9 --- /dev/null +++ b/package.json @@ -0,0 +1,52 @@ +{ + "name": "interra-catalog-adming", + "version": "0.1.0", + "homepage": "https://interra.github.io/catalog-admin", + "private": true, + "dependencies": { + "@fortawesome/fontawesome-svg-core": "^1.2.15", + "@fortawesome/free-solid-svg-icons": "^5.7.2", + "@fortawesome/react-fontawesome": "^0.1.4", + "bootstrap": "^4.3.0", + "data.js": "^0.11.5", + "dom-confetti": "^0.1.0", + "filesize": "^4.1.2", + "i": "^0.3.6", + "lodash": "^4.17.11", + "npm": "^6.8.0", + "papaparse": "^4.6.3", + "react": "^16.8.1", + "react-dom": "^16.8.1", + "react-dom-confetti": "^0.1.0", + "react-jsonschema-form": "^1.2.1", + "react-loader": "^2.4.5", + "react-router": "^4.3.1", + "react-router-dom": "^4.3.1", + "react-scripts": "2.1.4", + "react-table": "^6.9.2", + "stream": "0.0.2", + "styled-components": "^4.1.3", + "tableschema": "^1.9.1", + "uuid": "^3.3.2" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject", + "predeploy": "npm run build", + "deploy": "gh-pages -d build" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ], + "devDependencies": { + "gh-pages": "^2.0.1" + } +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..a11777c Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..35f0f88 --- /dev/null +++ b/public/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + + Data Import Demo + + + +
+ + + diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..1f2f141 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/src/Add.js b/src/Add.js new file mode 100644 index 0000000..441eb97 --- /dev/null +++ b/src/Add.js @@ -0,0 +1,62 @@ +import React, { Component } from 'react'; +import { Redirect } from 'react-router' +import FileUpload from './components/FileUpload'; +import Sidebar from './components/Sidebar'; + +import { FileConsumer } from './context/FileContext'; + +class Add extends Component { + + render() { + + return ( +
+
+ +
+

Welcome

+

This is the Add page.

+ + {({ file, fileUpload, type, loadDefault, cancelUpload, step }) => ( +
+ {type === "wrong" ? ( +
Hey there. We only accept CSVs.
+ ) : ( + <> + )} + {file ? ( + <> + { step === "preview" ? ( + <> + + + ) : + ( +
+

You have selected:

+
{file.name}
+ +
+ )} + + ) : ( + + <> + +

or

+

+ + )} +
+ )} +
+
+
+
+ ); + } +} + +export default Add; diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..6d8c97e --- /dev/null +++ b/src/App.js @@ -0,0 +1,71 @@ +import React, { Component } from 'react'; +import { BrowserRouter as Router, Route } from 'react-router-dom'; + +import { library } from '@fortawesome/fontawesome-svg-core' +import { faIgloo } from '@fortawesome/free-solid-svg-icons' + + +import Header from './components/Header'; + +import Home from './Home' +import Add from './Add' +import Preview from './Preview' +import Schema from './Schema' +import Detail from './Detail' +import Publish from './Publish' +import Datasets from './Datasets' +import EditDataset from './EditDataset' + +import Groups from './Groups' + +import { FileProvider } from './context/FileContext'; +import { DatasetProvider } from './context/DatasetContext'; +import { GroupProvider } from './context/GroupContext'; + +library.add(faIgloo); + +class App extends Component { + render() { + const home = + const preview = + const schema = + const detail = + const publish = + const datasets = + const groups = + + const add = + return ( +
+
+ + + + + +
+ (home)} /> + (datasets)} /> + ()}/> + + (groups)} /> + + (add)} /> + + (preview)} /> + (schema)} /> + (detail)} /> + (publish)} /> + + + + + + +
+
+ ); + } +} + +export default App; diff --git a/src/Datasets.js b/src/Datasets.js new file mode 100644 index 0000000..0ad0afb --- /dev/null +++ b/src/Datasets.js @@ -0,0 +1,64 @@ +import React, { Component } from 'react'; +import { DatasetConsumer } from './context/DatasetContext'; +import Sidebar from './components/Sidebar'; +import Loader from 'react-loader'; +import ReactTable from 'react-table'; +import { Link } from 'react-router-dom'; + +class Datasets extends Component { + + render() { + const columns = [{ + Header: 'Title', + accessor: 'title' + }, + { + Header: 'Modified', + accessor: 'modified' + }, + { + Header: 'Description', + accessor: 'description' + }, + { + Header: 'Edit', + accessor: 'interra.id', + Cell: props => ( + edit + ) + } + ] + + return ( +
+
+ +
+

Datasets

+ + {({ datasets }) => ( + <> + {datasets ? ( +
+ +
+ ) : ( + + )} + + )} +
+
+
+
+ ); + } +} + +export default Datasets; diff --git a/src/Detail.js b/src/Detail.js new file mode 100644 index 0000000..3209ad5 --- /dev/null +++ b/src/Detail.js @@ -0,0 +1,52 @@ +import React, { Component } from 'react'; +import { FileConsumer } from './context/FileContext'; +import { Redirect } from 'react-router' +import dataset from './schemas/simple/dataset.json'; +import uiSchema from './schemas/simple/UISchema.json'; +import Form from "react-jsonschema-form"; +import Sidebar from './components/Sidebar'; +import Pager from './components/Pager'; + +const log = (type) => console.log.bind(console, type); + +class Publish extends Component { + + render() { + + return ( +
+
+ +
+ +

Detail

+

Time to add metadata.

+ + {({ file, updateMetadata, metadata }) => ( +
+ {file ? ( +
+
+
+
+
+ ) : ( + + )} +
+ )} +
+ +
+
+
+ ); + } +} + +export default Publish; diff --git a/src/EditDataset.js b/src/EditDataset.js new file mode 100644 index 0000000..4a6f375 --- /dev/null +++ b/src/EditDataset.js @@ -0,0 +1,48 @@ +import React, { Component } from 'react'; +import { Redirect } from 'react-router' +import dataset from './schemas/simple/dataset.json'; +import uiSchema from './schemas/simple/UISchema.json'; +import Form from "react-jsonschema-form"; +import Sidebar from './components/Sidebar'; +import Pager from './components/Pager'; + +const log = (type) => console.log.bind(console, type); + +class EditDataset extends Component { + + render() { + const metadata = { + title: "madison polling", + description: "lorem ipsum go eagles" + } + + return ( +
+
+ +
+ +

Detail

+

Time to add metadata.

+ +
+
+
+
+
+
+ +
+ +
+
+
+ ); + } +} + +export default EditDataset; diff --git a/src/Groups.js b/src/Groups.js new file mode 100644 index 0000000..5948e37 --- /dev/null +++ b/src/Groups.js @@ -0,0 +1,59 @@ +import React, { Component } from 'react'; +import { GroupConsumer } from './context/GroupContext'; +import { DatasetConsumer } from './context/DatasetContext'; +import Sidebar from './components/Sidebar'; +import Loader from 'react-loader'; +import ReactTable from 'react-table'; + +class Groups extends Component { + + render() { + const columns = [ + { + Header: 'Title', + accessor: 'name' + }, + { + Header: 'Modified', + accessor: 'modified' + }, + { + Header: 'Description', + accessor: 'description' + }, + { + Header: 'Edit', + accessor: 'edit' + } + ]; + return ( +
+
+ +
+

Groups

+ + {({ datasets }) => ( + <> + {datasets ? ( +
+ +
+ ) : ( + + )} + + )} +
+
+
+
+ ); + } +} + +export default Groups; diff --git a/src/Home.js b/src/Home.js new file mode 100644 index 0000000..3615562 --- /dev/null +++ b/src/Home.js @@ -0,0 +1,55 @@ +import React, { Component } from 'react'; +import Sidebar from './components/Sidebar'; +import mock from './assets/images/analytics-mock.png'; +import {Link} from 'react-router-dom'; + +class Home extends Component { + + render() { + + return ( +
+
+ +
+

Dashboard

+
+
+
+

Datasets

+
+
+

225

+ + edit datasets +
+
+
+
+

Page visits

+
+
+

413,023

+ +
+
+
+
+

Comments

+
+
+

415

+ +
+
+
+ + +
+
+
+ ); + } +} + +export default Home; diff --git a/src/Preview.js b/src/Preview.js new file mode 100644 index 0000000..e36f30f --- /dev/null +++ b/src/Preview.js @@ -0,0 +1,57 @@ +import React, { Component } from 'react'; +import { FileConsumer } from './context/FileContext'; +import { Redirect } from 'react-router' +import Loader from 'react-loader'; +import 'react-table/react-table.css'; +import ReactTable from 'react-table'; +import filesize from 'filesize'; +import Sidebar from './components/Sidebar'; +import Pager from './components/Pager'; + +class Preview extends Component { + + + render() { + return ( +
+
+ +
+ +

Preview

+

This is the preview page.

+ + {({ file, data, step, metadata, updateMetadata }) => ( +
+ {step !== "preview" && ( + + )} + {file && data ? ( +
+ +

+ Name: {file.name}
+ Size: {filesize(file.size)} +

+

+

+ +
+ ) : ( + + )} +
+ )} +
+ + +
+
+
); + } +} + +export default Preview; diff --git a/src/Publish.js b/src/Publish.js new file mode 100644 index 0000000..08f8db5 --- /dev/null +++ b/src/Publish.js @@ -0,0 +1,78 @@ +import React, { Component } from 'react'; +import { FileConsumer } from './context/FileContext'; +import { Redirect } from 'react-router' +import Confetti from 'react-dom-confetti'; +import Sidebar from './components/Sidebar'; +import Pager from './components/Pager'; +import Loader from 'react-loader'; + +const slowClick = (setLoading) => () => { + setLoading(true); + setTimeout(() => setLoading(false), 1000); +}; +const config = { + angle: 90, + spread: 100, + startVelocity: 45, + elementCount: 50, + dragFriction: 0.1, + duration: 3000, + delay: 0, + width: "10px", + height: "10px", + colors: ["#a864fd", "#29cdff", "#78ff44", "#ff718d", "#fdff6a"] +}; +class Publish extends Component { + + state = { + isLoading: false + } + + setLoading(value) { + this.setState({ isLoading: value }); + } + + + render() { + return ( +
+
+ +
+ +

Publish

+

This is the publish page.

+ + {({ file, metadata }) => ( +
+ {file ? ( + <> +

Ready to publish:

{metadata.title}

{file.name}

+ + + ) : ( + + )} +
+ )} +
+ +
+
+
); + } +} + +export default Publish; diff --git a/src/Schema.js b/src/Schema.js new file mode 100644 index 0000000..5882716 --- /dev/null +++ b/src/Schema.js @@ -0,0 +1,57 @@ +import React, { Component } from 'react'; +import { FileConsumer } from './context/FileContext'; +import { Redirect } from 'react-router' +import Loader from 'react-loader'; +import 'react-table/react-table.css'; +import SchemaTable from './components/SchemaTable'; +import Sidebar from './components/Sidebar'; +import Pager from './components/Pager'; + +class Schema extends Component { + + + render() { + return ( +
+
+ +
+

Edit Schema

+

Edit the schema for your package..

+ + {({ file, data, errors, step, metadata, updateMetadata, tableSchema, updateTableSchemaType, updateTableSchemaFormat, updateTableSchemaDesc, updateDataFromCell }) => ( +
+ {step !== "schema" && ( + + )} + {file && data && metadata ? ( +
+ +

+

+ +
+ ) : ( + + )} +
+ )} +
+ +
+
+
+ ); + } +} + +export default Schema; diff --git a/src/api b/src/api new file mode 120000 index 0000000..8edbb42 --- /dev/null +++ b/src/api @@ -0,0 +1 @@ +../api \ No newline at end of file diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css new file mode 100644 index 0000000..033f7ee --- /dev/null +++ b/src/assets/css/custom.css @@ -0,0 +1,111 @@ +header.navigation .navigation-wrapper { + padding: 15px; + max-width: 100%; +} +input#title { + border: none; + font-size: 2em; + font-weight: bold; + padding-left: 0px; +} +main { + padding: 20px 15px; +} +.branding img { + max-height: 60px; + padding: 0.8em 0; +} +#file-name { + float:left; + padding: 0 10px 0 0; + font-weight: bold; + font-size: 1.5em; +} +#file-desc { + display: block; + height: 110px; +} +#file-close { + float: left; + color: #dc3545; + background-color: transparent; + background-image: none; + border-color: #dc3545; + border: 1px solid red; + padding: 5px; +} +.pagination { + margin: 30px 0; +} +#publish { + margin: 0 0 40px 0; + width: 25%; + font-size: 1.5em; + background-color: #3790c7; +} +footer { + background-color: #e9ecef; + padding-bottom: 20px; +} +.loading-button__confetti { + position: absolute !important; + top: 50%; + left: 15%; +} +*{margin:0;box-sizing:border-box;} +.App { + display: flex; + flex-direction: column; + min-height: 100vh; +} +main { + flex: 1; +} +#data-table .rt-resizable-header { + display: none; +} +.schema.edit-button { + float: right; +} +.schema.edit-button:hover { + color: #FFF; +} +.schema.select { + margin-bottom: 0 +} +#schema-help { + text-align: right; + font-weight: bold; +} +#schema-help .svg-inline--fa.fa-w-16 { + color: #3790c7; + width: .7em; +} +.schema-help-row:first-child { + height: 40px; +} +.schema-help-row { + height: 46px; +} +.edit-schema-input { + position: absolute; + top: 4px; +} +.edit-schema-cont input { + padding-right: 20px; +} +.edit-schema-cont svg { + position: absolute; + right: 2px; + top: 12px; +} +.edit-schema-cont { + position: relative; + height: 40px; +} +#data-table .rt-td { + padding: 0; +} +#error-container { + margin-top: 20px; +} diff --git a/src/assets/css/fileupload.css b/src/assets/css/fileupload.css new file mode 100644 index 0000000..c37eda0 --- /dev/null +++ b/src/assets/css/fileupload.css @@ -0,0 +1,112 @@ +.file-upload { + background-color: #ffffff; + margin : 20px; + display: block; + position: relative; +} + +.file-upload-btn { + width: 100%; + margin: 0; + color: #fff; + background: #333; + border: none; + padding: 10px; + border-radius: 4px; + border-bottom: 4px solid #666; + transition: all .2s ease; + outline: none; + text-transform: uppercase; + font-weight: 700; +} + +.file-upload-btn:hover { + background: #444; + color: #ffffff; + transition: all .2s ease; + cursor: pointer; +} + +.file-upload-btn:active { + border: 0; + transition: all .2s ease; +} + +.file-upload-content { + display: none; + text-align: center; +} + +.file-upload-input { + position: absolute; + margin: 0; + padding: 0; + width: 100%; + height: 100%; + outline: none; + opacity: 0; + cursor: pointer; +} + +.file-upload-wrap { + margin-top: 20px; + border: 4px dashed #666; + position: relative; +} + +.file-dropping, +.file-upload-wrap:hover { + background-color: #CCC; + border: 4px dashed #ffffff; +} + +.file-title-wrap { + padding: 0 15px 15px 15px; + color: #222; +} + +.drag-text { + text-align: center; +} + +.drag-text h3 { + font-weight: 100; + text-transform: uppercase; + color: #222; + padding: 60px 0; + font-size: 2em; +} + +.file-upload-file { + max-height: 200px; + max-width: 200px; + margin: auto; + padding: 20px; +} + +.remove-file { + width: 200px; + margin: 0; + color: #fff; + background: #555; + border: none; + padding: 10px; + border-radius: 4px; + border-bottom: 4px solid #555; + transition: all .2s ease; + outline: none; + text-transform: uppercase; + font-weight: 700; +} + +.remove-file:hover { + background: #444; + color: #ffffff; + transition: all .2s ease; + cursor: pointer; +} + +.remove-file:active { + border: 0; + transition: all .2s ease; +} diff --git a/src/assets/fonts/ionicons.eot b/src/assets/fonts/ionicons.eot new file mode 100644 index 0000000..92a3f20 Binary files /dev/null and b/src/assets/fonts/ionicons.eot differ diff --git a/src/assets/fonts/ionicons.svg b/src/assets/fonts/ionicons.svg new file mode 100644 index 0000000..49fc8f3 --- /dev/null +++ b/src/assets/fonts/ionicons.svg @@ -0,0 +1,2230 @@ + + + + + +Created by FontForge 20120731 at Thu Dec 4 09:51:48 2014 + By Adam Bradley +Created by Adam Bradley with FontForge 2.0 (http://fontforge.sf.net) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/fonts/ionicons.ttf b/src/assets/fonts/ionicons.ttf new file mode 100644 index 0000000..c4e4632 Binary files /dev/null and b/src/assets/fonts/ionicons.ttf differ diff --git a/src/assets/fonts/ionicons.woff b/src/assets/fonts/ionicons.woff new file mode 100644 index 0000000..5f3a14e Binary files /dev/null and b/src/assets/fonts/ionicons.woff differ diff --git a/src/assets/images/analytics-mock.png b/src/assets/images/analytics-mock.png new file mode 100644 index 0000000..c50da31 Binary files /dev/null and b/src/assets/images/analytics-mock.png differ diff --git a/src/assets/images/datopian-logo.png b/src/assets/images/datopian-logo.png new file mode 100644 index 0000000..b298acf Binary files /dev/null and b/src/assets/images/datopian-logo.png differ diff --git a/src/assets/images/logo.svg b/src/assets/images/logo.svg new file mode 100644 index 0000000..cc2119b --- /dev/null +++ b/src/assets/images/logo.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + diff --git a/src/components/FileUpload/index.js b/src/components/FileUpload/index.js new file mode 100644 index 0000000..6b987a3 --- /dev/null +++ b/src/components/FileUpload/index.js @@ -0,0 +1,29 @@ +import React from 'react'; +import { FileConsumer } from '../../context/FileContext'; + +export default class FileUpload extends React.Component { + + render() { + const { upload } = this.props; + return ( + + {({ file, stepChange, step }) => ( +
+
+ +
+

Drag and drop a file or select add File

+
+
+
+ your file +
+ +
+
+
+ )} +
+ ); + } +} diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js new file mode 100644 index 0000000..7d53bca --- /dev/null +++ b/src/components/Footer/index.js @@ -0,0 +1,40 @@ +import React from 'react'; + +export default class Footer extends React.Component { + + render() { + return ( + + ); + } +} diff --git a/src/components/Header/SiteName.js b/src/components/Header/SiteName.js new file mode 100644 index 0000000..8cc0c46 --- /dev/null +++ b/src/components/Header/SiteName.js @@ -0,0 +1,27 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +class SiteName extends React.Component { + + render() { + + return ( +
+ {this.props.site} +
{this.props.slogan}
+
+ ); + } +} + +SiteName.defaultProps = { + site: "Open Data Catalog", + slogan: "Place your tag line here.", + link: "/home" +}; + +SiteName.propTypes = { + item: PropTypes.any, +}; + +export default SiteName; diff --git a/src/components/Header/Wrapper.js b/src/components/Header/Wrapper.js new file mode 100644 index 0000000..80eedcb --- /dev/null +++ b/src/components/Header/Wrapper.js @@ -0,0 +1,10 @@ +import styled from "styled-components"; + +const Wrapper = styled.header` + .logo { + max-height: 25px; + } + border-bottom: 1px solid #ccc; +`; + +export default Wrapper; diff --git a/src/components/Header/index.js b/src/components/Header/index.js new file mode 100644 index 0000000..3edad38 --- /dev/null +++ b/src/components/Header/index.js @@ -0,0 +1,23 @@ +import React from 'react'; +import logo from '../../assets/images/logo.svg'; +import Wrapper from './Wrapper'; + +class Header extends React.Component { + + render() { + return ( + + + + ); + } +} + +export default Header; diff --git a/src/components/Pager/index.js b/src/components/Pager/index.js new file mode 100644 index 0000000..0b23933 --- /dev/null +++ b/src/components/Pager/index.js @@ -0,0 +1,75 @@ +import React from 'react'; +import { NavLink as Link } from 'react-router-dom'; +import { FileConsumer } from '../../context/FileContext'; + +export default class Pager extends React.Component { + + step(file, step, stepChange) { + let pager = (
); + if (step === "home" && file === false) { + pager = (
); + } + else if (step === "home") { + pager = ( + <> +
  • Next
  • + + ); + } + else if (step === "preview") { + pager = ( + <> +
  • Previous
  • +
  • Next
  • + + ); + } + else if (step === "schema") { + pager = ( + <> +
  • Previous
  • +
  • Next
  • + + ); + } + else if (step === "detail") { + pager = ( + <> +
  • Previous
  • +
  • Next
  • + + ); + } + else if (step === "publish") { + pager = ( + <> +
  • Previous
  • + + ); + } + return pager; + } + + + render() { + return ( + + ); + } +} diff --git a/src/components/SchemaTable/formats.json b/src/components/SchemaTable/formats.json new file mode 100644 index 0000000..3dd26ea --- /dev/null +++ b/src/components/SchemaTable/formats.json @@ -0,0 +1,17 @@ +{ + string: ['default', 'email', 'uri', 'binary', 'uuid'], + number: ['default'], + integer: ['default'], + boolean: ['default'], + object: ['default'], + array: ['default'], + date: ['default', 'custom', 'any'], + time: ['default', 'custom', 'any'], + datetime: ['default', 'custom', 'any'], + year: ['default'], + yearmonth: ['default'], + duration: ['default'], + geopoint: ['default', 'array', 'object'], + geojson: ['default', 'topojson'], + any: ['default'], +} diff --git a/src/components/SchemaTable/index.js b/src/components/SchemaTable/index.js new file mode 100644 index 0000000..2d54116 --- /dev/null +++ b/src/components/SchemaTable/index.js @@ -0,0 +1,181 @@ +import React from 'react'; +import 'react-table/react-table.css'; +import ReactTable from 'react-table'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faEdit } from '@fortawesome/free-solid-svg-icons' +import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons' +import Loader from 'react-loader'; + +const fieldTypes = { + string: ['default', 'email', 'uri', 'binary', 'uuid'], + number: ['default'], + integer: ['default'], + boolean: ['default'], + object: ['default'], + array: ['default'], + date: ['default', 'custom', 'any'], + time: ['default', 'custom', 'any'], + datetime: ['default', 'custom', 'any'], + year: ['default'], + yearmonth: ['default'], + duration: ['default'], + geopoint: ['default', 'array', 'object'], + geojson: ['default', 'topojson'], + any: ['default'], +}; + +const options = Object.keys(fieldTypes).map((r) => r ); + +const formats = (type) => { + return fieldTypes[type]; +} + + +const Errors = (props) => { + const errors = props.errors; + let report = (

    Tidy Data!

    Your data has no validation errors.

    ); + if (errors.length > 0) { + const errorNotices = errors.map((error) => { + return
  • {error.message} in Row {error.row} in column {error.field}.
  • ; + }); + report = (

    Validation Warning

      {errorNotices}
    ); + }; + return ( + report + ) +} +export default class SchemaTable extends React.Component { + + colorCheck(n) { + if (n === 1) { + return {n} + } + return {n} + } + + typeSelect(value, index, column, tableSchema, updateTableSchemaType) { + let selectOptions = options.map((option) => { + const key = `${value}-${option}-${index}`; + return + }); + return + } + + formatSelect(value, index, column, tableSchema, updateTableSchemaFormat) { + let selectOptions = formats(value.type).map((option) => { + const key = `${value}-${option}-${index}`; + return + }); + return + } + + schemaCell(props, tableSchema, updateTableSchemaType, updateTableSchemaFormat, updateTableSchemaDesc) { + const column = props.column.Header; + if (props.index === 0) { + return ( +
    + +
    + ) + } else if (props.index === 1) { + return ( +
    + {this.typeSelect(props.value, props.index, column, tableSchema, updateTableSchemaType)} +
    + ) + } else if (props.index === 2) { + return ( +
    + {this.formatSelect(props.value, props.index, column, tableSchema, updateTableSchemaFormat)} +
    + ) + } + else { + return( +
    + {props.value}; +
    + ) + } + } + + findError(rowNumber, field, errors) { + return errors.some((error) => { + return error.row === rowNumber && error.field === field; + }); + } + + renderEditable(cellInfo, updateDataFromCell, data, errors) { + let color = "white"; + if (this.findError(cellInfo.index, cellInfo.column.Header, errors)) { + color = "red"; + } + + return ( +
    { + updateDataFromCell(e, cellInfo); + }} + dangerouslySetInnerHTML={{ + __html: data[cellInfo.index][cellInfo.column.id] + }} + /> + ); + } + render() { + const { data, defaultPageSize, columns, tableSchema, updateTableSchemaType, updateTableSchemaFormat, updateTableSchemaDesc, updateDataFromCell, errors } = this.props; + const desc = Object.values(tableSchema).reduce((r, v) => { const desc = 'desc' in v ? v.desc : ""; r[v.name] = desc; return r; }, {}); + const type = Object.values(tableSchema).reduce((r, v) => { r[v.name] = v.type; return r; }, {}); + const format = Object.values(tableSchema).reduce((r, v) => { const format = {}; format.type= v.type; format.format = v.format; r[v.name] = format; return r; }, {}); + const schemaData = [desc, type, format]; + const scols = JSON.parse(JSON.stringify(columns)); + const schemaCols = scols.map((c) => { + c.Cell = (props) => this.schemaCell(props, tableSchema, updateTableSchemaType, updateTableSchemaFormat, updateTableSchemaDesc); + return c; + }); + const dcols = JSON.parse(JSON.stringify(columns)); + const dataCols = dcols.map((c) => { + c.Cell = (props) => this.renderEditable(props, updateDataFromCell, data, errors); + return c; + }); + return ( +
    +
    +
    +
    Name
    +
    Description
    +
    Type
    +
    Format
    +
    +
    +
    + {tableSchema ? ( + + ) : ( + + )} + + +
    + +
    +
    +
    +
    + ); + } +} diff --git a/src/components/Sidebar/Wrapper.js b/src/components/Sidebar/Wrapper.js new file mode 100644 index 0000000..3194005 --- /dev/null +++ b/src/components/Sidebar/Wrapper.js @@ -0,0 +1,9 @@ +import styled from "styled-components"; + +const Wrapper = styled.aside` + margin-bottom: -400px; + padding-bottom: 400px; + max-width: 150px; +`; + +export default Wrapper; diff --git a/src/components/Sidebar/index.js b/src/components/Sidebar/index.js new file mode 100644 index 0000000..157162b --- /dev/null +++ b/src/components/Sidebar/index.js @@ -0,0 +1,46 @@ +import React from 'react'; +import Wrapper from './Wrapper'; +import { Link } from 'react-router-dom'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faTachometerAlt } from '@fortawesome/free-solid-svg-icons' +import { faLockOpen } from '@fortawesome/free-solid-svg-icons' +import { faPeopleCarry } from '@fortawesome/free-solid-svg-icons' +import { faPlusCircle } from '@fortawesome/free-solid-svg-icons' +import { faAnchor } from '@fortawesome/free-solid-svg-icons' + + +class Sidebar extends React.Component { + + render() { + return ( + + + + ); + } +} + +export default Sidebar; diff --git a/src/context/DatasetContext.js b/src/context/DatasetContext.js new file mode 100644 index 0000000..46bdb5c --- /dev/null +++ b/src/context/DatasetContext.js @@ -0,0 +1,28 @@ +import React from 'react' +import datasets from '../api/dataset'; + +const DatasetContext = React.createContext() + +class DatasetProvider extends React.Component { + state = { + datasets: datasets + } + + + render() { + console.log(this.state.datasets); + return ( + + {this.props.children} + + ) + } +} + +const DatasetConsumer = DatasetContext.Consumer; + +export { DatasetProvider, DatasetConsumer } diff --git a/src/context/FileContext.js b/src/context/FileContext.js new file mode 100644 index 0000000..e181b5b --- /dev/null +++ b/src/context/FileContext.js @@ -0,0 +1,241 @@ +import React from 'react' +import Papa from 'papaparse'; +import {castInteger, castNumber, castBoolean} from './cast'; +import {validateDataset} from './validate'; +const {Table} = require('tableschema') +//import DataJS from 'data.js'; + +const FileContext = React.createContext() +const initialState = { + file: false, + data: null, + type: null, + metadata: {}, + step: "home", + errors: [], + tableSchema: {} +} +class FileProvider extends React.Component { + state = initialState; + + constructor() { + super(); + this.fileUpload = this.fileUpload.bind(this); + this.stepChange = this.stepChange.bind(this); + this.updateMetadata = this.updateMetadata.bind(this); + this.loadDefault = this.loadDefault.bind(this); + this.cancelUpload = this.cancelUpload.bind(this); + this.updateTableSchemaType = this.updateTableSchemaType.bind(this); + this.updateTableSchemaFormat = this.updateTableSchemaFormat.bind(this); + this.updateTableSchemaDesc = this.updateTableSchemaDesc.bind(this); + this.updateDataFromCell = this.updateDataFromCell.bind(this); + + } + + updateDataFromCell(e, cellInfo) { + const value = e.target.innerHTML; + const data = Object.assign(this.state.data, {}); + data.data[cellInfo.index][cellInfo.column.id] = value; + this.validate(data); + this.setState({data}); + } + + updateTableSchemaType(e) { + const column = e.target.dataset.tag; + const value = e.target.value; + const tableSchema = this.state.tableSchema.map((r) => { + if (r.name === column) { + r.type = value; + r.format = "default"; + } + return r; + }); + this.validate(this.state.data); + this.setState({tableSchema}); + } + + updateTableSchemaFormat(e) { + const column = e.target.dataset.tag; + const value = e.target.value; + const tableSchema = this.state.tableSchema.map((r) => { + if (r.name === column) { + r.format = value; + } + return r; + }); + this.validate(this.state.data); + this.setState({tableSchema}); + } + + updateTableSchemaDesc(e) { + const column = e.target.dataset.tag; + const value = e.target.value; + const tableSchema = this.state.tableSchema.map((r) => { + if (r.name === column) { + r.desc = value; + } + return r; + }); + this.validate(this.state.data); + this.setState({tableSchema}); + } + + fileData(file) { + return Papa.parse(file, { + complete: (data) => { + data.cols = data.meta.fields.map((key) => { + key = key ? key : ' '; + return { + Header: key, + accessor: key, + } + }); + this.tableSchemaData(file, data); + this.setState({data}); + }, + header: true + }); + } + + validate(data) { + const tableSchema = this.state.tableSchema; + const errors = validateDataset(data, tableSchema); + this.setState({errors}); + } + + cast(item, type) { + switch(type) { + case "integer": + item = castInteger(type, item); + break; + case "number": + item = castNumber(type, item); + break; + case "bolean": + item = castBoolean(type, item); + break; + default: + break; + } + return item; + } + + castData(unCastData, tableSchema) { + const data = unCastData.data.map((row) => { + Object.values(tableSchema).forEach((col) => { + const type = col.type; + const item = row[col.name]; + const cast = this.cast(item, type); + row[col.name] = cast; + }); + return row; + }); + this.setState(data); + } + + async tableSchemaData(file, data) { + // TODO: We are loading the file twice. + const table = await Table.load(file, {delimiter: ','}); + await table.infer() + const tableSchema = table.schema.descriptor.fields; + this.setState({tableSchema}); + this.validate(data); + } + + cancelUpload() { + this.setState(initialState); + } + + updateMetadata(e) { + // This means we are using the json schema form. + if ('edit' in e) { + const metadata = e.formData; + this.setState({metadata}); + } + else { + const metadata = this.state.metadata; + metadata.title = e.target.value + this.setState({metadata}); + } + } + + loadDefault(e) { + const remoteFile = "https://s3.amazonaws.com/dkan-default-content-files/files/Polling_Places_Madison_0.csv"; + Papa.parse(remoteFile, { + download: true, + complete: (data) => { + // It grabs an extra empty row for some reason. + data.data.splice(-1,1); + data.cols = data.meta.fields.map((key) => { + key = key ? key : ' '; + return { + Header: key, + accessor: key, + } + }); + const file = { + name: "Polling_Places_Madison.csv", + size: 17653 + } + this.tableSchemaData(remoteFile, data); + // Start with the file name if we don't have a title yet. + const metadata = 'title' in this.state.metadata ? this.state.metadata : {title: file.name}; + this.setState({data, metadata, file, step: "preview"}); + }, + header: true + }); + } + + async fileUpload(e) { + const file = e.target.files[0]; + if (file.type === 'text/csv') { + this.fileData(file); + // Start with the file name if we don't have a title yet. + const metadata = 'title' in this.state.metadata ? this.state.metadata : {title: file.name}; + this.setState({ file, metadata, type: null, step: "preview" }); + } else { + this.setState({ type: "wrong"}); + } + } + + stepChange(e) { + const step = e.target.attributes.getNamedItem('data').value; + this.setState({step: step}); + } + + render() { + + return ( + + {this.props.children} + + ) + } +} + +const FileConsumer = FileContext.Consumer + +export { FileProvider, FileConsumer } diff --git a/src/context/GroupContext.js b/src/context/GroupContext.js new file mode 100644 index 0000000..aced5fb --- /dev/null +++ b/src/context/GroupContext.js @@ -0,0 +1,31 @@ +import React from 'react' +import datasets from '../api/organization'; + +const GroupContext = React.createContext() + +class GroupProvider extends React.Component { + state = { + datasets: datasets + } + + + render() { + const datasets = this.state.datasets.map((d) => { + d.edit = "edit"; + return d; + }); + return ( + + {this.props.children} + + ) + } +} + +const GroupConsumer = GroupContext.Consumer; + +export { GroupProvider, GroupConsumer } diff --git a/src/context/cast/any.js b/src/context/cast/any.js new file mode 100644 index 0000000..a1ecd1b --- /dev/null +++ b/src/context/cast/any.js @@ -0,0 +1,10 @@ +// Module API + +function castAny(format, value) { + return value +} + + +module.exports = { + castAny, +} diff --git a/src/context/cast/array.js b/src/context/cast/array.js new file mode 100644 index 0000000..68005bc --- /dev/null +++ b/src/context/cast/array.js @@ -0,0 +1,28 @@ +const isArray = require('lodash/isArray') +const isString = require('lodash/isString') +const {ERROR} = require('./config') + + +// Module API + +function castArray(format, value) { + if (!isArray(value)) { + if (!isString(value)) { + return ERROR + } + try { + value = JSON.parse(value) + } catch (error) { + return ERROR + } + if (!isArray(value)) { + return ERROR + } + } + return value +} + + +module.exports = { + castArray +} diff --git a/src/context/cast/boolean.js b/src/context/cast/boolean.js new file mode 100644 index 0000000..f6fe018 --- /dev/null +++ b/src/context/cast/boolean.js @@ -0,0 +1,34 @@ +const isString = require('lodash/isString') +const isBoolean = require('lodash/isBoolean') +const {ERROR} = require('./config') + + +// Module API + +function castBoolean(format, value, options={}) { + if (!isBoolean(value)) { + if (!isString(value)) { + return ERROR + } + value = value.trim() + if ((options.trueValues || _TRUE_VALUES).includes(value)) { + value = true + } else if ((options.falseValues || _FALSE_VALUES).includes(value)) { + value = false + } else { + return ERROR + } + } + return value +} + + +module.exports = { + castBoolean, +} + + +// Internal + +const _TRUE_VALUES = ['true', 'True', 'TRUE', '1'] +const _FALSE_VALUES = ['false', 'False', 'FALSE', '0'] diff --git a/src/context/cast/config.js b/src/context/cast/config.js new file mode 100644 index 0000000..a9a76c2 --- /dev/null +++ b/src/context/cast/config.js @@ -0,0 +1,26 @@ +// Module API + +const ERROR = 'tableschema.error' +const INFER_THRESHOLD = 10 +const INFER_CONFIDENCE = 0.75 +const DEFAULT_FORMAT = 'csv' +const DEFAULT_ENCODING = 'utf-8' +const DEFAULT_FIELD_TYPE = 'string' +const DEFAULT_FIELD_FORMAT = 'default' +const DEFAULT_MISSING_VALUES = [''] +const IS_BROWSER = (typeof window !== 'undefined') + + +// System + +module.exports = { + ERROR, + INFER_THRESHOLD, + INFER_CONFIDENCE, + DEFAULT_FORMAT, + DEFAULT_ENCODING, + DEFAULT_FIELD_TYPE, + DEFAULT_FIELD_FORMAT, + DEFAULT_MISSING_VALUES, + IS_BROWSER, +} diff --git a/src/context/cast/date.js b/src/context/cast/date.js new file mode 100644 index 0000000..694440a --- /dev/null +++ b/src/context/cast/date.js @@ -0,0 +1,48 @@ +const moment = require('moment') +const isDate = require('lodash/isDate') +const isString = require('lodash/isString') +const {timeParse} = require('d3-time-format') +const {ERROR} = require('./config') + + +// Module API + +function castDate(format, value) { + if (!isDate(value)) { + if (!isString(value)) { + return ERROR + } + try { + if (format === 'default') { + value = moment(timeParse(_DEFAULT_PATTERN)(value)) + } else if (format === 'any') { + value = moment(value) + } else { + if (format.startsWith('fmt:')) { + console.warn( + `Format "fmt:" is deprecated. + Please use "" without "fmt:" prefix.`) + format = format.replace('fmt:', '') + } + value = moment(timeParse(format)(value)) + } + if (!value.isValid()) { + return ERROR + } + value = value.toDate() + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castDate +} + + +// Internal + +const _DEFAULT_PATTERN = '%Y-%m-%d' diff --git a/src/context/cast/datetime.js b/src/context/cast/datetime.js new file mode 100644 index 0000000..c6c9540 --- /dev/null +++ b/src/context/cast/datetime.js @@ -0,0 +1,48 @@ +const moment = require('moment') +const isDate = require('lodash/isDate') +const isString = require('lodash/isString') +const {timeParse} = require('d3-time-format') +const {ERROR} = require('./config') + + +// Module API + +function castDatetime(format, value) { + if (!isDate(value)) { + if (!isString(value)) { + return ERROR + } + try { + if (format === 'default') { + value = moment(timeParse(_DEFAULT_PATTERN)(value)) + } else if (format === 'any') { + value = moment(value) + } else { + if (format.startsWith('fmt:')) { + console.warn( + `Format "fmt:" is deprecated. + Please use "" without "fmt:" prefix.`) + format = format.replace('fmt:', '') + } + value = moment(timeParse(format)(value)) + } + if (!value.isValid()) { + return ERROR + } + value = value.toDate() + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castDatetime, +} + + +// Internal + +const _DEFAULT_PATTERN = '%Y-%m-%dT%H:%M:%SZ' diff --git a/src/context/cast/duration.js b/src/context/cast/duration.js new file mode 100644 index 0000000..f8dc218 --- /dev/null +++ b/src/context/cast/duration.js @@ -0,0 +1,31 @@ +const moment = require('moment') +const isString = require('lodash/isString') +const {ERROR} = require('./config') + + +// Module API + +function castDuration(format, value) { + if (!moment.isDuration(value)) { + if (!isString(value)) { + return ERROR + } + try { + if (!value.startsWith('P')) { + return ERROR + } + value = moment.duration(value) + if (!value.as('milliseconds')) { + return ERROR + } + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castDuration, +} diff --git a/src/context/cast/geojson.js b/src/context/cast/geojson.js new file mode 100644 index 0000000..ee94dc3 --- /dev/null +++ b/src/context/cast/geojson.js @@ -0,0 +1,51 @@ +const tv4 = require('tv4') +const isObject = require('lodash/isObject') +const isString = require('lodash/isString') +const isPlainObject = require('lodash/isPlainObject') +const geojsonProfile = require('./geojson.json') +const topojsonProfile = require('./topojson.json') +const {ERROR} = require('./config') + + +// Module API + +function castGeojson(format, value) { + if (!isObject(value)) { + if (!isString(value)) { + return ERROR + } + try { + value = JSON.parse(value) + } catch (error) { + return ERROR + } + if (!isPlainObject(value)) { + return ERROR + } + } + if (format === 'default') { + try { + const valid = tv4.validate(value, geojsonProfile) + if (!valid) { + return ERROR + } + } catch (error) { + return ERROR + } + } else if (format === 'topojson') { + try { + const valid = tv4.validate(value, topojsonProfile) + if (!valid) { + return ERROR + } + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castGeojson, +} diff --git a/src/context/cast/geojson.json b/src/context/cast/geojson.json new file mode 100644 index 0000000..5863570 --- /dev/null +++ b/src/context/cast/geojson.json @@ -0,0 +1,208 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/fge/sample-json-schemas/master/geojson/geojson.json#", + "title": "Geo JSON object", + "description": "Schema for a Geo JSON object", + "type": "object", + "required": [ "type" ], + "properties": { + "crs": { "$ref": "#/definitions/crs" }, + "bbox": { "$ref": "#/definitions/bbox" } + }, + "oneOf": [ + { "$ref": "#/definitions/geometry" }, + { "$ref": "#/definitions/geometryCollection" }, + { "$ref": "#/definitions/feature" }, + { "$ref": "#/definitions/featureCollection" } + ], + "definitions": { + "geometryCollection": { + "title": "GeometryCollection", + "description": "A collection of geometry objects", + "required": [ "geometries" ], + "properties": { + "type": { "enum": [ "GeometryCollection" ] }, + "geometries": { + "type": "array", + "items": { "$ref": "#/definitions/geometry" } + } + } + }, + "feature": { + "title": "Feature", + "description": "A Geo JSON feature object", + "required": [ "geometry", "properties" ], + "properties": { + "type": { "enum": [ "Feature" ] }, + "geometry": { + "oneOf": [ + { "type": "null" }, + { "$ref": "#/definitions/geometry" } + ] + }, + "properties": { "type": [ "object", "null" ] }, + "id": { "FIXME": "may be there, type not known (string? number?)" } + } + }, + "featureCollection": { + "title": "FeatureCollection", + "description": "A Geo JSON feature collection", + "required": [ "features" ], + "properties": { + "type": { "enum": [ "FeatureCollection" ] }, + "features": { + "type": "array", + "items": { "$ref": "#/definitions/feature" } + } + } + }, + "geometry": { + "title": "geometry", + "description": "One geometry as defined by GeoJSON", + "type": "object", + "required": [ "type", "coordinates" ], + "oneOf": [ + { + "title": "Point", + "properties": { + "type": { "enum": [ "Point" ] }, + "coordinates": { "$ref": "#/definitions/geometry/definitions/position" } + } + }, + { + "title": "MultiPoint", + "properties": { + "type": { "enum": [ "MultiPoint" ] }, + "coordinates": { "$ref": "#/definitions/geometry/definitions/positionArray" } + } + }, + { + "title": "LineString", + "properties": { + "type": { "enum": [ "LineString" ] }, + "coordinates": { "$ref": "#/definitions/geometry/definitions/lineString" } + } + }, + { + "title": "MultiLineString", + "properties": { + "type": { "enum": [ "MultiLineString" ] }, + "coordinates": { + "type": "array", + "items": { "$ref": "#/definitions/geometry/definitions/lineString" } + } + } + }, + { + "title": "Polygon", + "properties": { + "type": { "enum": [ "Polygon" ] }, + "coordinates": { "$ref": "#/definitions/geometry/definitions/polygon" } + } + }, + { + "title": "MultiPolygon", + "properties": { + "type": { "enum": [ "MultiPolygon" ] }, + "coordinates": { + "type": "array", + "items": { "$ref": "#/definitions/geometry/definitions/polygon" } + } + } + } + ], + "definitions": { + "position": { + "description": "A single position", + "type": "array", + "minItems": 2, + "items": [ { "type": "number" }, { "type": "number" } ], + "additionalItems": false + }, + "positionArray": { + "description": "An array of positions", + "type": "array", + "items": { "$ref": "#/definitions/geometry/definitions/position" } + }, + "lineString": { + "description": "An array of two or more positions", + "allOf": [ + { "$ref": "#/definitions/geometry/definitions/positionArray" }, + { "minItems": 2 } + ] + }, + "linearRing": { + "description": "An array of four positions where the first equals the last", + "allOf": [ + { "$ref": "#/definitions/geometry/definitions/positionArray" }, + { "minItems": 4 } + ] + }, + "polygon": { + "description": "An array of linear rings", + "type": "array", + "items": { "$ref": "#/definitions/geometry/definitions/linearRing" } + } + } + }, + "crs": { + "title": "crs", + "description": "a Coordinate Reference System object", + "type": [ "object", "null" ], + "required": [ "type", "properties" ], + "properties": { + "type": { "type": "string" }, + "properties": { "type": "object" } + }, + "additionalProperties": false, + "oneOf": [ + { "$ref": "#/definitions/crs/definitions/namedCrs" }, + { "$ref": "#/definitions/crs/definitions/linkedCrs" } + ], + "definitions": { + "namedCrs": { + "properties": { + "type": { "enum": [ "name" ] }, + "properties": { + "required": [ "name" ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "FIXME": "semantic validation necessary" + } + } + } + } + }, + "linkedObject": { + "type": "object", + "required": [ "href" ], + "properties": { + "href": { + "type": "string", + "format": "uri", + "FIXME": "spec says \"dereferenceable\", cannot enforce that" + }, + "type": { + "type": "string", + "description": "Suggested values: proj4, ogjwkt, esriwkt" + } + } + }, + "linkedCrs": { + "properties": { + "type": { "enum": [ "link" ] }, + "properties": { "$ref": "#/definitions/crs/definitions/linkedObject" } + } + } + } + }, + "bbox": { + "description": "A bounding box as defined by GeoJSON", + "FIXME": "unenforceable constraint: even number of elements in array", + "type": "array", + "items": { "type": "number" } + } + } +} diff --git a/src/context/cast/index.js b/src/context/cast/index.js new file mode 100644 index 0000000..9036f2a --- /dev/null +++ b/src/context/cast/index.js @@ -0,0 +1,34 @@ +const {castAny} = require('./any') +const {castArray} = require('./array') +const {castBoolean} = require('./boolean') +const {castDate} = require('./date') +const {castDatetime} = require('./datetime') +const {castDuration} = require('./duration') +const {castGeojson} = require('./geojson') +const {castInteger} = require('./integer') +const {castNumber} = require('./number') +const {castObject} = require('./object') +const {castString} = require('./string') +const {castTime} = require('./time') +const {castYear} = require('./year') +const {castYearmonth} = require('./yearmonth') + + +// Module API + +module.exports = { + castAny, + castArray, + castBoolean, + castDate, + castDatetime, + castDuration, + castGeojson, + castInteger, + castNumber, + castObject, + castString, + castTime, + castYear, + castYearmonth, +} diff --git a/src/context/cast/integer.js b/src/context/cast/integer.js new file mode 100644 index 0000000..99777ce --- /dev/null +++ b/src/context/cast/integer.js @@ -0,0 +1,29 @@ +const isNaN = require('lodash/isNaN') +const isString = require('lodash/isString') +const isInteger = require('lodash/isInteger') +const {ERROR} = require('./config') + + +// Module API + +function castInteger(format, value, options={}) { + if (!isInteger(value)) { + if (!isString(value)) return ERROR + if (options.bareNumber === false) { + value = value.replace(new RegExp('((^\\D*)|(\\D*$))', 'g'), '') + } + try { + const result = parseInt(value, 10) + if (isNaN(result) || result.toString() !== value) return ERROR + value = result + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castInteger, +} diff --git a/src/context/cast/number.js b/src/context/cast/number.js new file mode 100644 index 0000000..339dea3 --- /dev/null +++ b/src/context/cast/number.js @@ -0,0 +1,43 @@ +const isNaN = require('lodash/isNaN') +const isString = require('lodash/isString') +const isNumber = require('lodash/isNumber') +const toNumber = require('lodash/toNumber') +const {ERROR} = require('./config') + + +// Module API + +function castNumber(format, value, options={}) { + const decimalChar = options.decimalChar || _DEFAULT_DECIMAL_CHAR + const groupChar = options.groupChar || _DEFAULT_GROUP_CHAR + if (!isNumber(value)) { + if (!isString(value)) return ERROR + if (!value.length) return ERROR + value = value.replace(new RegExp('\\s', 'g'), '') + value = value.replace(new RegExp(`[${decimalChar}]`, 'g'), '.') + value = value.replace(new RegExp(`[${groupChar}]`, 'g'), '') + if (options.bareNumber === false) { + value = value.replace(new RegExp('((^\\D*)|(\\D*$))', 'g'), '') + } + try { + value = toNumber(value) + } catch (error) { + return ERROR + } + } + if (isNaN(value)) { + return ERROR + } + return value +} + + +module.exports = { + castNumber, +} + + +// Internal + +const _DEFAULT_DECIMAL_CHAR = '.' +const _DEFAULT_GROUP_CHAR = '' diff --git a/src/context/cast/object.js b/src/context/cast/object.js new file mode 100644 index 0000000..c3afe2b --- /dev/null +++ b/src/context/cast/object.js @@ -0,0 +1,28 @@ +const isString = require('lodash/isString') +const isPlainObject = require('lodash/isPlainObject') +const {ERROR} = require('./config') + + +// Module API + +function castObject(format, value) { + if (!isPlainObject(value)) { + if (!isString(value)) { + return ERROR + } + try { + value = JSON.parse(value) + } catch (error) { + return ERROR + } + if (!isPlainObject(value)) { + return ERROR + } + } + return value +} + + +module.exports = { + castObject, +} diff --git a/src/context/cast/string.js b/src/context/cast/string.js new file mode 100644 index 0000000..9b17e10 --- /dev/null +++ b/src/context/cast/string.js @@ -0,0 +1,38 @@ +const isBase64 = require('validator/lib/isBase64') +const isEmail = require('validator/lib/isEmail') +const isUUID = require('validator/lib/isUUID') +const isURL = require('validator/lib/isURL') +const isString = require('lodash/isString') +const {ERROR} = require('./config') + + +// Module API + +function castString(format, value) { + if (!isString(value)) { + return ERROR + } + if (format === 'uri') { + if (!isURL(value, {require_protocol: true})) { + return ERROR + } + } else if (format === 'email') { + if (!isEmail(value)) { + return ERROR + } + } else if (format === 'uuid') { + if (!isUUID(value)) { + return ERROR + } + } else if (format === 'binary') { + if (!value.endsWith('==') || !isBase64(value)) { + return ERROR + } + } + return value +} + + +module.exports = { + castString, +} diff --git a/src/context/cast/table-schema.json b/src/context/cast/table-schema.json new file mode 100644 index 0000000..a264d4f --- /dev/null +++ b/src/context/cast/table-schema.json @@ -0,0 +1,1560 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Table Schema", + "description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.", + "type": "object", + "required": [ + "fields" + ], + "properties": { + "fields": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Field", + "type": "object", + "anyOf": [ + { + "type": "object", + "title": "String Field", + "description": "The field contains strings, that is, sequences of characters.", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `string`.", + "enum": [ + "string" + ] + }, + "format": { + "description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.", + "context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.", + "enum": [ + "default", + "email", + "uri", + "binary", + "uuid" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `string` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Number Field", + "description": "The field contains numbers of any kind including decimals.", + "context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `number`.", + "enum": [ + "number" + ] + }, + "format": { + "description": "There are no format keyword options for `number`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "decimalChar": { + "type": "string", + "description": "A string whose value is used to represent a decimal point within the number. The default value is `.`." + }, + "groupChar": { + "type": "string", + "description": "A string whose value is used to group digits within the number. The default value is `null`. A common value is `,` e.g. '100,000'." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `number` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "number" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n", + "{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Integer Field", + "description": "The field contains integers - that is whole numbers.", + "context": "Integer values are indicated in the standard way for any valid integer.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `integer`.", + "enum": [ + "integer" + ] + }, + "format": { + "description": "There are no format keyword options for `integer`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `integer` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"age\",\n \"type\": \"integer\",\n \"constraints\": {\n \"unique\": true,\n \"minimum\": 100,\n \"maximum\": 9999\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Date Field", + "description": "The field contains temporal date values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `date`.", + "enum": [ + "date" + ] + }, + "format": { + "description": "The format keyword options for `date` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string of YYYY-MM-DD.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `date` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\"\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"constraints\": {\n \"minimum\": \"01-01-1900\"\n }\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"format\": \"MM-DD-YYYY\"\n}\n" + ] + }, + { + "type": "object", + "title": "Time Field", + "description": "The field contains temporal time values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `time`.", + "enum": [ + "time" + ] + }, + "format": { + "description": "The format keyword options for `time` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for time.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `time` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\"\n}\n", + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\",\n \"format\": \"any\"\n}\n" + ] + }, + { + "type": "object", + "title": "Date Time Field", + "description": "The field contains temporal datetime values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `datetime`.", + "enum": [ + "datetime" + ] + }, + "format": { + "description": "The format keyword options for `datetime` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for datetime.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `datetime` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\"\n}\n", + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\",\n \"format\": \"default\"\n}\n" + ] + }, + { + "type": "object", + "title": "Year Field", + "description": "A calendar year, being an integer with 4 digits. Equivalent to [gYear in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYear)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `year`.", + "enum": [ + "year" + ] + }, + "format": { + "description": "There are no format keyword options for `year`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `year` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"year\",\n \"type\": \"year\"\n}\n", + "{\n \"name\": \"year\",\n \"type\": \"year\",\n \"constraints\": {\n \"minimum\": 1970,\n \"maximum\": 2003\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Year Month Field", + "description": "A calendar year month, being an integer with 1 or 2 digits. Equivalent to [gYearMonth in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYearMonth)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `yearmonth`.", + "enum": [ + "yearmonth" + ] + }, + "format": { + "description": "There are no format keyword options for `yearmonth`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `yearmonth` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\"\n}\n", + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\",\n \"constraints\": {\n \"minimum\": 1,\n \"maximum\": 6\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Boolean Field", + "description": "The field contains boolean (true/false) data.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `boolean`.", + "enum": [ + "boolean" + ] + }, + "trueValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "true", + "True", + "TRUE", + "1" + ] + }, + "falseValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "false", + "False", + "FALSE", + "0" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `boolean` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "boolean" + } + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"registered\",\n \"type\": \"boolean\"\n}\n" + ] + }, + { + "type": "object", + "title": "Object Field", + "description": "The field contains data which can be parsed as a valid JSON object.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `object`.", + "enum": [ + "object" + ] + }, + "format": { + "description": "There are no format keyword options for `object`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `object` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"extra\"\n \"type\": \"object\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoPoint Field", + "description": "The field contains data describing a geographic point.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geopoint`.", + "enum": [ + "geopoint" + ] + }, + "format": { + "description": "The format keyword options for `geopoint` are `default`,`array`, and `object`.", + "context": "The following `format` options are supported:\n * **default**: A string of the pattern 'lon, lat', where `lon` is the longitude and `lat` is the latitude.\n * **array**: An array of exactly two items, where each item is either a number, or a string parsable as a number, and the first item is `lon` and the second item is `lat`.\n * **object**: A JSON object with exactly two keys, `lat` and `lon`", + "notes": [ + "Implementations `MUST` strip all white space in the default format of `lon, lat`." + ], + "enum": [ + "default", + "array", + "object" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geopoint` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\"\n}\n", + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\",\n \"format\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoJSON Field", + "description": "The field contains a JSON object according to GeoJSON or TopoJSON", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geojson`.", + "enum": [ + "geojson" + ] + }, + "format": { + "description": "The format keyword options for `geojson` are `default` and `topojson`.", + "context": "The following `format` options are supported:\n * **default**: A geojson object as per the [GeoJSON spec](http://geojson.org/).\n * **topojson**: A topojson object as per the [TopoJSON spec](https://github.com/topojson/topojson-specification/blob/master/README.md)", + "enum": [ + "default", + "topojson" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geojson` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\"\n}\n", + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\",\n \"format\": \"topojson\"\n}\n" + ] + }, + { + "type": "object", + "title": "Array Field", + "description": "The field contains data which can be parsed as a valid JSON array.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `array`.", + "enum": [ + "array" + ] + }, + "format": { + "description": "There are no format keyword options for `array`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `array` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "Duration Field", + "description": "The field contains a duration of time.", + "context": "The lexical representation for duration is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) extended format `PnYnMnDTnHnMnS`, where `nY` represents the number of years, `nM` the number of months, `nD` the number of days, 'T' is the date/time separator, `nH` the number of hours, `nM` the number of minutes and `nS` the number of seconds. The number of seconds can include decimal digits to arbitrary precision. Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. Here we follow the definition of [XML Schema duration datatype](http://www.w3.org/TR/xmlschema-2/#duration) directly and that definition is implicitly inlined here.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `duration`.", + "enum": [ + "duration" + ] + }, + "format": { + "description": "There are no format keyword options for `duration`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `duration` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"period\"\n \"type\": \"duration\"\n}\n" + ] + }, + { + "type": "object", + "title": "Any Field", + "description": "Any value is accepted, including values that are not captured by the type/format/constraint requirements of the specification.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `any`.", + "enum": [ + "any" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply to `any` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"notes\",\n \"type\": \"any\"\n" + ] + } + ] + }, + "description": "An `array` of Table Schema Field objects.", + "examples": [ + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\"\n }\n ]\n}\n", + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\",\n \"type\": \"number\"\n },\n {\n \"name\": \"my-field-name-2\",\n \"type\": \"string\",\n \"format\": \"email\"\n }\n ]\n}\n" + ] + }, + "primaryKey": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], + "description": "A primary key is a field name or an array of field names, whose values `MUST` uniquely identify each row in the table.", + "context": "Field name in the `primaryKey` `MUST` be unique, and `MUST` match a field name in the associated table. It is acceptable to have an array with a single value, indicating that the value of a single field is the primary key.", + "examples": [ + "{\n \"primaryKey\": [\n \"name\"\n ]\n}\n", + "{\n \"primaryKey\": [\n \"first_name\",\n \"last_name\"\n ]\n}\n" + ] + }, + "foreignKeys": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Foreign Key", + "description": "Table Schema Foreign Key", + "type": "object", + "required": [ + "fields", + "reference" + ], + "oneOf": [ + { + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string", + "minItems": 1, + "uniqueItems": true, + "description": "Fields that make up the primary key." + } + }, + "reference": { + "type": "object", + "required": [ + "resource", + "fields" + ], + "properties": { + "resource": { + "type": "string", + "default": "" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + } + } + }, + { + "properties": { + "fields": { + "type": "string", + "description": "Fields that make up the primary key." + }, + "reference": { + "type": "object", + "required": [ + "resource", + "fields" + ], + "properties": { + "resource": { + "type": "string", + "default": "" + }, + "fields": { + "type": "string" + } + } + } + } + } + ] + }, + "examples": [ + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"the-resource\",\n \"fields\": \"state_id\"\n }\n }\n ]\n}\n", + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"\",\n \"fields\": \"id\"\n }\n }\n ]\n}\n" + ] + }, + "missingValues": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + } + }, + "examples": [ + "{\n \"schema\": {\n \"fields\": [\n {\n \"name\": \"first_name\",\n \"type\": \"string\"\n \"constraints\": {\n \"required\": true\n }\n },\n {\n \"name\": \"age\",\n \"type\": \"integer\"\n },\n ],\n \"primaryKey\": [\n \"name\"\n ]\n }\n}\n" + ] +} \ No newline at end of file diff --git a/src/context/cast/time.js b/src/context/cast/time.js new file mode 100644 index 0000000..923b1d1 --- /dev/null +++ b/src/context/cast/time.js @@ -0,0 +1,48 @@ +const moment = require('moment') +const isDate = require('lodash/isDate') +const isString = require('lodash/isString') +const {timeParse} = require('d3-time-format') +const {ERROR} = require('./config') + + +// Module API + +function castTime(format, value) { + if (!isDate(value)) { + if (!isString(value)) { + return ERROR + } + try { + if (format === 'default') { + value = moment(timeParse(_DEFAULT_PATTERN)(value)) + } else if (format === 'any') { + value = moment(value) + } else { + if (format.startsWith('fmt:')) { + console.warn( + `Format "fmt:" is deprecated. + Please use "" without "fmt:" prefix.`) + format = format.replace('fmt:', '') + } + value = moment(timeParse(format)(value)) + } + if (!value.isValid()) { + return ERROR + } + value = value.toDate() + } catch (error) { + return ERROR + } + } + return value +} + + +module.exports = { + castTime, +} + + +// Internal + +const _DEFAULT_PATTERN = '%H:%M:%S' diff --git a/src/context/cast/topojson.json b/src/context/cast/topojson.json new file mode 100644 index 0000000..9a76c93 --- /dev/null +++ b/src/context/cast/topojson.json @@ -0,0 +1,199 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/topojson.json#", + "title": "TopoJSON object", + "description": "Schema for a TopoJSON object", + "type": "object", + "required": [ "type" ], + "properties": { + "bbox": { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/bbox.json", + "title": "TopoJSON bounding box", + "description": "A bounding box as defined by TopoJSON", + "type": "array", + "items": { "$ref": "#/definitions/dimension" }, + "minItems": 2, + "maxItems": 2, + "definitions": { + "dimension": { + "type": "array", + "description": "This array should have an entry per dimension in the geometries", + "items": {"type": "number"} + } + }, + "TODO": "check number of dimensions (2*n), n being the number of dimensions represented in the contained geometries), with the lowest values for all axes followed by the highest values " + } + }, + "oneOf": [ + { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/topology.json", + "title": "Topology", + "description": "A Topology object as defined by TopoJSON", + "type": "object", + "required": [ "objects", "arcs" ], + "properties": { + "type": { "enum": [ "Topology"] }, + "objects": { + "type": "object", + "additionalProperties": {"$ref": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/geometry.json"} + }, + "arcs": {"$ref": "#/definitions/arcs"}, + "transform": {"$ref": "#/definitions/transform"}, + "bbox": { "$ref": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/bbox.json" } + }, + "definitions": { + "transform": { + "type": "object", + "required": [ "scale", "translate" ], + "properties": { + "scale": { + "type": "array", + "items": { "type": "number"}, + "minItems": 2 + }, + "translate": { + "type": "array", + "items": { "type": "number"}, + "minItems": 2 + } + } + }, + "arcs": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { "$ref": "#/definitions/position"}, + { "type": "null" } + ] + }, + "minItems": 2 + } + }, + "position": { + "type": "array", + "items": { "type": "number"}, + "minItems": 2 + } + } + }, + { + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/geometry.json", + "title": "Geometry objects", + "description": "A Geometry object as defined by TopoJSON", + "type": "object", + "required": [ "type" ], + "properties": { + "id": { "type": [ "string", "integer" ]}, + "properties": { "type": "object" } + }, + "oneOf": [ + { + "title": "Point", + "description": "A Point Geometry object as defined by TopoJSON", + "required": [ "type","coordinates" ], + "properties": { + "type": { "enum": [ "Point" ] }, + "coordinates": { "$ref": "#/definitions/position" } + } + }, + { + "title": "MultiPoint", + "description": "A MultiPoint Geometry object as defined by TopoJSON", + "required": [ "type","coordinates" ], + "properties": { + "type": { "enum": [ "MultiPoint" ] }, + "coordinates": { + "type": "array", + "items": { "$ref": "#/definitions/position" } + } + } + }, + { + "title": "LineString", + "description": "A LineString Geometry object as defined by TopoJSON", + "required": [ "type","arcs" ], + "properties": { + "type": { "enum": [ "LineString" ] }, + "arcs": { + "type": "array", + "items": { "type": "integer" } + } + } + }, + { + "title": "MultiLineString", + "description": "A MultiLineString Geometry object as defined by TopoJSON", + "required": [ "type","arcs" ], + "properties": { + "type": { "enum": [ "MultiLineString" ] }, + "arcs": { + "type": "array", + "items": { + "type": "array", + "items": {"type": "integer"} + } + } + } + }, + { + "title": "Polygon", + "description": "A Polygon Geometry object as defined by TopoJSON", + "required": [ "type","arcs" ], + "properties": { + "type": { "enum": [ "Polygon" ] }, + "arcs": { + "TODO": "Check if arcs refer to valid LinearRings", + "type": "array", + "items": { + "type": "array", + "items": {"type": "integer"} + } + } + } + }, + { + "title": "MultiPolygon", + "description": "A MultiPolygon Geometry object as defined by TopoJSON", + "required": [ "type","arcs" ], + "properties": { + "type": { "enum": [ "MultiPolygon" ] }, + "arcs": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "array", + "items": {"type": "integer"} + } + } + } + } + }, + { + "title": "GeometryCollection", + "description": "A MultiPolygon Geometry object as defined by TopoJSON", + "required": [ "type","geometries" ], + "properties": { + "type": { "enum": [ "GeometryCollection" ] }, + "geometries": { + "type": "array", + "items": { "$ref": "https://raw.githubusercontent.com/nhuebel/TopoJSON_schema/master/geometry.json" } + } + } + } + ], + "definitions": { + "position": { + "type": "array", + "items": { "type": "number"}, + "minItems": 2 + } + } + } + ] +} diff --git a/src/context/cast/year.js b/src/context/cast/year.js new file mode 100644 index 0000000..c726abb --- /dev/null +++ b/src/context/cast/year.js @@ -0,0 +1,36 @@ +const isNaN = require('lodash/isNaN') +const isString = require('lodash/isString') +const isInteger = require('lodash/isInteger') +const {ERROR} = require('./config') + + +// Module API + +function castYear(format, value) { + if (!isInteger(value)) { + if (!isString(value)) { + return ERROR + } + if (value.length !== 4) { + return ERROR + } + try { + const result = parseInt(value, 10) + if (isNaN(result) || result.toString() !== value) { + return ERROR + } + value = result + } catch (error) { + return ERROR + } + } + if (value < 0 || value > 9999) { + return ERROR + } + return value +} + + +module.exports = { + castYear, +} diff --git a/src/context/cast/yearmonth.js b/src/context/cast/yearmonth.js new file mode 100644 index 0000000..0e06830 --- /dev/null +++ b/src/context/cast/yearmonth.js @@ -0,0 +1,40 @@ +const isArray = require('lodash/isArray') +const isString = require('lodash/isString') +const {ERROR} = require('./config') + + +// Module API + +function castYearmonth(format, value) { + if (isArray(value)) { + if (value.length !== 2) { + return ERROR + } + } else if (isString(value)) { + try { + const items = value.split('-') + if (items.length !== 2) { + return ERROR + } + const year = parseInt(items[0], 10) + const month = parseInt(items[1], 10) + if (!year || !month) { + return ERROR + } + if (month < 1 || month > 12) { + return ERROR + } + value = [year, month] + } catch (error) { + return ERROR + } + } else { + return ERROR + } + return value +} + + +module.exports = { + castYearmonth, +} diff --git a/src/context/validate.js b/src/context/validate.js new file mode 100644 index 0000000..1fa3163 --- /dev/null +++ b/src/context/validate.js @@ -0,0 +1,63 @@ +import {castInteger, castNumber, castString} from './cast'; +import {isString, isInteger, isNumber, isBoolean} from 'lodash'; +function validateDataset(data, schema) { + let rowNumber = 0; + const errors = data.data.reduce((errors, row) => { + Object.values(schema).forEach((i) => { + if (!validateItem(row[i.name], i.type)) { + const error = { + row: rowNumber, + field: i.name, + message: `${row[i.name]} is not a valid ${i.type}` + }; + errors.push(error); + return errors; + } + }); + rowNumber++; + return errors; + }, []); + return errors; +} + +function validateItem(item, type) { + switch(type) { + case "string": + if (!isString(item)) { + if (!isString(castString("", item))) { + return false; + } + } + break; + case "integer": + if (!isInteger(item)) { + item = castInteger("", item); + if (!isInteger(castInteger("", item))) { + return false; + } + } + break; + case "number": + if (!isNumber(item)) { + if (!isNumber(castNumber("", item))) { + return false; + } + } + break; + case "boolean": + if (!isBoolean(item)) { + if (!(_TRUE_VALUES.includes(item) || _FALSE_VALUES.includes(item))) { + return false; + } + } + break; + default: + break; + } + return true; +} + +const _TRUE_VALUES = ['true', 'True', 'TRUE', '1'] +const _FALSE_VALUES = ['false', 'False', 'FALSE', '0'] + +export { validateDataset, validateItem } diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..86cbac5 --- /dev/null +++ b/src/index.js @@ -0,0 +1,8 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import 'bootstrap/dist/css/bootstrap.css'; +import './assets/css/fileupload.css'; +import './assets/css/custom.css'; +import App from './App'; + +ReactDOM.render(, document.getElementById('root')); diff --git a/src/schemas/simple/UISchema.json b/src/schemas/simple/UISchema.json new file mode 100644 index 0000000..2a0c631 --- /dev/null +++ b/src/schemas/simple/UISchema.json @@ -0,0 +1,7 @@ +{ + "dataset": { + "description": { + "ui:widget": "textarea" + } + } +} diff --git a/src/schemas/simple/dataset.json b/src/schemas/simple/dataset.json new file mode 100644 index 0000000..9cc7364 --- /dev/null +++ b/src/schemas/simple/dataset.json @@ -0,0 +1,33 @@ +{ + "title": "Dataset", + "description": "A simple dataset.", + "type": "object", + "required": [ + "title" + ], + "properties": { + "title": { + "type": "string", + "title": "Title" + }, + "license": { + "type": "string", + "title": "License", + "description": "A license for the dataset.", + "enum": ["License 1", "License 2"] + }, + "description": { + "type": "string", + "title": "Description" + }, + "created": { + "type": "string", + "title": "Created", + "format": "date-time" + }, + "author": { + "type": "string", + "title": "Author" + } + } +}