Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for bokeh #298 #301

Merged
merged 7 commits into from Nov 8, 2022
Merged

Added support for bokeh #298 #301

merged 7 commits into from Nov 8, 2022

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Nov 7, 2022

This PR adds bokeh as a new plotting backend. Currently, it supports adding basemaps, loading COG and local raster datasets. Supporting for loading vector data is in progress.

import leafmap.bokehmap as leafmap
m = leafmap.Map()
m.add_basemap('ROADMAP')
url = 'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif'
m.add_cog_layer(url)
m

Peek 2022-11-07 16-06

@giswqs giswqs added the Feature Request New feature or request label Nov 7, 2022
@giswqs giswqs self-assigned this Nov 7, 2022
@giswqs giswqs added this to In progress in leafmap via automation Nov 7, 2022
@giswqs giswqs linked an issue Nov 7, 2022 that may be closed by this pull request
@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2022

This pull request introduces 11 alerts when merging c355a18 into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for 'import *' may pollute namespace

@giswqs
Copy link
Member Author

giswqs commented Nov 8, 2022

Added support for STAC.

import leafmap.bokehmap as leafmap
m = leafmap.Map()
url = 'https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json'
m.add_stac_layer(url, bands=['B3', 'B2', 'B1'])
m

image

@lgtm-com
Copy link

lgtm-com bot commented Nov 8, 2022

This pull request introduces 11 alerts when merging cc5d387 into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for 'import *' may pollute namespace

@giswqs
Copy link
Member Author

giswqs commented Nov 8, 2022

Added support for loading vector data (e.g., GeoDataFrame, Shapefile, GeoJSON, etc.).

import leafmap.bokehmap as leafmap
m = leafmap.Map()
m.add_basemap('OpenTopoMap')
url = 'https://github.com/giswqs/leafmap/blob/master/examples/data/cable_geo.geojson'
m.add_vector(url, line_color='blue', line_width=2)
m

Peek 2022-11-07 23-55

@giswqs
Copy link
Member Author

giswqs commented Nov 8, 2022

Visualizing vector data with custom colors.

import leafmap.bokehmap as leafmap
m = leafmap.Map()
m.add_basemap('CartoDB.DarkMatter')
url = 'https://raw.githubusercontent.com/telegeography/www.submarinecablemap.com/master/web/public/api/v3/cable/cable-geo.json'
m.add_vector(url, line_color='color', line_width=2)
m

Peek 2022-11-08 00-31

@lgtm-com
Copy link

lgtm-com bot commented Nov 8, 2022

This pull request introduces 11 alerts when merging 3028c50 into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Nov 8, 2022

This pull request introduces 11 alerts when merging 0300488 into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for 'import *' may pollute namespace

@lgtm-com
Copy link

lgtm-com bot commented Nov 8, 2022

This pull request introduces 11 alerts when merging ab4e4a5 into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for 'import *' may pollute namespace

@giswqs giswqs merged commit b83ae39 into master Nov 8, 2022
leafmap automation moved this from In progress to Done Nov 8, 2022
@giswqs giswqs deleted the bokeh branch November 8, 2022 22:02
@lgtm-com
Copy link

lgtm-com bot commented Nov 8, 2022

This pull request introduces 14 alerts when merging d8f049a into 71d1b4d - view on LGTM.com

new alerts:

  • 10 for Modification of parameter with default
  • 1 for Module is imported more than once
  • 1 for Unused local variable
  • 1 for 'import *' may pollute namespace
  • 1 for Variable defined multiple times

sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this pull request Feb 18, 2023
* Added support for bokeh opengeos#298

* Added bokeh to docs

* Added support for STAC

* Added vector data support for bokeh

* Updated cabel_geo.geojson

* Added support for center and zoom

* Added get_overlap function

Former-commit-id: b83ae39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Add support for bokeh
1 participant