Code Monkey home page Code Monkey logo

pydeck_custom_layer's Introduction

Custom layers for pydeck

This repo is an example of how to create a custom deck.gl layer for use in pydeck.

To get started with this example repo, install the dependencies:

yarn
python3 -m venv env
. env/bin/activate
pip install -r pydeck_example/requirements.txt

Then execute the following to a pydeck script and serve the JavaScript bundle:

python pydeck_example/labeled_geojson_layer.py
webpack serve --progress

Navigate to http://localhost:8080/custom_layer.html in your browser, which should render the visualization.

You can deploy your project to NPM and host the your bundle on unpkg, which you can see in the custom layer example in the pydeck docs.

pydeck_custom_layer's People

Contributors

ajduberstein avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pydeck_custom_layer's Issues

error importing nebula in custom layer

Hi,

I'm trying to import nebula to make a selection layer for PyDeck (trying to follow this code sandbox example). However, I'm getting an error in the console

Screen Shot 2020-11-16 at 11 45 58 PM

when I try to import nebula

import { EditableGeoJsonLayer, DrawPolygonMode } from 'nebula.gl';

Yarn and webpack appear to build correctly.

I can raise this issue in the nebula repo if this is out of scope of this repo.

help with development cycle

Hi, I am using this template to make a custom pydeck layer here https://github.com/cornhundred/pydeck-lasso-layer. I was able to add a console log statement to the JavaScript bundle, publish, and re-run the notebook check_custom_layer.ipynb and I see the new console log statement. But, is there a quicker way to check the custom layer without having to publish to npm? For instance, for the development of our custom widget Clustergrammer2 I run webpack --watch and am able to refresh the notebook page to bring up the latest JavaScript build.

For background - I am trying to make a polygon/lasso selection layer using nebula.gl (see visgl/deck.gl#5122) and trying to try to follow this example in codesandbox (I'm also trying to get this example working on Observablehq but am running into issues requiring the library).

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.