Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vega-geo

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-geo - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

3

build/vega-geo.js

@@ -167,5 +167,6 @@ (function (global, factory) {

// parameters updated, reset and reflow
this.value = path = getPath(_.projection);
this.value = path = getPath(_.projection).context(null);
out.materialize().reflow().visit(out.SOURCE, set);
} else {
path.context(null);
mod = field$$1 === vegaUtil.identity || pulse.modified(field$$1.fields);

@@ -172,0 +173,0 @@ out.visit(mod ? out.ADD_MOD : out.ADD, set);

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util"),require("d3-contour"),require("d3-geo")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util","d3-contour","d3-geo"],t):t(e.vega=e.vega||{},e.vega,e.vega,e.d3,e.d3)}(this,function(e,t,r,a,n){"use strict";function i(e){t.Transform.call(this,null,e)}function o(e,t){return function r(){var a=t();return a.type=e,a.path=n.geoPath().projection(a),a.copy=a.copy||function(){var e=r();return E.forEach(function(t){a.hasOwnProperty(t)&&e[t](a[t]())}),e.path.pointRadius(a.path.pointRadius()),e},a}}function s(e,t){return arguments.length>1?(x[e]=o(e,t),this):x.hasOwnProperty(e)?x[e]:null}function u(e){return e&&e.path||z}function l(e){t.Transform.call(this,null,e)}function f(e){t.Transform.call(this,null,e)}function c(e){t.Transform.call(this,null,e)}function d(e,t){var r=function(r){return e(t(r))};return r.context=function(t){return e.context(t),r},r}function m(e){t.Transform.call(this,[],e),this.generator=n.geoGraticule()}function p(e){t.Transform.call(this,null,e),this.modified(!0)}function h(e,t){var r=g(t.fit);t.extent?e.fitExtent(t.extent,r):t.size?e.fitSize(t.size,r):0}function g(e){return r.isArray(e)?e.length>1?{type:"FeatureCollection",features:e}:e[0]:e}function y(e){var t=s((e||"mercator").toLowerCase());return t||r.error("Unrecognized projection type: "+e),t()}function v(e,t,a){r.isFunction(e[t])&&e[t](a)}var b=["values","size","thresholds"],j=["x","y","size","cellSize","bandwidth","thresholds"],q=r.inherits(i,t.Transform);q.transform=function(e,r){if(this.value&&!r.changed()&&!e.modified())return r.StopPropagation;var n,i,o,s=r.fork(r.NO_SOURCE|r.NO_FIELDS);return e.values?(n=a.contours(),i=b,o=e.values):(n=a.contourDensity(),i=j,o=r.materialize(r.SOURCE).source),i.forEach(function(t){null!=e[t]&&n[t](e[t])}),this.value&&(s.rem=this.value),this.value=s.source=s.add=n(o).map(t.ingest),s};var z=n.geoPath(),E=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"],x={albers:n.geoAlbers,albersusa:n.geoAlbersUsa,azimuthalequalarea:n.geoAzimuthalEqualArea,azimuthalequidistant:n.geoAzimuthalEquidistant,conicconformal:n.geoConicConformal,conicequalarea:n.geoConicEqualArea,conicequidistant:n.geoConicEquidistant,equirectangular:n.geoEquirectangular,gnomonic:n.geoGnomonic,mercator:n.geoMercator,orthographic:n.geoOrthographic,stereographic:n.geoStereographic,transversemercator:n.geoTransverseMercator};for(var A in x)s(A,x[A]);var D=r.inherits(l,t.Transform);D.transform=function(e,t){function a(e){e[l]=o(s(e))}var n,i=t.fork(t.ALL),o=this.value,s=e.field||r.identity,l=e.as||"path";return!o||e.modified()?(this.value=o=u(e.projection),i.materialize().reflow().visit(i.SOURCE,a)):(n=s===r.identity||t.modified(s.fields),i.visit(n?i.ADD_MOD:i.ADD,a)),i.modifies(l)};var O=r.inherits(f,t.Transform);O.transform=function(e,t){function r(e){var t=n([i(e),o(e)]);t?(e[u]=t[0],e[l]=t[1]):(e[u]=void 0,e[l]=void 0)}var a,n=e.projection,i=e.fields[0],o=e.fields[1],s=e.as||["x","y"],u=s[0],l=s[1];return e.modified()?t.materialize().reflow(!0).visit(t.SOURCE,r):(a=t.modified(i.fields)||t.modified(o.fields),t.visit(a?t.ADD_MOD:t.ADD,r)),t.modifies(s)};var T=r.inherits(c,t.Transform);T.transform=function(e,t){var a=t.fork(t.ALL),n=this.value,i=e.field||r.field("datum"),o=e.as||"shape",s=a.ADD_MOD;return n&&!e.modified()||(this.value=n=d(u(e.projection),i),a.materialize().reflow(),s=a.SOURCE),a.visit(s,function(e){e[o]=n}),a.modifies(o)};var C=r.inherits(m,t.Transform);C.transform=function(e,a){var n,i=a.fork(),o=this.value,s=this.generator;if(!o.length||e.modified())for(var u in e)r.isFunction(s[u])&&s[u](e[u]);return n=s(),o.length?(n._id=o[0]._id,i.mod.push(n)):i.add.push(t.ingest(n)),o[0]=n,i.source=o,i};var S=r.inherits(p,t.Transform);S.transform=function(e){var t=this.value;!t||e.modified("type")?(this.value=t=y(e.type),E.forEach(function(r){null!=e[r]&&v(t,r,e[r])})):E.forEach(function(r){e.modified(r)&&v(t,r,e[r])}),null!=e.pointRadius&&t.path.pointRadius(e.pointRadius),e.fit&&h(t,e)};var w={type:"Contour",metadata:{generates:!0,source:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"thresholds",type:"number"}]},M={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"as",type:"string",default:"path"}]},R={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},P={type:"GeoShape",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"as",type:"string",default:"shape"}]},_={type:"Graticule",metadata:{source:!0,generates:!0,changes:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};t.register(w,i),t.register(M,l),t.register(R,f),t.register(P,c),t.register(_,m),t.transform("Projection",p),e.transform=t.transform,e.definition=t.definition,e.projection=s,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega-dataflow"),require("vega-util"),require("d3-contour"),require("d3-geo")):"function"==typeof define&&define.amd?define(["exports","vega-dataflow","vega-util","d3-contour","d3-geo"],t):t(e.vega=e.vega||{},e.vega,e.vega,e.d3,e.d3)}(this,function(e,t,r,n,a){"use strict";function i(e){t.Transform.call(this,null,e)}function o(e,t){return function r(){var n=t();return n.type=e,n.path=a.geoPath().projection(n),n.copy=n.copy||function(){var e=r();return z.forEach(function(t){n.hasOwnProperty(t)&&e[t](n[t]())}),e.path.pointRadius(n.path.pointRadius()),e},n}}function s(e,t){return arguments.length>1?(E[e]=o(e,t),this):E.hasOwnProperty(e)?E[e]:null}function u(e){return e&&e.path||q}function l(e){t.Transform.call(this,null,e)}function f(e){t.Transform.call(this,null,e)}function c(e){t.Transform.call(this,null,e)}function d(e,t){var r=function(r){return e(t(r))};return r.context=function(t){return e.context(t),r},r}function m(e){t.Transform.call(this,[],e),this.generator=a.geoGraticule()}function p(e){t.Transform.call(this,null,e),this.modified(!0)}function h(e,t){var r=g(t.fit);t.extent?e.fitExtent(t.extent,r):t.size?e.fitSize(t.size,r):0}function g(e){return r.isArray(e)?e.length>1?{type:"FeatureCollection",features:e}:e[0]:e}function y(e){var t=s((e||"mercator").toLowerCase());return t||r.error("Unrecognized projection type: "+e),t()}function v(e,t,n){r.isFunction(e[t])&&e[t](n)}var b=["values","size","thresholds"],x=["x","y","size","cellSize","bandwidth","thresholds"],j=r.inherits(i,t.Transform);j.transform=function(e,r){if(this.value&&!r.changed()&&!e.modified())return r.StopPropagation;var a,i,o,s=r.fork(r.NO_SOURCE|r.NO_FIELDS);return e.values?(a=n.contours(),i=b,o=e.values):(a=n.contourDensity(),i=x,o=r.materialize(r.SOURCE).source),i.forEach(function(t){null!=e[t]&&a[t](e[t])}),this.value&&(s.rem=this.value),this.value=s.source=s.add=a(o).map(t.ingest),s};var q=a.geoPath(),z=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"],E={albers:a.geoAlbers,albersusa:a.geoAlbersUsa,azimuthalequalarea:a.geoAzimuthalEqualArea,azimuthalequidistant:a.geoAzimuthalEquidistant,conicconformal:a.geoConicConformal,conicequalarea:a.geoConicEqualArea,conicequidistant:a.geoConicEquidistant,equirectangular:a.geoEquirectangular,gnomonic:a.geoGnomonic,mercator:a.geoMercator,orthographic:a.geoOrthographic,stereographic:a.geoStereographic,transversemercator:a.geoTransverseMercator};for(var A in E)s(A,E[A]);var D=r.inherits(l,t.Transform);D.transform=function(e,t){function n(e){e[l]=o(s(e))}var a,i=t.fork(t.ALL),o=this.value,s=e.field||r.identity,l=e.as||"path";return!o||e.modified()?(this.value=o=u(e.projection).context(null),i.materialize().reflow().visit(i.SOURCE,n)):(o.context(null),a=s===r.identity||t.modified(s.fields),i.visit(a?i.ADD_MOD:i.ADD,n)),i.modifies(l)};var O=r.inherits(f,t.Transform);O.transform=function(e,t){function r(e){var t=a([i(e),o(e)]);t?(e[u]=t[0],e[l]=t[1]):(e[u]=void 0,e[l]=void 0)}var n,a=e.projection,i=e.fields[0],o=e.fields[1],s=e.as||["x","y"],u=s[0],l=s[1];return e.modified()?t.materialize().reflow(!0).visit(t.SOURCE,r):(n=t.modified(i.fields)||t.modified(o.fields),t.visit(n?t.ADD_MOD:t.ADD,r)),t.modifies(s)};var T=r.inherits(c,t.Transform);T.transform=function(e,t){var n=t.fork(t.ALL),a=this.value,i=e.field||r.field("datum"),o=e.as||"shape",s=n.ADD_MOD;return a&&!e.modified()||(this.value=a=d(u(e.projection),i),n.materialize().reflow(),s=n.SOURCE),n.visit(s,function(e){e[o]=a}),n.modifies(o)};var C=r.inherits(m,t.Transform);C.transform=function(e,n){var a,i=n.fork(),o=this.value,s=this.generator;if(!o.length||e.modified())for(var u in e)r.isFunction(s[u])&&s[u](e[u]);return a=s(),o.length?(a._id=o[0]._id,i.mod.push(a)):i.add.push(t.ingest(a)),o[0]=a,i.source=o,i};var S=r.inherits(p,t.Transform);S.transform=function(e){var t=this.value;!t||e.modified("type")?(this.value=t=y(e.type),z.forEach(function(r){null!=e[r]&&v(t,r,e[r])})):z.forEach(function(r){e.modified(r)&&v(t,r,e[r])}),null!=e.pointRadius&&t.path.pointRadius(e.pointRadius),e.fit&&h(t,e)};var w={type:"Contour",metadata:{generates:!0,source:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"thresholds",type:"number"}]},M={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"as",type:"string",default:"path"}]},R={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},P={type:"GeoShape",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"as",type:"string",default:"shape"}]},_={type:"Graticule",metadata:{source:!0,generates:!0,changes:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};t.register(w,i),t.register(M,l),t.register(R,f),t.register(P,c),t.register(_,m),t.transform("Projection",p),e.transform=t.transform,e.definition=t.definition,e.projection=s,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "vega-geo",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "Geographic data transforms for Vega dataflows.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -33,5 +33,6 @@ import {getPath} from './projections';

// parameters updated, reset and reflow
this.value = path = getPath(_.projection);
this.value = path = getPath(_.projection).context(null);
out.materialize().reflow().visit(out.SOURCE, set);
} else {
path.context(null);
mod = field === identity || pulse.modified(field.fields);

@@ -38,0 +39,0 @@ out.visit(mod ? out.ADD_MOD : out.ADD, set);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc