Skip to content
forked from visgl/deck.gl

WebGL2 powered geospatial visualization layers

License

Notifications You must be signed in to change notification settings

MapGiser/deck.gl

This branch is 2168 commits behind visgl/deck.gl:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 10, 2018
Jan 12, 2019
Jan 2, 2020
Dec 17, 2019
Jan 2, 2020
Dec 21, 2019
Jan 2, 2020
Dec 18, 2019
Feb 21, 2019
Dec 21, 2019
Dec 20, 2019
Dec 23, 2019
Nov 21, 2019
Dec 23, 2019
Mar 29, 2019
Dec 11, 2019
Apr 20, 2018
Jul 18, 2019
Jun 19, 2019
Dec 19, 2017
Sep 26, 2019
Oct 29, 2019
Dec 17, 2019
Dec 4, 2017
Mar 31, 2017
Dec 15, 2019
Mar 25, 2019
Dec 4, 2017
Dec 17, 2019
Nov 28, 2019
Dec 23, 2019
Mar 29, 2019
Jan 2, 2020

Repository files navigation

version build downloads Coverage Status

deck.gl | Website

WebGL2-powered, highly performant large-scale data visualization

docs

Installation

npm install deck.gl

Using deck.gl

deck.gl offers an extensive catalog of pre-packaged visualization "layers", including ScatterplotLayer, ArcLayer, TextLayer, GeoJsonLayer, etc. The input to a layer is usually an array of JSON objects. Each layer offers a highly-flexible API to customize how the data should be rendered.

Example constructing a deck.gl ScatterplotLayer:

import {ScatterplotLayer} from '@deck.gl/layers';

/**
 * data is an array of object in the shape of:
 * {
 *   "name":"Montgomery St. (MONT)",
 *   "address":"598 Market Street, San Francisco CA 94104",
 *   "entries":"43430",
 *   "exits":"45128",
 *   "coordinates":[-122.401407,37.789256]
 * }
 */
const scatterplotLayer = new ScatterplotLayer({
  id: 'bart-stations',
  data: 'https://github.com/uber-common/deck.gl-data/blob/master/website/bart-stations.json',
  getRadius: d => Math.sqrt(d.entries) / 100,
  getPosition: d => d.coordinates,
  getFillColor: [255, 228, 0],
});

Using deck.gl with React

import DeckGL from 'deck.gl';

<DeckGL
  width="100%"
  height="100%"
  initialViewState={{longitude: -122.4, latitude: 37.78, zoom: 8}}
  controller={true}
  layers={[scatterplotLayer]} />

Using deck.gl with Pure JS

import {Deck} from '@deck.gl/core';

const deck = new Deck({
  width: '100vw',
  height: '100vh',
  initialViewState: {
    longitude: -122.4,
    latitude: 37.78,
    zoom: 8
  },
  controller: true,
  layers: [scatterplotLayer]
});

Minimum setups of end-to-end deck.gl usage is also showcased in the hello-world examples, using both webpack and browserify, so you can choose which bundler you prefer or are more familiar with.

To learn how to use deck.gl through the many examples that come with the deck.gl repo, please clone the latest release branch:

git clone -b 7.3-release --single-branch https://github.com/uber/deck.gl.git

For the most up-to-date information, see our API documentations

Contributing

PRs and bug reports are welcome, and we are actively opening up the deck.gl roadmap to facilitate for external contributors.

Note that once your PR is about to be merged, you will be asked to register as a contributor by filling in a short form.

Attributions

Data sources

Data sources are listed in each example.

The deck.gl project is supported by

BrowserStack

About

WebGL2 powered geospatial visualization layers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.7%
  • CSS 3.2%
  • Python 2.6%
  • Jupyter Notebook 1.4%
  • HTML 0.9%
  • Shell 0.2%