{"name":"d3-composite-projections","version":"1.2.3","description":"Like the AlbersUsa projection, adds several d3 projections to show the countries that are far from the mainland close to it.","homepage":"http://geoexamples.com/d3-composite-projections/","license":"BSD-3-Clause","author":{"name":"Roger Veciana i Rovira","url":"http://geoexamples.com"},"main":"d3-composite-projections.js","jsnext:main":"index","repository":{"type":"git","url":"git+https://github.com/rveciana/d3-composite-projections.git"},"scripts":{"pretest":"rollup --banner \"$(preamble)\" -f umd -g d3-geo:d3,d3-path:d3 -n d3 -o d3-composite-projections.js -- index.js","test":"mkdir -p test/output && tape 'test/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs --preamble \"$(preamble)\" d3-composite-projections.js -c -m -o d3-composite-projections.min.js","postpublish":"git push && git push --tags"},"dependencies":{"d3-geo":"^1.11.6","d3-path":"^1.0.7"},"devDependencies":{"canvas":"2","eslint":"^6.1.0","package-preamble":"0.1","pixelmatch":"^5.0.2","pngjs":"^3.4.0","rollup":"^1.17.0","tape":"^4.11.0","topojson":"3","uglify-js":"3.6"},"gitHead":"6e0a233ce3bfd5ec1418d6805fdf3a11ec8339c4","bugs":{"url":"https://github.com/rveciana/d3-composite-projections/issues"},"_id":"d3-composite-projections@1.2.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RxNBoRGf3epTnQBUKeEpaXpD8BA/Ud0xRuLwWxyI7dWfuuYgJZMKw6ZsZOwfDNC0ZbMWaU0eBFlL05A2jlcsWg==","shasum":"d4283b32fca77ab0aeab92354f7726410f94b1cc","tarball":"http://registry-npm.ywwl.com/d3-composite-projections/download/d3-composite-projections-1.2.3.tgz","fileCount":26,"unpackedSize":362932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP/SRCRA9TVsSAnZWagAA+ooP/R39L+b9TGvnRCd2d+sJ\n1niospODUnQvCramPEvpAx8Y4SbK6bx02ReN6ZBE3P2/7tNVEOR207JpunbT\n6j10QVMtEpEFKc58XqofuKyuJLgmKPuUflsRNjyNZWA9kQBpFGlUnyOTnbz6\nGS9i2U37MtPzISP6TMRqpTRsqN+keIruGPkvdF8W8wyp5ZY1m9G2bkYXe1UL\nvG3Ry80xXYY65kuo9APccL+Gu40A6yp9BAZD1s1PEf92wgMTA4u7g6mOuw3Y\niiRJi9UwBZpqG4PqwE28PaVPGh6iDbZqbjcBRsdP6+Th9xPARhlid4nVdykI\nqFfW1cyK8jdvpEVW65AMvMJ6rDcCt7VC2AC+4NbDDAkouIXIwozWIsN2CBXD\nKE2S6Tvptm/1kml/5Q4nXE0E/QQLFCNZCoOvHsNT4eKY3PaO7w4jVK8lzQ8W\nkaaBozdDFMjibh136EORZh2u5TRP3ZqKN/khHzJzj7SbkccP1Fpj0bJgYd9G\ntGeoFUgaZqO9kjaWMLAMUh5Jhoq4vLn8ELp4PSg/KTfQO9PnerVhzIf9C2GO\nea8cSWKqSgTQ8r3fahjBPArF/uGJqdIlcbB6hWEo8J3GYDZCNCNF/8pi7xkC\nIGzBo//zDjJdUTtGmsPB4pJzzxMXYhlQe7+p6EBYbL7MVs+6obnjtPMXv0TU\n0jpc\r\n=Ubf/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID3kQdOZV6gEzpW/60Qb/RCkx1a1R4CIS+C3FzzLWF2dAiEA3iypNugfJOEO579r1KOJCjycz5xocusmxCMH0pMvfFE="}],"size":130825,"noattachment":false,"key":"/d3-composite-projections/-/d3-composite-projections-1.2.3.tgz"},"maintainers":[{"name":"rveciana","email":"rveciana@gmail.com"}],"_npmUser":{"name":"rveciana","email":"rveciana@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/d3-composite-projections_1.2.3_1564472464677_0.7212115110793202"},"_hasShrinkwrap":false,"readme":"# d3-composite-projections\r\n\r\n[![Build Status](https://travis-ci.org/rveciana/d3-composite-projections.svg?branch=master)](https://travis-ci.org/rveciana/d3-composite-projections)\r\n\r\nSet of d3 projections for showing countries' distant lands together\r\n\r\n![conicConformalFrance](thumbnail.png \"Conic Conformal France example\")\r\n\r\n# USAGE\r\n\r\nThis is the version compatible with d3v6, please [go here for the version compatible with d3v3](https://github.com/rveciana/d3-composite-projections/tree/v0.4.0).\r\n\r\nThe projection itself works the same way as the other d3 projections. To be more precise, exactly as the [albersUsa](https://github.com/mbostock/d3/wiki/Geo-Projections#albersUsa) projection:\r\n\r\n```html\r\n<script src=\"https://d3js.org/d3.v4.min.js\"></script>\r\n<script src=\"d3-composite-projections.js\"></script>\r\n<script>\r\n\tvar projection = d3.geoConicConformalPortugal();\r\n</script>\r\n```\r\n\r\nChange the scale using scale i.e. `.scale(3000)`, as usual. The projections are prepared to fit a 960x500px SVG or Canvas.\r\n\r\nProjections are available for:\r\n\r\n- USA: [geoAlbersUSA](http://bl.ocks.org/rveciana/ee2119324e835e1bad42d0e4c1b9ab0d)\r\n- USA Territories: [geoAlbersUsaTerritories](http://bl.ocks.org/rveciana/5040be82aea528b6f785464f8816690f) as albersUsa, but adding the American Samoa, Puerto Rico, U.S. Virgin Islands, Guam and Northern Marianas Islands, so all the [Congressional Districts](https://en.wikipedia.org/wiki/List_of_districts_of_the_House_of_Representatives_of_Japan) are represented\r\n- France: [geoConicConformalFrance](http://bl.ocks.org/rveciana/0ff189b15449330828605fe4e118a716)\r\n- Portugal: [geoConicConformalPortugal](http://bl.ocks.org/rveciana/ee09a2c3732f3e0d6872d1a7f796a29b)\r\n- Spain: [geoConicConformalSpain](http://bl.ocks.org/rveciana/d635afded8c4eae36ecf61a15bdf0a98)\r\n- Netherlands [geoConicConformalNetherlands](https://observablehq.com/@julesblm/the-netherlands-composite-projection)\r\n- Europe: [geoConicConformalEurope](http://bl.ocks.org/rveciana/ced3109b372039afbcf7278ba3d14250) (thought for Eurostat data)\r\n- Japan: [geoConicEquidistantJapan](http://bl.ocks.org/rveciana/1f5399d8887428ad67665d106ec089d1)\r\n- Ecuador: [geoMercatorEcuador](http://bl.ocks.org/rveciana/306a5202e1facf7a22e08fbb1044f568)\r\n- Chile: [geoTransverseMercatorChile](http://bl.ocks.org/rveciana/3a31865e82f4fab8ac2522545bbc7741), including the [Chilean Antarctic Territory](https://en.wikipedia.org/wiki/Chilean_Antarctic_Territory)\r\n- Malaysia: [geoMercatorMalaysia](http://bl.ocks.org/rveciana/6298dd3e71cf98b6930c06f19b6684a2), created with the help of [Saiful Azfar Ramlee](https://github.com/saifulazfar)\r\n- Equatorial Guinea: [geoMercatorEquatorialGuinea](http://bl.ocks.org/rveciana/4dfc136b8e2707f182aa4591f892f82e)\r\n- United Kingdom: [geoAlbersUk](https://gist.github.com/rveciana/27272a581e975835aaa321ddf816d726)\r\nTo draw the borders between the projection zones, use `getCompositionBorders()` for SVG:\r\n\r\n```javascript\r\nsvg.append(\"path\")\r\n .style(\"fill\",\"none\")\r\n .style(\"stroke\",\"#000\")\r\n .attr(\"d\", path(projection.getCompositionBorders()));\r\n```\r\n\r\nor drawCompositionBorders if using Canvas:\r\n\r\n`projection.drawCompositionBorders(context);`\r\n\r\nUsing with node\r\n\r\n---\r\n\r\n```javascript\r\nvar d3_composite = require(\"d3-composite-projections\");\r\nvar d3_geo = require(\"d3-geo\");\r\nvar projection = d3_composite.geoAlbersUsaTerritories();\r\n```\r\n\r\n# INSTALLATION\r\n\r\n## Getting the files\r\n\r\nYou can get the files just by cloning the repository:\r\n\r\n```bash\r\ngit clone https://github.com/rveciana/d3-composite-projections.git\r\n```\r\n\r\nor downloading the _d3-composite-projections.js_ or _d3-composite-projections.min.js_ files.\r\n\r\n## Using cdnjs or unpkg\r\n\r\nYou can link the files from your web page to [cdnjs](https://cdnjs.com/libraries/d3-composite-projections):\r\n\r\n```html\r\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/d3-composite-projections/1.0.2/d3-composite-projections.min.js\"></script>\r\n```\r\n\r\nor\r\n\r\n```html\r\n<script src=\"https://unpkg.com/d3-composite-projections@1.2.0\"></script>\r\n```\r\n\r\n## As a module:\r\n\r\nInstall the library:\r\n\r\n```bash\r\nnpm install --save d3-composite-projections\r\n```\r\n\r\nImport it:\r\n\r\n```javascript\r\nimport { geoAlbersUk } from \"d3-composite-projections\";\r\n```\r\n\r\n## In node:\r\n\r\nInstall the library:\r\n\r\n```bash\r\nnpm install --save d3-composite-projections\r\n```\r\n\r\nImport it:\r\n\r\n```javascript\r\nconst d3cp = require(\"d3-composite-projections\")\r\n\r\nconst projection = d3cp.geoAlbersUk();\r\n```\r\n\r\n## Running the tests\r\n\r\nDownload the library by cloning the git repo:\r\n\r\n```bash\r\ngit clone https://github.com/rveciana/d3-composite-projections.git\r\n```\r\n\r\nThe tests can be run using:\r\n\r\n```bash\r\nnpm test\r\n```\r\n","publish_time":1564472464930,"_cnpm_publish_time":1564472464930,"dist-tags":{"lates":"0.0.1","latest":"2.0.0"}}