This repository holds the source code for two similar data visualizations:
- International trade in goods and services based on UN Comtrade data
Commissioned by the Department for International Trade (DIT UK) in 2015.
Seesrc/comtrade/README.md
for more details. - UK Internationational trade in goods based on HMRC data
Commissioned by the Northern Ireland Statistics and Research Agency (NISRA) in 2018.
Seesrc/nisra/README.md
for more details.
The visualizations are closely related and share some code so they are in a shared project. The code is licenced under the GPL-3.0 licence.
Building and development require Git, NodeJS and NPM. See nodejs.org for installation instructions.
Clone this repository:
git clone git@github.com:mjs2020/trademap.git
cd trademap
Install dependencies
npm install
To serve the project locally in development mode:
npm run start:comtrade
# or
npm run start:nisra
The server runs on port 9000 so you can then open http://localhost:9000
To build the projects for development:
npm run build:comtrade
# or
npm run build:nisra
To deploy a dev version to now.sh run npm run release:dev:nisra
or npm run release:dev:comtrade
See src/comtrade/README.md
or src/nisra/README.md
for more details.
Coding by Francesco Merletti.
Contacts:
- Email: me@fm.to.it
- Twitter: @mjs2020
- Github: @mjs2020
Frontend:
- Bootstrap: General look, UI, responsiveness
- D3js: Graphing and map
- Topojson: For loading and processing map data.
- d3-geo-projection: For drawing the map
- Crossfilter: Used as an in-browser database
- jQuery: UI management
- Modernizr: For checking feature support in browsers
- select2: For the drop-down select controls
- file-saver-saveas-js: For saving SVG and PNGs
- d3-tip
- intro.js
Development tools:
- Webpack: To bundle the project