{"id":"eec9806d88ac5aab","slug":"peirce-quincuncial","first_public_version":null,"paused_version":null,"likes":13,"publish_level":"public","forks":2,"fork_of":{"id":"b052aa2f88cb4374","slug":"orthographic","title":"Orthographic","owner":{"id":"863951e3ebe4c0ae","avatar_url":"https://avatars.observableusercontent.com/avatar/5af16e327a90b2873351dda8a596c0d2d3bf954f64523deefe80177c9764d0f7","login":"d3","name":"D3","bio":"Bring your data to life.","home_url":"https://d3js.org","type":"team","tier":"pro_2024"},"version":60},"has_importers":false,"thumbnail":"124fd953c0bb93256307a669483652d8e280c55393cce11eaa143f220da43ee5","default_thumbnail":"124fd953c0bb93256307a669483652d8e280c55393cce11eaa143f220da43ee5","update_time":"2018-07-09T23:43:44.222Z","publish_time":"2017-12-14T18:53:32.489Z","publish_version":380,"latest_version":380,"roles":[],"sharing":null,"owner":{"id":"863951e3ebe4c0ae","avatar_url":"https://avatars.observableusercontent.com/avatar/5af16e327a90b2873351dda8a596c0d2d3bf954f64523deefe80177c9764d0f7","login":"d3","name":"D3","bio":"Bring your data to life.","home_url":"https://d3js.org","type":"team","tier":"pro_2024"},"creator":{"id":"074c414ad1d825f5","avatar_url":"https://avatars.observableusercontent.com/avatar/7dbba99ced40bd5ab8013c99b1a11da61231bce321ba1148a9d16ad0f121550a","login":"mbostock","name":"Mike Bostock","bio":"Visualization toolmaker. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.","home_url":"https://bost.ocks.org/mike/","tier":"pro"},"authors":[{"id":"074c414ad1d825f5","avatar_url":"https://avatars.observableusercontent.com/avatar/7dbba99ced40bd5ab8013c99b1a11da61231bce321ba1148a9d16ad0f121550a","name":"Mike Bostock","login":"mbostock","bio":"Visualization toolmaker. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.","home_url":"https://bost.ocks.org/mike/","tier":"pro","approved":true,"description":""}],"files":[{"id":"efcaaf9f0b260e09b6afeaee6dbc1b91ad45f3328561cd67eb16a1754096c1095f70d284acdc4b004910e89265b60eba2706334e0dc84ded38fd9209083d4cef","url":"https://static.observableusercontent.com/files/efcaaf9f0b260e09b6afeaee6dbc1b91ad45f3328561cd67eb16a1754096c1095f70d284acdc4b004910e89265b60eba2706334e0dc84ded38fd9209083d4cef","download_url":"https://static.observableusercontent.com/files/efcaaf9f0b260e09b6afeaee6dbc1b91ad45f3328561cd67eb16a1754096c1095f70d284acdc4b004910e89265b60eba2706334e0dc84ded38fd9209083d4cef?response-content-disposition=attachment%3Bfilename*%3DUTF-8%27%27land-50m.json","name":"land-50m.json","create_time":"2019-10-29T23:27:57.146Z","mime_type":"application/json","status":"public","size":545534,"content_encoding":"gzip","private_bucket_id":null}],"comments":[],"commenting_lock":null,"suggestions_to":[],"suggestion_from":null,"collections":[{"id":"650e48551bcfb21d","type":"public","slug":"d3-geo-projection","title":"d3-geo-projection","description":"Extended geographic projections for D3.","update_time":"2019-02-27T01:29:45.891Z","pinned":false,"ordered":false,"custom_thumbnail":null,"default_thumbnail":"b348b3cd05d59b35136a9c32173ec1c818199522e2a8d6d99f4520f095573d43","thumbnail":"b348b3cd05d59b35136a9c32173ec1c818199522e2a8d6d99f4520f095573d43","listing_count":95,"parent_collection_count":1,"owner":{"id":"863951e3ebe4c0ae","avatar_url":"https://avatars.observableusercontent.com/avatar/5af16e327a90b2873351dda8a596c0d2d3bf954f64523deefe80177c9764d0f7","login":"d3","name":"D3","bio":"Bring your data to life.","home_url":"https://d3js.org","type":"team","tier":"pro_2024"}},{"id":"9cbebc0d45eec1ae","type":"public","slug":"maps","title":"Maps","description":"Embrace your inner shapefile. Or GeoJSON or TopoJSON. 🌍","update_time":"2018-11-13T23:08:46.395Z","pinned":true,"ordered":false,"custom_thumbnail":"731383d6e26988b24804bbe587cfde54620becf89d421a1d23c51903a8cf5e17","default_thumbnail":"970f477c509f8ebe4677acf5d708b9bf4b0c53f3d222e553ac7b3bdc063b1bc7","thumbnail":"731383d6e26988b24804bbe587cfde54620becf89d421a1d23c51903a8cf5e17","listing_count":67,"parent_collection_count":2,"owner":{"id":"f35c755083683fe5","avatar_url":"https://avatars.observableusercontent.com/avatar/424c6c1f7794371c9915a160519bdfb34cf34e50069fcd6def38a1a04d4e9702","login":"observablehq","name":"Observable","bio":"The end-to-end solution for building and hosting better data apps, dashboards, and reports.","home_url":"https://observablehq.com","type":"team","tier":"enterprise_2024"}}],"version":357,"title":"Peirce Quincuncial","license":null,"copyright":"","nodes":[{"id":1,"value":"md`# Peirce Quincuncial\n\nCharles Sanders Peirce developed [his *quincuncial* projection](https://en.wikipedia.org/wiki/Peirce_quincuncial_projection) in 1879; the term refers to the square arrangement of the four quadrants of the globe around the center hemisphere. The normal aspect is centered on the north pole, emphasizing the northern hemisphere.`","pinned":false,"mode":"js","data":null,"name":null},{"id":100,"value":"image = {\n  const context = DOM.context2d(width, height);\n  const projection = d3.geoPeirceQuincuncial().fitSize([width, height], {type: \"Sphere\"}).precision(0.1);\n  const path = d3.geoPath(projection, context);\n  context.beginPath(), path(graticule), context.strokeStyle = \"#ccc\", context.stroke();\n  context.beginPath(), path(land), context.fill();\n  return context.canvas;\n}","pinned":false,"mode":"js","data":null,"name":null},{"id":329,"value":"md`An interesting property of this projection is that it can be tiled infinitely on the plane. It is conformal everywhere except at the four corners of the center hemisphere, where the square equator and four meridians abruptly change direction.`","pinned":false,"mode":"js","data":null,"name":null},{"id":125,"value":"{\n  const context = DOM.context2d(width, height);\n  context.translate(width / 2, height / 2);\n  context.scale(0.5, 0.5);\n  context.drawImage(image, 0, 0, width, height);\n  context.drawImage(image, -width, -width, width, height);\n  context.rotate(Math.PI);\n  context.drawImage(image, -width, 0, width, height);\n  context.drawImage(image, 0, -width, width, height);\n  return context.canvas;\n}","pinned":false,"mode":"js","data":null,"name":null},{"id":97,"value":"md`The equatorial (or *transverse*) aspect, shown below, resembles a more conventional projection with the equator running horizontally across the center.`","pinned":false,"mode":"js","data":null,"name":null},{"id":11,"value":"{\n  const context = DOM.context2d(width, height);\n  const path = d3.geoPath(d3.geoPeirceQuincuncial()\n      .fitSize([width, height], {type: \"Sphere\"})\n      .rotate([0, 0, 45])\n      .precision(0.1), context);\n  context.translate(width / 2, height / 2);\n  context.rotate(Math.PI / 2);\n  context.translate(-width / 2, -height / 2);\n  context.beginPath(), path(graticule), context.strokeStyle = \"#ccc\", context.stroke();\n  context.beginPath(), path(land), context.fill();\n  return context.canvas;\n}","pinned":false,"mode":"js","data":null,"name":null},{"id":117,"value":"md`Clipping the equatorial aspect of the Peirce quincuncial at 90° produces the hemisphere-in-a-square projection developed by Oscar Sherman Adams in 1925.`","pinned":false,"mode":"js","data":null,"name":null},{"id":114,"value":"{\n  const context = DOM.context2d(width, height);\n  const path = d3.geoPath(d3.geoPeirceQuincuncial()\n      .fitSize([width, height], {type: \"Sphere\"})\n      .rotate([0, 0, 45])\n      .clipAngle(90)\n      .precision(0.1), context);\n  context.translate(width / 2, height / 2);\n  context.rotate(Math.PI / 2);\n  context.translate(-width / 2, -height / 2);\n  context.beginPath(), path(graticule), context.strokeStyle = \"#ccc\", context.stroke();\n  context.beginPath(), path(land), context.fill();\n  context.beginPath(), path({type: \"Sphere\"}), context.strokeStyle = \"#000\", context.stroke();\n  return context.canvas;\n}","pinned":false,"mode":"js","data":null,"name":null},{"id":301,"value":"height = width","pinned":false,"mode":"js","data":null,"name":null},{"id":36,"value":"graticule = d3.geoGraticule10()","pinned":false,"mode":"js","data":null,"name":null},{"id":38,"value":"land = topojson.feature(world, world.objects.land)","pinned":false,"mode":"js","data":null,"name":null},{"id":7,"value":"world = d3.json(\"https://unpkg.com/world-atlas@1/world/50m.json\")","pinned":false,"mode":"js","data":null,"name":null},{"id":13,"value":"topojson = require(\"topojson-client@3\")","pinned":false,"mode":"js","data":null,"name":null},{"id":3,"value":"d3 = require(\"d3-fetch@1\", \"d3-geo@1\", \"d3-geo-projection@2\")","pinned":false,"mode":"js","data":null,"name":null}],"resolutions":[],"schedule":null,"two_version":null,"last_view_time":null}