{"name":"d3-composite-projections","version":"1.3.1","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 -c","test":"mkdir -p test/output && tape 'test/*-test.js' && eslint index.js src","prepublish":"npm run test","postpublish":"git push && git push --tags"},"dependencies":{"d3-geo":"^1.11.9","d3-path":"^1.0.9"},"devDependencies":{"canvas":"2","eslint":"^6.7.1","pixelmatch":"^5.1.0","pngjs":"^3.4.0","rollup":"^1.27.5","rollup-plugin-terser":"^5.1.2","tape":"^4.11.0","topojson":"3"},"gitHead":"b548c5d4ad987cf2210de5083ff61960bb149826","bugs":{"url":"https://github.com/rveciana/d3-composite-projections/issues"},"_id":"d3-composite-projections@1.3.1","_nodeVersion":"12.13.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-iMRP2wJ4WjwYciOEgyuyWfrsU20tFyA6Ego2edp19WqW8eBMBtXHCQpb0aSkFnVn4rKMnr6lDfcfeC06BUJ7qA==","shasum":"9f73ab37758acc0b8ab6764fbadab3044dc62a40","tarball":"http://registry-npm.ywwl.com/d3-composite-projections/download/d3-composite-projections-1.3.1.tgz","fileCount":28,"unpackedSize":370636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3aNjCRA9TVsSAnZWagAAuy8QAIwHs0BJSP24FtSHSyXc\niH02Purko9D1Au+8S7NHkwqumFgHVjvBelcXBJmJcgizb3KsgT7OZAsDo5Tn\n+REtA1oDGqKdVLUKKXTJq98PWWkctxgAPSwoRxdlmDATCTo92z75tq3xDOy+\nFLUhVeJeojrlhZQ02TUybeDMdBwELUIiZRkAiNX4XmKEUDVGUYWcj0+pUPW/\nn986+RZvO0DM3KTyfqAQA1MwYp3T0uw+DaCfBLxgZQlE8/lfXtJPgwshpZJL\naqzAz0sPKN70yTU0dYPNMugOKu2S2oC5NhFevXaMn01Ex5wYmnZWHOMEaUkL\nzUNB2W+olzyXnNs0NP7jM1eK4EZ0SBHqXGP0YYYAbMJ/cCc7/SVU2vdUF+0I\nSD84oCsIgkPeIql7sJfro5W8Ct7ii864uAhxajx4BCyqDnY6OOTlxCGehGt+\ntdHplR79jLfG3a/CT1ESOnn/4lYzA4C+tXkgwh9/VHjKAnBF2rDpqWituArT\nP0WyPZwr1+pQbTEsX2GTx1cHtXVmbxzqjVTHaPpadjxqwm/nNjDtYsiV4B/t\nqTJnXQM+a5c8EYAYv0w72EXveN7NYOZNexdVspKYHiOfymqDXl3n5V2Nbm/E\nEPRXVOFR6CWQKbzefg9D4U2ejS5NhvqZm/vOSVWWWYQoQCbZ0gRAWrBZLTw6\noxqM\r\n=3X9D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0XFJ3+m8UWG5aDLqQJPkmarmTMcX7vLkKK0FfxtQO7AiEAqv81sw7uxQiqJu+fTz2LFeaRQejoBNjOMaXTklGhabE="}],"size":132194,"noattachment":false,"key":"/d3-composite-projections/-/d3-composite-projections-1.3.1.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.3.1_1574806371158_0.3489008422772537"},"_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":1574806371282,"_cnpm_publish_time":1574806371282,"dist-tags":{"lates":"0.0.1","latest":"2.0.0"}}