Skip to content

Latest commit

 

History

History
138 lines (121 loc) · 3.85 KB

development.md

File metadata and controls

138 lines (121 loc) · 3.85 KB

Development

Flow

Start
 ├──1.Data Curation (data/)
 │   └──Dataset: support-for-palestine.csv
 │       └──Add data using PRs
 ├──2.Data Transformation (build/)
 │   ├──Get latlong data based on location
 │   │   └──Using the GeoNames API
 │   └──Rerun in the build step, after each build
 │       └──Create a new csv appending this data
 └──3.Data Visualisation (src/)
     └──Render data in a ThreeJS globe

API

Sample response (truncated). A full version can be found here.

{
    "totalResultsCount": 10579,
    "geonames": [
        {
            "adminCode1": "ENG",
            "lng": "-0.12574",
            "population": 8961989,
            "countryCode": "GB",
            "name": "London",
            "countryName": "United Kingdom",
            "adminName1": "England",
            "lat": "51.50853"
        }
    ]
}

Build

Requirements: An username from Geonames. This acts as the API key.

Then, run the following command (from project root) to generate the production dataset, whenever the support-for-palestine dataset has been updated.

GEONAMES_USER=your-username-here node build/transformation.js

or, if you prefer using an .env file,

node -r dotenv/config build/transformation.js

Note: Use the 'development version' of the dataset; the production data has been commented out in the script.

And in case you need to build for production:

npm build

App Development

To run the project locally:

npm start

Linting and testing the code:

npm lint
npm test

Variables

Data points to consider for visualisation strength:

  • Number
  • Frequency
  • Capital?
  • Other support

Resources

Geo Data

Natural Earth

GeoNames

Globe Rendering (libraries)

Skins (Tiles)

Chroma (Color Scheme)

Future