diff --git a/pages/cartogram.tsx b/pages/cartogram.tsx new file mode 100644 index 00000000..ad30ddd9 --- /dev/null +++ b/pages/cartogram.tsx @@ -0,0 +1,189 @@ +import React from 'react'; +import { Layout } from '../component/Layout'; +import TitleAndDescription from '../component/TitleAndDescription'; +import ChartFamilySection from '../component/ChartFamilySection'; +import { CodeBlock } from '../component/UI/CodeBlock'; +import { ChartOrSandbox } from '../component/ChartOrSandbox'; +import DatavizInspirationParallaxLink from '../component/DatavizInspirationParallaxLink'; +import { ResponsiveExplanationSection } from '../component/ResponsiveExplanationSection'; +import { GraphLinkImage } from '../component/UI/GraphLinkImage'; +import { ImageGrid } from '../component/UI/ImageGrid'; +import Link from 'next/link'; +import { BackgroundMapBasicDemo } from 'viz/BackgroundMapBasic/BackgroundMapBasicDemo'; +import { LinkAsButton } from 'component/LinkAsButton'; +import { CodeSandbox } from 'component/CodeSandbox'; +import { BackgroundMapProjectionDemo } from 'viz/BackgroundMapProjection/BackgroundMapProjectionDemo'; +import { ToDoSection } from 'component/UI/ToDoSection'; +import { BackgroundMapCanvasDemo } from 'viz/BackgroundMapCanvas/BackgroundMapCanvasDemo'; + +const graphDescription = ( + <> +
+ A cartogram{' '} + is a map in which the geometry of regions is distorted in order to + convey the information of an alternate variable. +
+
+ It is possible to build a Cartogram react component thanks to a js library
+ called{' '}
+
+ topogram
+
+ . This page provides step-by-step explanations on how to use the library
+ based on a geoJson
file with the help of d3.js for
+ manipulating such a data source.
+
+ Probably uses the same as for a{' '} + choropleth map or for a bubble map. +
+ {/* + // + // Topogram library + // + */} ++ As far as I can tell the best way to create a cartogram in JS is the{' '} + topogram library. +
+
+ However it looks like there is no easy way to install it using{' '}
+ npm
. The easiest way is probably to clone the repo and
+ create the build, or to copy the content of the{' '}
+
+ cartogram.js
+ {' '}
+ file.
+