GithubHelp home page GithubHelp logo

kryndex / gridmap-layout-usa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kristw/gridmap-layout-usa

0.0 2.0 0.0 2.07 MB

positions of tiles for US grid map visualization

Home Page: http://bl.ocks.org/kristw/2f628465e36f9821325d

License: MIT License

JavaScript 95.18% R 3.59% HTML 1.23%

gridmap-layout-usa's Introduction

gridmap-layout-usa

Positions of tiles for US grid map visualization.

Install

npm install gridmap-layout-usa --save

or

bower install gridmap-layout-usa --save

The data files can be found in the dist directory of the installed package. Either one of these files below can be used:

  • dist/gridmap-layout-usa.json
  • dist/gridmap-layout-usa.csv
  • dist/gridmap-layout-usa.js
  • dist/gridmap-layout-usa.min.js

The data in each file is an array of tiles (provinces). Each tile is in this format:

[
  {
    "x": 2, // column index
    "y": 0, // row index
    "key": "AK"
    "name": "Alaska"
  },
  ...
]

Example usage

Please see this example for how to use this layout with D3 or you can use the ready-to-use component d3Kit-gridmap.

Development

The positions of the tiles are taken from this article by New York Times.

You can modify src/input/map.csv to change positions, then

npm run compile

Quality metrics

I have written about an evaluation method for grid map in this blog post. To run the script to evaluates different layouts:

node src/quality.js

Copyright (c) 2016 Krist Wongsuphasawat. Licensed under the MIT License

gridmap-layout-usa's People

Contributors

kristw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.