You've already forked wakapi-readme-stats
Bar graph added.
This commit is contained in:
27
node_modules/vega-projection/LICENSE
generated
vendored
Normal file
27
node_modules/vega-projection/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2015-2018, University of Washington Interactive Data Lab
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
28
node_modules/vega-projection/README.md
generated
vendored
Normal file
28
node_modules/vega-projection/README.md
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# vega-projection
|
||||
|
||||
Projections for cartographic mapping.
|
||||
|
||||
This package provides a [projection](#projection) method for managing registered cartographic projections. By default, the projection registry includes all projection types provided by the [d3-geo](https://github.com/d3/d3-geo) module.
|
||||
|
||||
## API Reference
|
||||
|
||||
<a name="projection" href="#projection">#</a>
|
||||
vega.<b>projection</b>(<i>type</i>[, <i>projection</i>])
|
||||
[<>](https://github.com/vega/vega/blob/master/packages/vega-projection/src/projections.js "Source")
|
||||
|
||||
Registry function for adding and accessing projection constructor functions. The *type* argument is a String indicating the name of the projection type. If the *projection* argument is not specified, this method returns the matching projection constructor in the registry, or `null` if not found. If the *projection* argument is provided, it must be a projection constructor function to add to the registry under the given *type* name.
|
||||
|
||||
By default, the projection registry includes entries for all projection types provided by the [d3-geo](https://github.com/d3/d3-geo) module. Projections created using the constructor returned by this method are augmented with the following additional properties:
|
||||
|
||||
- `type`: A string value indicating the projection type.
|
||||
- `path`: A D3 [geoPath](https://github.com/d3/d3-geo#geoPath) instance configured to use the projection. When using this path instance, be sure to set the [path context](https://github.com/d3/d3-geo#path_context) as needed.
|
||||
- `copy`: A zero-argument function the produces a copy of the projection.
|
||||
|
||||
|
||||
```js
|
||||
// mercator projection
|
||||
var mercator = vega.projection('mercator');
|
||||
var proj = mercator().translate([400, 200]);
|
||||
scale.type; // 'mercator'
|
||||
scale([0, 0]); // [400, 200] center point
|
||||
```
|
||||
106
node_modules/vega-projection/build/vega-projection.js
generated
vendored
Normal file
106
node_modules/vega-projection/build/vega-projection.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-geo'), require('d3-geo-projection')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'd3-geo', 'd3-geo-projection'], factory) :
|
||||
(global = global || self, factory(global.vega = {}, global.d3, global.d3));
|
||||
}(this, (function (exports, d3Geo, d3GeoProjection) { 'use strict';
|
||||
|
||||
var defaultPath = d3Geo.geoPath();
|
||||
|
||||
var projectionProperties = [
|
||||
// standard properties in d3-geo
|
||||
'clipAngle',
|
||||
'clipExtent',
|
||||
'scale',
|
||||
'translate',
|
||||
'center',
|
||||
'rotate',
|
||||
'parallels',
|
||||
'precision',
|
||||
'reflectX',
|
||||
'reflectY',
|
||||
|
||||
// extended properties in d3-geo-projections
|
||||
'coefficient',
|
||||
'distance',
|
||||
'fraction',
|
||||
'lobes',
|
||||
'parallel',
|
||||
'radius',
|
||||
'ratio',
|
||||
'spacing',
|
||||
'tilt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Augment projections with their type and a copy method.
|
||||
*/
|
||||
function create(type, constructor) {
|
||||
return function projection() {
|
||||
var p = constructor();
|
||||
|
||||
p.type = type;
|
||||
|
||||
p.path = d3Geo.geoPath().projection(p);
|
||||
|
||||
p.copy = p.copy || function() {
|
||||
var c = projection();
|
||||
projectionProperties.forEach(function(prop) {
|
||||
if (p[prop]) c[prop](p[prop]());
|
||||
});
|
||||
c.path.pointRadius(p.path.pointRadius());
|
||||
return c;
|
||||
};
|
||||
|
||||
return p;
|
||||
};
|
||||
}
|
||||
|
||||
function projection(type, proj) {
|
||||
if (!type || typeof type !== 'string') {
|
||||
throw new Error('Projection type must be a name string.');
|
||||
}
|
||||
type = type.toLowerCase();
|
||||
if (arguments.length > 1) {
|
||||
projections[type] = create(type, proj);
|
||||
return this;
|
||||
} else {
|
||||
return projections[type] || null;
|
||||
}
|
||||
}
|
||||
|
||||
function getProjectionPath(proj) {
|
||||
return (proj && proj.path) || defaultPath;
|
||||
}
|
||||
|
||||
var projections = {
|
||||
// base d3-geo projection types
|
||||
albers: d3Geo.geoAlbers,
|
||||
albersusa: d3Geo.geoAlbersUsa,
|
||||
azimuthalequalarea: d3Geo.geoAzimuthalEqualArea,
|
||||
azimuthalequidistant: d3Geo.geoAzimuthalEquidistant,
|
||||
conicconformal: d3Geo.geoConicConformal,
|
||||
conicequalarea: d3Geo.geoConicEqualArea,
|
||||
conicequidistant: d3Geo.geoConicEquidistant,
|
||||
equalEarth: d3Geo.geoEqualEarth,
|
||||
equirectangular: d3Geo.geoEquirectangular,
|
||||
gnomonic: d3Geo.geoGnomonic,
|
||||
identity: d3Geo.geoIdentity,
|
||||
mercator: d3Geo.geoMercator,
|
||||
mollweide: d3GeoProjection.geoMollweide,
|
||||
naturalEarth1: d3Geo.geoNaturalEarth1,
|
||||
orthographic: d3Geo.geoOrthographic,
|
||||
stereographic: d3Geo.geoStereographic,
|
||||
transversemercator: d3Geo.geoTransverseMercator
|
||||
};
|
||||
|
||||
for (var key in projections) {
|
||||
projection(key, projections[key]);
|
||||
}
|
||||
|
||||
exports.getProjectionPath = getProjectionPath;
|
||||
exports.projection = projection;
|
||||
exports.projectionProperties = projectionProperties;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
1
node_modules/vega-projection/build/vega-projection.min.js
generated
vendored
Normal file
1
node_modules/vega-projection/build/vega-projection.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-geo"),require("d3-geo-projection")):"function"==typeof define&&define.amd?define(["exports","d3-geo","d3-geo-projection"],t):t((e=e||self).vega={},e.d3,e.d3)}(this,(function(e,t,o){"use strict";var r=t.geoPath(),a=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function i(e,o){return function r(){var i=o();return i.type=e,i.path=t.geoPath().projection(i),i.copy=i.copy||function(){var e=r();return a.forEach((function(t){i[t]&&e[t](i[t]())})),e.path.pointRadius(i.path.pointRadius()),e},i}}function n(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(c[e]=i(e,t),this):c[e]||null}var c={albers:t.geoAlbers,albersusa:t.geoAlbersUsa,azimuthalequalarea:t.geoAzimuthalEqualArea,azimuthalequidistant:t.geoAzimuthalEquidistant,conicconformal:t.geoConicConformal,conicequalarea:t.geoConicEqualArea,conicequidistant:t.geoConicEquidistant,equalEarth:t.geoEqualEarth,equirectangular:t.geoEquirectangular,gnomonic:t.geoGnomonic,identity:t.geoIdentity,mercator:t.geoMercator,mollweide:o.geoMollweide,naturalEarth1:t.geoNaturalEarth1,orthographic:t.geoOrthographic,stereographic:t.geoStereographic,transversemercator:t.geoTransverseMercator};for(var u in c)n(u,c[u]);e.getProjectionPath=function(e){return e&&e.path||r},e.projection=n,e.projectionProperties=a,Object.defineProperty(e,"__esModule",{value:!0})}));
|
||||
5
node_modules/vega-projection/index.js
generated
vendored
Normal file
5
node_modules/vega-projection/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export {
|
||||
projection,
|
||||
projectionProperties,
|
||||
getProjectionPath
|
||||
} from './src/projections';
|
||||
66
node_modules/vega-projection/package.json
generated
vendored
Normal file
66
node_modules/vega-projection/package.json
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"_from": "vega-projection@~1.4.2",
|
||||
"_id": "vega-projection@1.4.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-eULwc/8TMVjFkGtIVF5IGpJzEksnS0ccbaaCH9QjHtQTyBaR2CA679r5/98x6ur7ZLaYgcm2o082kjReUoyncA==",
|
||||
"_location": "/vega-projection",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "vega-projection@~1.4.2",
|
||||
"name": "vega-projection",
|
||||
"escapedName": "vega-projection",
|
||||
"rawSpec": "~1.4.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "~1.4.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vega",
|
||||
"/vega-geo"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vega-projection/-/vega-projection-1.4.2.tgz",
|
||||
"_shasum": "2e5edfffac54e8ba8ab56fba29f174dab0bc98d1",
|
||||
"_spec": "vega-projection@~1.4.2",
|
||||
"_where": "/home/prabhatdev/Documents/opensource/gitHubStats/waka-readme-stats/node_modules/vega",
|
||||
"author": {
|
||||
"name": "Jeffrey Heer",
|
||||
"url": "http://idl.cs.washington.edu"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vega/vega/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"d3-geo": "^1.12.1",
|
||||
"d3-geo-projection": "^2.9.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Projections for cartographic mapping.",
|
||||
"gitHead": "62565bbe084a422c4a0cbc6e19c6f7c45a3e5137",
|
||||
"homepage": "https://github.com/vega/vega#readme",
|
||||
"keywords": [
|
||||
"vega",
|
||||
"geo",
|
||||
"projection"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"main": "build/vega-projection.js",
|
||||
"module": "index",
|
||||
"name": "vega-projection",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vega/vega.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn rollup",
|
||||
"postbuild": "terser build/vega-projection.js -c -m -o build/vega-projection.min.js",
|
||||
"postpublish": "git push && git push --tags",
|
||||
"prebuild": "rimraf build && mkdir build",
|
||||
"prepublishOnly": "yarn test && yarn build",
|
||||
"pretest": "yarn prebuild && yarn rollup",
|
||||
"rollup": "rollup -g d3-geo:d3,d3-geo-projection:d3 -f umd -n vega -o build/vega-projection.js -- index.js",
|
||||
"test": "tape 'test/**/*-test.js'"
|
||||
},
|
||||
"version": "1.4.2"
|
||||
}
|
||||
116
node_modules/vega-projection/src/projections.js
generated
vendored
Normal file
116
node_modules/vega-projection/src/projections.js
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
import {
|
||||
geoAlbers,
|
||||
geoAlbersUsa,
|
||||
geoAzimuthalEqualArea,
|
||||
geoAzimuthalEquidistant,
|
||||
geoConicConformal,
|
||||
geoConicEqualArea,
|
||||
geoConicEquidistant,
|
||||
geoEqualEarth,
|
||||
geoEquirectangular,
|
||||
geoGnomonic,
|
||||
geoIdentity,
|
||||
geoMercator,
|
||||
geoNaturalEarth1,
|
||||
geoOrthographic,
|
||||
geoPath,
|
||||
geoStereographic,
|
||||
geoTransverseMercator
|
||||
} from 'd3-geo';
|
||||
|
||||
import {
|
||||
geoMollweide
|
||||
} from 'd3-geo-projection';
|
||||
|
||||
var defaultPath = geoPath();
|
||||
|
||||
export var projectionProperties = [
|
||||
// standard properties in d3-geo
|
||||
'clipAngle',
|
||||
'clipExtent',
|
||||
'scale',
|
||||
'translate',
|
||||
'center',
|
||||
'rotate',
|
||||
'parallels',
|
||||
'precision',
|
||||
'reflectX',
|
||||
'reflectY',
|
||||
|
||||
// extended properties in d3-geo-projections
|
||||
'coefficient',
|
||||
'distance',
|
||||
'fraction',
|
||||
'lobes',
|
||||
'parallel',
|
||||
'radius',
|
||||
'ratio',
|
||||
'spacing',
|
||||
'tilt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Augment projections with their type and a copy method.
|
||||
*/
|
||||
function create(type, constructor) {
|
||||
return function projection() {
|
||||
var p = constructor();
|
||||
|
||||
p.type = type;
|
||||
|
||||
p.path = geoPath().projection(p);
|
||||
|
||||
p.copy = p.copy || function() {
|
||||
var c = projection();
|
||||
projectionProperties.forEach(function(prop) {
|
||||
if (p[prop]) c[prop](p[prop]());
|
||||
});
|
||||
c.path.pointRadius(p.path.pointRadius());
|
||||
return c;
|
||||
};
|
||||
|
||||
return p;
|
||||
};
|
||||
}
|
||||
|
||||
export function projection(type, proj) {
|
||||
if (!type || typeof type !== 'string') {
|
||||
throw new Error('Projection type must be a name string.');
|
||||
}
|
||||
type = type.toLowerCase();
|
||||
if (arguments.length > 1) {
|
||||
projections[type] = create(type, proj);
|
||||
return this;
|
||||
} else {
|
||||
return projections[type] || null;
|
||||
}
|
||||
}
|
||||
|
||||
export function getProjectionPath(proj) {
|
||||
return (proj && proj.path) || defaultPath;
|
||||
}
|
||||
|
||||
var projections = {
|
||||
// base d3-geo projection types
|
||||
albers: geoAlbers,
|
||||
albersusa: geoAlbersUsa,
|
||||
azimuthalequalarea: geoAzimuthalEqualArea,
|
||||
azimuthalequidistant: geoAzimuthalEquidistant,
|
||||
conicconformal: geoConicConformal,
|
||||
conicequalarea: geoConicEqualArea,
|
||||
conicequidistant: geoConicEquidistant,
|
||||
equalEarth: geoEqualEarth,
|
||||
equirectangular: geoEquirectangular,
|
||||
gnomonic: geoGnomonic,
|
||||
identity: geoIdentity,
|
||||
mercator: geoMercator,
|
||||
mollweide: geoMollweide,
|
||||
naturalEarth1: geoNaturalEarth1,
|
||||
orthographic: geoOrthographic,
|
||||
stereographic: geoStereographic,
|
||||
transversemercator: geoTransverseMercator
|
||||
};
|
||||
|
||||
for (var key in projections) {
|
||||
projection(key, projections[key]);
|
||||
}
|
||||
Reference in New Issue
Block a user