question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors when running examples

See original GitHub issue

I’m new to geoviews, so the first thing I did was try and run some of the examples. This involved installing the package,

$ conda install -c pyviz geoviews

and downloading the examples:

$ conda install pyc
$ geoviews examples 

I then tried the following two example jupyter notebooks but got errors:

world_population.ipynb

import pandas as pd
import geoviews as gv

gv.extension('bokeh')

# Define data
cities = pd.read_csv('../../assets/cities.csv', encoding="ISO-8859-1")
population = gv.Dataset(cities, kdims=['City', 'Country', 'Year'])
points = population.to(gv.Points, ['Longitude', 'Latitude'], ['Population', 'City', 'Country'])

tiles = gv.tile_sources.Wikipedia

# Plot
%%opts Points (size=0.003 cmap='viridis') [tools=['hover'] size_index=2 color_index=2 width=600]
tiles * points

Warnings:

WARNING:param.OverlayPlot05720: No plotting class for WMTS type and bokeh backend found. 
WARNING:param.OverlayPlot05720: No plotting class for Points type and bokeh backend found. 
bokeh backend could not plot any Elements in the Overlay.

Output:

:HoloMap   [Year]
   :Overlay
      .WMTS.I   :WMTS   [Longitude,Latitude]
      .Points.I :Points   [Longitude,Latitude]   (Population,City,Country)

Were those warnings fatal (i.e. is that why the image didn’t appear)? Or have I missed a command required to make bokeh plots appear in a notebook?

city_populations_2050.ipynb

import pandas as pd
import geoviews as gv
import geoviews.tile_sources as gvts

gv.extension('bokeh')

# Declare data
cities = pd.read_csv('../../assets/cities.csv', encoding="ISO-8859-1")

points = gv.Points(cities, ['Longitude', 'Latitude'], ['City', 'Population', 'Country', 'Year'],
                   label='Top 20 Cities by population in 2050').select(Year=2050).sort('Population').iloc[-20:]

# Plot
(gvts.CartoMidnight *
 points.options(
    width=700, height=600, size_index=3, color_index=3, cmap='viridis',
    global_extent=True, size=0.01, tools=['hover'], show_legend=False
 ) *
 gv.Labels(points).options(
    text_font_size='8pt', text_color='white'
 )
)

Warnings:

WARNING:param.main: Option 'global_extent' for Points type not valid for selected backend ('bokeh'). Option only applies to following backends: ['matplotlib']
WARNING:param.OverlayPlot03119: No plotting class for WMTS type and bokeh backend found. 
WARNING:param.OverlayPlot03119: No plotting class for Points type and bokeh backend found. 
WARNING:param.OverlayPlot03119: No plotting class for Labels type and bokeh backend found. 
bokeh backend could not plot any Elements in the Overlay.

Output:

:Overlay
   .WMTS.I                                     :WMTS   [Longitude,Latitude]
   .Points.Top_20_Cities_by_population_in_2050 :Points   [Longitude,Latitude]   (City,Population,Country,Year)
   .Labels.Top_20_Cities_by_population_in_2050 :Labels   [Longitude,Latitude]   (City,Population,Country,Year)

Again, were those warnings fatal (i.e. is that why the image didn’t appear)? Or have I missed a command required to make bokeh plots appear in a notebook?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, Jun 8, 2019

Could you try explicitly pinning holoviews 1.12.3 and geoviews 1.6.2 when conda installing?

0reactions
rchak007commented, Oct 6, 2022

That was an easy fix! Upgrading geoviews alone worked:

$ conda install -c pyviz geoviews=1.6.2

geoviews                  1.6.2                      py_0    pyviz
holoviews                 1.11.0             pyh39e3cac_0    pyviz

as did going the extra step and upgrading holoviews too:

conda install -c pyviz holoviews=1.12.3

Thanks so much for your help, @philippjfr.

did not work for me. I will update later if it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Four Most Common Running Form Errors — And How to ...
So let's dive into the top four form errors that runners face — over-stride, pelvic drop, limited triple extension, and insufficient trunk lean....
Read more >
11 Common Running Mistakes to Avoid - Verywell Fit
Wearing the Wrong Shoes · Doing Too Much, Too Soon · Overstriding · Having Bad Upper Body Form · Losing Control on Hills...
Read more >
The Five Most Common Running Form Mistakes
1. Slow Cadence · 2. Heel Striking · 3. Lack Of Mobility · 4. Unrelaxed Upper Body · 5. Not Running Fast.
Read more >
The Top 6 Common Training Errors to Avoid - POGO Physio
Let's take a look at the top training mistakes and how they can contribute to injury development: · Mistake 1. 'Spiking' the Training...
Read more >
The Errors of Our Running Ways | Runner's World
One of the biggest errors runners make is running workouts at incorrect speeds. Run your workouts too fast, and you may not meet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found