vega-datasets
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -7,70 +7,71 @@ (function (global, factory) { | ||
var version = "2.0.0-beta.1"; | ||
var urls = { | ||
'annual-precip.json': 'https://vega.github.io/vega-datasets/data/annual-precip.json', | ||
'anscombe.json': 'https://vega.github.io/vega-datasets/data/anscombe.json', | ||
'barley.json': 'https://vega.github.io/vega-datasets/data/barley.json', | ||
'budget.json': 'https://vega.github.io/vega-datasets/data/budget.json', | ||
'budgets.json': 'https://vega.github.io/vega-datasets/data/budgets.json', | ||
'burtin.json': 'https://vega.github.io/vega-datasets/data/burtin.json', | ||
'cars.json': 'https://vega.github.io/vega-datasets/data/cars.json', | ||
'countries.json': 'https://vega.github.io/vega-datasets/data/countries.json', | ||
'crimea.json': 'https://vega.github.io/vega-datasets/data/crimea.json', | ||
'driving.json': 'https://vega.github.io/vega-datasets/data/driving.json', | ||
'earthquakes.json': 'https://vega.github.io/vega-datasets/data/earthquakes.json', | ||
'flare-dependencies.json': 'https://vega.github.io/vega-datasets/data/flare-dependencies.json', | ||
'flare.json': 'https://vega.github.io/vega-datasets/data/flare.json', | ||
'flights-10k.json': 'https://vega.github.io/vega-datasets/data/flights-10k.json', | ||
'flights-200k.json': 'https://vega.github.io/vega-datasets/data/flights-200k.json', | ||
'flights-20k.json': 'https://vega.github.io/vega-datasets/data/flights-20k.json', | ||
'flights-2k.json': 'https://vega.github.io/vega-datasets/data/flights-2k.json', | ||
'flights-5k.json': 'https://vega.github.io/vega-datasets/data/flights-5k.json', | ||
'football.json': 'https://vega.github.io/vega-datasets/data/football.json', | ||
'gapminder.json': 'https://vega.github.io/vega-datasets/data/gapminder.json', | ||
'income.json': 'https://vega.github.io/vega-datasets/data/income.json', | ||
'iris.json': 'https://vega.github.io/vega-datasets/data/iris.json', | ||
'jobs.json': 'https://vega.github.io/vega-datasets/data/jobs.json', | ||
'londonBoroughs.json': 'https://vega.github.io/vega-datasets/data/londonBoroughs.json', | ||
'londonCentroids.json': 'https://vega.github.io/vega-datasets/data/londonCentroids.json', | ||
'londonTubeLines.json': 'https://vega.github.io/vega-datasets/data/londonTubeLines.json', | ||
'miserables.json': 'https://vega.github.io/vega-datasets/data/miserables.json', | ||
'monarchs.json': 'https://vega.github.io/vega-datasets/data/monarchs.json', | ||
'normal-2d.json': 'https://vega.github.io/vega-datasets/data/normal-2d.json', | ||
'obesity.json': 'https://vega.github.io/vega-datasets/data/obesity.json', | ||
'ohlc.json': 'https://vega.github.io/vega-datasets/data/ohlc.json', | ||
'points.json': 'https://vega.github.io/vega-datasets/data/points.json', | ||
'political-contributions.json': 'https://vega.github.io/vega-datasets/data/political-contributions.json', | ||
'population.json': 'https://vega.github.io/vega-datasets/data/population.json', | ||
'udistrict.json': 'https://vega.github.io/vega-datasets/data/udistrict.json', | ||
'unemployment-across-industries.json': 'https://vega.github.io/vega-datasets/data/unemployment-across-industries.json', | ||
'uniform-2d.json': 'https://vega.github.io/vega-datasets/data/uniform-2d.json', | ||
'us-10m.json': 'https://vega.github.io/vega-datasets/data/us-10m.json', | ||
'us-state-capitals.json': 'https://vega.github.io/vega-datasets/data/us-state-capitals.json', | ||
'volcano.json': 'https://vega.github.io/vega-datasets/data/volcano.json', | ||
'weather.json': 'https://vega.github.io/vega-datasets/data/weather.json', | ||
'wheat.json': 'https://vega.github.io/vega-datasets/data/wheat.json', | ||
'world-110m.json': 'https://vega.github.io/vega-datasets/data/world-110m.json', | ||
'airports.csv': 'https://vega.github.io/vega-datasets/data/airports.csv', | ||
'birdstrikes.csv': 'https://vega.github.io/vega-datasets/data/birdstrikes.csv', | ||
'co2-concentration.csv': 'https://vega.github.io/vega-datasets/data/co2-concentration.csv', | ||
'disasters.csv': 'https://vega.github.io/vega-datasets/data/disasters.csv', | ||
'flights-3m.csv': 'https://vega.github.io/vega-datasets/data/flights-3m.csv', | ||
'flights-airport.csv': 'https://vega.github.io/vega-datasets/data/flights-airport.csv', | ||
'gapminder-health-income.csv': 'https://vega.github.io/vega-datasets/data/gapminder-health-income.csv', | ||
'github.csv': 'https://vega.github.io/vega-datasets/data/github.csv', | ||
'iowa-electricity.csv': 'https://vega.github.io/vega-datasets/data/iowa-electricity.csv', | ||
'la-riots.csv': 'https://vega.github.io/vega-datasets/data/la-riots.csv', | ||
'lookup_groups.csv': 'https://vega.github.io/vega-datasets/data/lookup_groups.csv', | ||
'lookup_people.csv': 'https://vega.github.io/vega-datasets/data/lookup_people.csv', | ||
'movies.csv': 'https://vega.github.io/vega-datasets/data/movies.csv', | ||
'population_engineers_hurricanes.csv': 'https://vega.github.io/vega-datasets/data/population_engineers_hurricanes.csv', | ||
'seattle-weather-hourly.csv': 'https://vega.github.io/vega-datasets/data/seattle-weather-hourly.csv', | ||
'seattle-weather.csv': 'https://vega.github.io/vega-datasets/data/seattle-weather.csv', | ||
'sp500.csv': 'https://vega.github.io/vega-datasets/data/sp500.csv', | ||
'stocks.csv': 'https://vega.github.io/vega-datasets/data/stocks.csv', | ||
'us-employment.csv': 'https://vega.github.io/vega-datasets/data/us-employment.csv', | ||
'weather.csv': 'https://vega.github.io/vega-datasets/data/weather.csv', | ||
'windvectors.csv': 'https://vega.github.io/vega-datasets/data/windvectors.csv', | ||
'zipcodes.csv': 'https://vega.github.io/vega-datasets/data/zipcodes.csv', | ||
'unemployment.tsv': 'https://vega.github.io/vega-datasets/data/unemployment.tsv', | ||
'flights-200k.arrow': 'https://vega.github.io/vega-datasets/data/flights-200k.arrow', | ||
'annual-precip.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/annual-precip.json`, | ||
'anscombe.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/anscombe.json`, | ||
'barley.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/barley.json`, | ||
'budget.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/budget.json`, | ||
'budgets.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/budgets.json`, | ||
'burtin.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/burtin.json`, | ||
'cars.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/cars.json`, | ||
'countries.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/countries.json`, | ||
'crimea.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/crimea.json`, | ||
'driving.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/driving.json`, | ||
'earthquakes.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/earthquakes.json`, | ||
'flare-dependencies.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flare-dependencies.json`, | ||
'flare.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flare.json`, | ||
'flights-10k.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-10k.json`, | ||
'flights-200k.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-200k.json`, | ||
'flights-20k.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-20k.json`, | ||
'flights-2k.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-2k.json`, | ||
'flights-5k.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-5k.json`, | ||
'football.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/football.json`, | ||
'gapminder.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/gapminder.json`, | ||
'income.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/income.json`, | ||
'jobs.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/jobs.json`, | ||
'londonBoroughs.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/londonBoroughs.json`, | ||
'londonCentroids.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/londonCentroids.json`, | ||
'londonTubeLines.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/londonTubeLines.json`, | ||
'miserables.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/miserables.json`, | ||
'monarchs.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/monarchs.json`, | ||
'normal-2d.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/normal-2d.json`, | ||
'obesity.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/obesity.json`, | ||
'ohlc.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/ohlc.json`, | ||
'points.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/points.json`, | ||
'political-contributions.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/political-contributions.json`, | ||
'population.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/population.json`, | ||
'udistrict.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/udistrict.json`, | ||
'unemployment-across-industries.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/unemployment-across-industries.json`, | ||
'uniform-2d.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/uniform-2d.json`, | ||
'us-10m.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/us-10m.json`, | ||
'us-state-capitals.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/us-state-capitals.json`, | ||
'volcano.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/volcano.json`, | ||
'weather.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/weather.json`, | ||
'wheat.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/wheat.json`, | ||
'world-110m.json': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/world-110m.json`, | ||
'airports.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/airports.csv`, | ||
'birdstrikes.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/birdstrikes.csv`, | ||
'co2-concentration.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/co2-concentration.csv`, | ||
'disasters.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/disasters.csv`, | ||
'flights-3m.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-3m.csv`, | ||
'flights-airport.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-airport.csv`, | ||
'gapminder-health-income.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/gapminder-health-income.csv`, | ||
'github.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/github.csv`, | ||
'iowa-electricity.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/iowa-electricity.csv`, | ||
'la-riots.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/la-riots.csv`, | ||
'lookup_groups.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/lookup_groups.csv`, | ||
'lookup_people.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/lookup_people.csv`, | ||
'movies.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/movies.csv`, | ||
'population_engineers_hurricanes.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/population_engineers_hurricanes.csv`, | ||
'seattle-weather-hourly-normals.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/seattle-weather-hourly-normals.csv`, | ||
'seattle-weather.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/seattle-weather.csv`, | ||
'sp500.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/sp500.csv`, | ||
'stocks.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/stocks.csv`, | ||
'us-employment.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/us-employment.csv`, | ||
'weather.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/weather.csv`, | ||
'windvectors.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/windvectors.csv`, | ||
'zipcodes.csv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/zipcodes.csv`, | ||
'unemployment.tsv': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/unemployment.tsv`, | ||
'flights-200k.arrow': `https://cdn.jsdelivr.net/npm/vega-datasets@${version}/data/flights-200k.arrow`, | ||
}; | ||
@@ -77,0 +78,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):(t=t||self).vegaDatasets=a()}(this,(function(){"use strict";var t={"annual-precip.json":"https://vega.github.io/vega-datasets/data/annual-precip.json","anscombe.json":"https://vega.github.io/vega-datasets/data/anscombe.json","barley.json":"https://vega.github.io/vega-datasets/data/barley.json","budget.json":"https://vega.github.io/vega-datasets/data/budget.json","budgets.json":"https://vega.github.io/vega-datasets/data/budgets.json","burtin.json":"https://vega.github.io/vega-datasets/data/burtin.json","cars.json":"https://vega.github.io/vega-datasets/data/cars.json","countries.json":"https://vega.github.io/vega-datasets/data/countries.json","crimea.json":"https://vega.github.io/vega-datasets/data/crimea.json","driving.json":"https://vega.github.io/vega-datasets/data/driving.json","earthquakes.json":"https://vega.github.io/vega-datasets/data/earthquakes.json","flare-dependencies.json":"https://vega.github.io/vega-datasets/data/flare-dependencies.json","flare.json":"https://vega.github.io/vega-datasets/data/flare.json","flights-10k.json":"https://vega.github.io/vega-datasets/data/flights-10k.json","flights-200k.json":"https://vega.github.io/vega-datasets/data/flights-200k.json","flights-20k.json":"https://vega.github.io/vega-datasets/data/flights-20k.json","flights-2k.json":"https://vega.github.io/vega-datasets/data/flights-2k.json","flights-5k.json":"https://vega.github.io/vega-datasets/data/flights-5k.json","football.json":"https://vega.github.io/vega-datasets/data/football.json","gapminder.json":"https://vega.github.io/vega-datasets/data/gapminder.json","income.json":"https://vega.github.io/vega-datasets/data/income.json","iris.json":"https://vega.github.io/vega-datasets/data/iris.json","jobs.json":"https://vega.github.io/vega-datasets/data/jobs.json","londonBoroughs.json":"https://vega.github.io/vega-datasets/data/londonBoroughs.json","londonCentroids.json":"https://vega.github.io/vega-datasets/data/londonCentroids.json","londonTubeLines.json":"https://vega.github.io/vega-datasets/data/londonTubeLines.json","miserables.json":"https://vega.github.io/vega-datasets/data/miserables.json","monarchs.json":"https://vega.github.io/vega-datasets/data/monarchs.json","normal-2d.json":"https://vega.github.io/vega-datasets/data/normal-2d.json","obesity.json":"https://vega.github.io/vega-datasets/data/obesity.json","ohlc.json":"https://vega.github.io/vega-datasets/data/ohlc.json","points.json":"https://vega.github.io/vega-datasets/data/points.json","political-contributions.json":"https://vega.github.io/vega-datasets/data/political-contributions.json","population.json":"https://vega.github.io/vega-datasets/data/population.json","udistrict.json":"https://vega.github.io/vega-datasets/data/udistrict.json","unemployment-across-industries.json":"https://vega.github.io/vega-datasets/data/unemployment-across-industries.json","uniform-2d.json":"https://vega.github.io/vega-datasets/data/uniform-2d.json","us-10m.json":"https://vega.github.io/vega-datasets/data/us-10m.json","us-state-capitals.json":"https://vega.github.io/vega-datasets/data/us-state-capitals.json","volcano.json":"https://vega.github.io/vega-datasets/data/volcano.json","weather.json":"https://vega.github.io/vega-datasets/data/weather.json","wheat.json":"https://vega.github.io/vega-datasets/data/wheat.json","world-110m.json":"https://vega.github.io/vega-datasets/data/world-110m.json","airports.csv":"https://vega.github.io/vega-datasets/data/airports.csv","birdstrikes.csv":"https://vega.github.io/vega-datasets/data/birdstrikes.csv","co2-concentration.csv":"https://vega.github.io/vega-datasets/data/co2-concentration.csv","disasters.csv":"https://vega.github.io/vega-datasets/data/disasters.csv","flights-3m.csv":"https://vega.github.io/vega-datasets/data/flights-3m.csv","flights-airport.csv":"https://vega.github.io/vega-datasets/data/flights-airport.csv","gapminder-health-income.csv":"https://vega.github.io/vega-datasets/data/gapminder-health-income.csv","github.csv":"https://vega.github.io/vega-datasets/data/github.csv","iowa-electricity.csv":"https://vega.github.io/vega-datasets/data/iowa-electricity.csv","la-riots.csv":"https://vega.github.io/vega-datasets/data/la-riots.csv","lookup_groups.csv":"https://vega.github.io/vega-datasets/data/lookup_groups.csv","lookup_people.csv":"https://vega.github.io/vega-datasets/data/lookup_people.csv","movies.csv":"https://vega.github.io/vega-datasets/data/movies.csv","population_engineers_hurricanes.csv":"https://vega.github.io/vega-datasets/data/population_engineers_hurricanes.csv","seattle-weather-hourly.csv":"https://vega.github.io/vega-datasets/data/seattle-weather-hourly.csv","seattle-weather.csv":"https://vega.github.io/vega-datasets/data/seattle-weather.csv","sp500.csv":"https://vega.github.io/vega-datasets/data/sp500.csv","stocks.csv":"https://vega.github.io/vega-datasets/data/stocks.csv","us-employment.csv":"https://vega.github.io/vega-datasets/data/us-employment.csv","weather.csv":"https://vega.github.io/vega-datasets/data/weather.csv","windvectors.csv":"https://vega.github.io/vega-datasets/data/windvectors.csv","zipcodes.csv":"https://vega.github.io/vega-datasets/data/zipcodes.csv","unemployment.tsv":"https://vega.github.io/vega-datasets/data/unemployment.tsv","flights-200k.arrow":"https://vega.github.io/vega-datasets/data/flights-200k.arrow"},a={},s={};function e(t){return new Function("d","return {"+t.map((function(t,a){return JSON.stringify(t)+": d["+a+'] || ""'})).join(",")+"}")}function o(t){var a=Object.create(null),s=[];return t.forEach((function(t){for(var e in t)e in a||s.push(a[e]=e)})),s}function i(t,a){var s=t+"",e=s.length;return e<a?new Array(a-e+1).join(0)+s:s}function n(t){var a,s=t.getUTCHours(),e=t.getUTCMinutes(),o=t.getUTCSeconds(),n=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((a=t.getUTCFullYear())<0?"-"+i(-a,6):a>9999?"+"+i(a,6):i(a,4))+"-"+i(t.getUTCMonth()+1,2)+"-"+i(t.getUTCDate(),2)+(n?"T"+i(s,2)+":"+i(e,2)+":"+i(o,2)+"."+i(n,3)+"Z":o?"T"+i(s,2)+":"+i(e,2)+":"+i(o,2)+"Z":e||s?"T"+i(s,2)+":"+i(e,2)+"Z":"")}var g=function(t){var i=new RegExp('["'+t+"\n\r]"),g=t.charCodeAt(0);function d(t,e){var o,i=[],n=t.length,d=0,r=0,v=n<=0,u=!1;function h(){if(v)return s;if(u)return u=!1,a;var e,o,i=d;if(34===t.charCodeAt(i)){for(;d++<n&&34!==t.charCodeAt(d)||34===t.charCodeAt(++d););return(e=d)>=n?v=!0:10===(o=t.charCodeAt(d++))?u=!0:13===o&&(u=!0,10===t.charCodeAt(d)&&++d),t.slice(i+1,e-1).replace(/""/g,'"')}for(;d<n;){if(10===(o=t.charCodeAt(e=d++)))u=!0;else if(13===o)u=!0,10===t.charCodeAt(d)&&++d;else if(o!==g)continue;return t.slice(i,e)}return v=!0,t.slice(i,n)}for(10===t.charCodeAt(n-1)&&--n,13===t.charCodeAt(n-1)&&--n;(o=h())!==s;){for(var c=[];o!==a&&o!==s;)c.push(o),o=h();e&&null==(c=e(c,r++))||i.push(c)}return i}function r(a,s){return a.map((function(a){return s.map((function(t){return u(a[t])})).join(t)}))}function v(a){return a.map(u).join(t)}function u(t){return null==t?"":t instanceof Date?n(t):i.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var s,o,i=d(t,(function(t,i){if(s)return s(t,i-1);o=t,s=a?function(t,a){var s=e(t);return function(e,o){return a(s(e),o,t)}}(t,a):e(t)}));return i.columns=o||[],i},parseRows:d,format:function(a,s){return null==s&&(s=o(a)),[s.map(u).join(t)].concat(r(a,s)).join("\n")},formatBody:function(t,a){return null==a&&(a=o(t)),r(t,a).join("\n")},formatRows:function(t){return t.map(v).join("\n")},formatRow:v,formatValue:u}}(",").parse;function d(t){for(var a in t){var s,e,o=t[a].trim();if(o)if("true"===o)o=!0;else if("false"===o)o=!1;else if("NaN"===o)o=NaN;else if(isNaN(s=+o)){if(!(e=o.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;r&&e[4]&&!e[7]&&(o=o.replace(/-/g,"/").replace(/T/," ")),o=new Date(o)}else o=s;else o=null;t[a]=o}return t}var r=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),v=function(t,a,s,e){return new(s||(s=Promise))((function(o,i){function n(t){try{d(e.next(t))}catch(t){i(t)}}function g(t){try{d(e.throw(t))}catch(t){i(t)}}function d(t){var a;t.done?o(t.value):(a=t.value,a instanceof s?a:new s((function(t){t(a)}))).then(n,g)}d((e=e.apply(t,a||[])).next())}))};const u={};for(const a of Object.keys(t)){const s=t[a],e=function(){return v(this,void 0,void 0,(function*(){const t=yield fetch(s);return a.endsWith(".json")?yield t.json():a.endsWith(".csv")?g(yield t.text(),d):yield t.text()}))};e.url=s,u[a]=e}return u})); | ||
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t=t||self).vegaDatasets=s()}(this,(function(){"use strict";var t="2.0.0-beta.1",s={"annual-precip.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/annual-precip.json`,"anscombe.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/anscombe.json`,"barley.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/barley.json`,"budget.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/budget.json`,"budgets.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/budgets.json`,"burtin.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/burtin.json`,"cars.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/cars.json`,"countries.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/countries.json`,"crimea.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/crimea.json`,"driving.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/driving.json`,"earthquakes.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/earthquakes.json`,"flare-dependencies.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flare-dependencies.json`,"flare.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flare.json`,"flights-10k.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-10k.json`,"flights-200k.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-200k.json`,"flights-20k.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-20k.json`,"flights-2k.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-2k.json`,"flights-5k.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-5k.json`,"football.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/football.json`,"gapminder.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/gapminder.json`,"income.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/income.json`,"jobs.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/jobs.json`,"londonBoroughs.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/londonBoroughs.json`,"londonCentroids.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/londonCentroids.json`,"londonTubeLines.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/londonTubeLines.json`,"miserables.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/miserables.json`,"monarchs.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/monarchs.json`,"normal-2d.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/normal-2d.json`,"obesity.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/obesity.json`,"ohlc.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/ohlc.json`,"points.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/points.json`,"political-contributions.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/political-contributions.json`,"population.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/population.json`,"udistrict.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/udistrict.json`,"unemployment-across-industries.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/unemployment-across-industries.json`,"uniform-2d.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/uniform-2d.json`,"us-10m.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/us-10m.json`,"us-state-capitals.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/us-state-capitals.json`,"volcano.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/volcano.json`,"weather.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/weather.json`,"wheat.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/wheat.json`,"world-110m.json":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/world-110m.json`,"airports.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/airports.csv`,"birdstrikes.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/birdstrikes.csv`,"co2-concentration.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/co2-concentration.csv`,"disasters.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/disasters.csv`,"flights-3m.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-3m.csv`,"flights-airport.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-airport.csv`,"gapminder-health-income.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/gapminder-health-income.csv`,"github.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/github.csv`,"iowa-electricity.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/iowa-electricity.csv`,"la-riots.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/la-riots.csv`,"lookup_groups.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/lookup_groups.csv`,"lookup_people.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/lookup_people.csv`,"movies.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/movies.csv`,"population_engineers_hurricanes.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/population_engineers_hurricanes.csv`,"seattle-weather-hourly-normals.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/seattle-weather-hourly-normals.csv`,"seattle-weather.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/seattle-weather.csv`,"sp500.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/sp500.csv`,"stocks.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/stocks.csv`,"us-employment.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/us-employment.csv`,"weather.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/weather.csv`,"windvectors.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/windvectors.csv`,"zipcodes.csv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/zipcodes.csv`,"unemployment.tsv":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/unemployment.tsv`,"flights-200k.arrow":`https://cdn.jsdelivr.net/npm/vega-datasets@${t}/data/flights-200k.arrow`},e={},n={};function a(t){return new Function("d","return {"+t.map((function(t,s){return JSON.stringify(t)+": d["+s+'] || ""'})).join(",")+"}")}function d(t){var s=Object.create(null),e=[];return t.forEach((function(t){for(var n in t)n in s||e.push(s[n]=n)})),e}function o(t,s){var e=t+"",n=e.length;return n<s?new Array(s-n+1).join(0)+e:e}function r(t){var s,e=t.getUTCHours(),n=t.getUTCMinutes(),a=t.getUTCSeconds(),d=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((s=t.getUTCFullYear())<0?"-"+o(-s,6):s>9999?"+"+o(s,6):o(s,4))+"-"+o(t.getUTCMonth()+1,2)+"-"+o(t.getUTCDate(),2)+(d?"T"+o(e,2)+":"+o(n,2)+":"+o(a,2)+"."+o(d,3)+"Z":a?"T"+o(e,2)+":"+o(n,2)+":"+o(a,2)+"Z":n||e?"T"+o(e,2)+":"+o(n,2)+"Z":"")}var i=function(t){var s=new RegExp('["'+t+"\n\r]"),o=t.charCodeAt(0);function i(t,s){var a,d=[],r=t.length,i=0,c=0,v=r<=0,p=!1;function l(){if(v)return n;if(p)return p=!1,e;var s,a,d=i;if(34===t.charCodeAt(d)){for(;i++<r&&34!==t.charCodeAt(i)||34===t.charCodeAt(++i););return(s=i)>=r?v=!0:10===(a=t.charCodeAt(i++))?p=!0:13===a&&(p=!0,10===t.charCodeAt(i)&&++i),t.slice(d+1,s-1).replace(/""/g,'"')}for(;i<r;){if(10===(a=t.charCodeAt(s=i++)))p=!0;else if(13===a)p=!0,10===t.charCodeAt(i)&&++i;else if(a!==o)continue;return t.slice(d,s)}return v=!0,t.slice(d,r)}for(10===t.charCodeAt(r-1)&&--r,13===t.charCodeAt(r-1)&&--r;(a=l())!==n;){for(var j=[];a!==e&&a!==n;)j.push(a),a=l();s&&null==(j=s(j,c++))||d.push(j)}return d}function c(s,e){return s.map((function(s){return e.map((function(t){return p(s[t])})).join(t)}))}function v(s){return s.map(p).join(t)}function p(t){return null==t?"":t instanceof Date?r(t):s.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,s){var e,n,d=i(t,(function(t,d){if(e)return e(t,d-1);n=t,e=s?function(t,s){var e=a(t);return function(n,a){return s(e(n),a,t)}}(t,s):a(t)}));return d.columns=n||[],d},parseRows:i,format:function(s,e){return null==e&&(e=d(s)),[e.map(p).join(t)].concat(c(s,e)).join("\n")},formatBody:function(t,s){return null==s&&(s=d(t)),c(t,s).join("\n")},formatRows:function(t){return t.map(v).join("\n")},formatRow:v,formatValue:p}}(",").parse;function c(t){for(var s in t){var e,n,a=t[s].trim();if(a)if("true"===a)a=!0;else if("false"===a)a=!1;else if("NaN"===a)a=NaN;else if(isNaN(e=+a)){if(!(n=a.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;v&&n[4]&&!n[7]&&(a=a.replace(/-/g,"/").replace(/T/," ")),a=new Date(a)}else a=e;else a=null;t[s]=a}return t}var v=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),p=function(t,s,e,n){return new(e||(e=Promise))((function(a,d){function o(t){try{i(n.next(t))}catch(t){d(t)}}function r(t){try{i(n.throw(t))}catch(t){d(t)}}function i(t){var s;t.done?a(t.value):(s=t.value,s instanceof e?s:new e((function(t){t(s)}))).then(o,r)}i((n=n.apply(t,s||[])).next())}))};const l={};for(const t of Object.keys(s)){const e=s[t],n=function(){return p(this,void 0,void 0,(function*(){const s=yield fetch(e);return t.endsWith(".json")?yield s.json():t.endsWith(".csv")?i(yield s.text(),c):yield s.text()}))};n.url=e,l[t]=n}return l})); |
### Version 2.0 | ||
- Add `football.json`. Thanks to @eitanlees! | ||
- Add `seattle-weather-hourly.csv`. | ||
- Add `penguins_size.csv`. Thanks to @eitanlees! | ||
- Add `seattle-weather-hourly-normals.csv`. | ||
- Update `weather.csv` and `seattle-weather.csv` with better encoded weather condition, indicating more rain. Thanks to @visnup! | ||
@@ -12,6 +13,7 @@ - Update co2-concentration data and add seasonally adjusted CO2 field. | ||
- Remove `climate.json`. | ||
- Replace `seattle-temps.csv` with more general `seattle-weather-hourly.csv`. | ||
- Replace `seattle-temps.csv` with more general `seattle-weather-hourly-normals.csv`. | ||
- Remove `sf-temps.csv`. | ||
- Remove `graticule.json`. Use graticule generator instead. | ||
- Remove `points.json`. | ||
- Remove `points.json`. | ||
- Remove `iris.json`. Use `penguins_size.csv` instead. | ||
@@ -18,0 +20,0 @@ ### Version 1.31 |
{ | ||
"name": "vega-datasets", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "Common repository for example datasets used by Vega related projects.", | ||
"main": "build/vega-datasets", | ||
"module": "build/data", | ||
"module": "build/src/data", | ||
"unpkg": "build/vega-datasets.min.js", | ||
"jsdelivr": "build/vega-datasets.min.js", | ||
"typings": "build/data.d.ts", | ||
"typings": "build/src/data.d.ts", | ||
"repository": { | ||
@@ -19,2 +19,3 @@ "type": "git", | ||
"devDependencies": { | ||
"@rollup/plugin-json": "^4.0.3", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
@@ -21,0 +22,0 @@ "@types/d3-dsv": "^1.0.36", |
@@ -5,4 +5,5 @@ # Vega Datasets | ||
[](https://github.com/vega/vega-datasets/actions) | ||
[](https://www.jsdelivr.com/package/npm/vega-datasets) | ||
Collection of datasets used in Vega and Vega-Lite examples. This data lives at https://github.com/vega/vega-datasets. | ||
Collection of datasets used in Vega and Vega-Lite examples. This data lives at https://github.com/vega/vega-datasets and https://cdn.jsdelivr.net/npm/vega-dataset. | ||
@@ -17,6 +18,10 @@ Common repository for example datasets used by Vega related projects. Keep changes to this repository minimal as other projects (Vega, Vega Editor, Vega-Lite, Polestar, Voyager) use this data in their tests and for examples. | ||
## Versioning | ||
We use semantic versioning. However, since this package serve datasets we have additional rules about how we version data. | ||
We do not change data in patch releases except to resolve formatting issues. Minor releases may change the data but only update datasets in ways that do not change field names or file names. Minor releases may also add datasets. Major versions may change file names, file contents, and remove or update files. | ||
## How to use it | ||
Note that when you get data via URL, the data may change in the future as we don't fully guarantee backwards compatibility. | ||
### NPM | ||
@@ -54,5 +59,5 @@ | ||
You can also get the data directly via HTTP served by GitHub like: | ||
You can also get the data directly via HTTP served by GitHub or jsDelivr (a fast CDN) like: | ||
https://vega.github.io/vega-datasets/data/cars.json | ||
https://vega.github.io/vega-datasets/data/cars.json or with a fixed version (recommended) such as https://cdn.jsdelivr.net/npm/vega-datasets@1.31/data/cars.json. | ||
@@ -59,0 +64,0 @@ ## Development process |
@@ -17,3 +17,3 @@ # Sources | ||
Graphs in Statistical Analysis, F. J. Anscombe, The American Statistician | ||
Graphs in Statistical Analysis, F. J. Anscombe, The American Statistician. | ||
@@ -77,3 +77,3 @@ ## `barley.json` | ||
Generated using /scripts/github.py | ||
Generated using `/scripts/github.py`. | ||
@@ -88,4 +88,2 @@ ## `population_engineers_hurricanes.csv` | ||
## `iris.json` | ||
## `jobs.json` | ||
@@ -121,2 +119,6 @@ | ||
## `penguins_size.csv` | ||
Palmer Archipelago (Antarctica) penguin data collected and made available by [Dr. Kristen Gorman](https://www.uaf.edu/cfos/people/faculty/detail/kristen-gorman.php) and the [Palmer Station, Antarctica LTER](https://pal.lternet.edu/), a member of the [Long Term Ecological Research Network](https://lternet.edu/). For more information visit [allisonhorst/penguins](https://github.com/allisonhorst/penguins) on GitHub. | ||
## `political-contributions.json` | ||
@@ -128,7 +130,7 @@ | ||
Data from [NOAA](http://www.ncdc.noaa.gov/cdo-web/datatools/findstation). Daily weather normals. Transformed using `/scripts/weather.py`. We synthesized the categorical "weather" field from multiple fields in the original dataset. This data is intended for instructional purposes. | ||
Data from [NOAA](https://www.ncdc.noaa.gov/cdo-web/datatools/records). Daily weather records with metric units. Transformed using `/scripts/weather.py`. We synthesized the categorical "weather" field from multiple fields in the original dataset. This data is intended for instructional purposes. | ||
## `seattle-weather-hourly.csv` | ||
## `seattle-weather-hourly-normals.csv` | ||
Data from [NOAA](http://www.ncdc.noaa.gov/cdo-web/datatools/findstation). Hourly weather normals. We only included temperature, wind, and pressure and updated the format to be easier to parse. | ||
Data from [NOAA](https://www.ncdc.noaa.gov/cdo-web/datatools/normals). Hourly weather normals with metric units. The 1981-2010 Climate Normals are NCDC's three-decade averages of climatological variables, including temperature and precipitation. Learn more in the [documentation](https://www1.ncdc.noaa.gov/pub/data/cdo/documentation/NORMAL_HLY_documentation.pdf). We only included temperature, wind, and pressure and updated the format to be easier to parse. | ||
@@ -161,2 +163,4 @@ ## `sp500.csv` | ||
Instructional dataset showing actual and predicted temperature data. | ||
## `weather.csv` | ||
@@ -163,0 +167,0 @@ |
Sorry, the diff of this file is not supported yet
64
2
32327938
8
78
155777