mapbox / mapbox/mapboxgl-jupyter
mapbox doesn't render points on jupyter notebook running on Databricks.
- Dominant language
- Python
- Stars
- 681
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
I am running jupyter notebook on a Databricks cluster and attempting to render a map. I tried the example from the documentation to test and it doesn't plot the points.
`python 3.9`
`mapboxgl 0.10.2`
```
# Load data from sample csv
data_url = 'https://raw.githubusercontent.com/mapbox/mapboxgl-jupyter/master/examples/data/points.csv'
df = pd.read_csv(data_url)
# Must be a public token, starting with `pk`
token = mapbox_token
# Create a geojson file export from a Pandas dataframe
df_to_geojson(df, filename='points.geojson',
properties=['Avg Medicare Payments', 'Avg Covered Charges', 'date'],
lat='lat', lon='lon', precision=3)
# Generate data breaks and color stops from colorBrewer
color_breaks = [0,10,100,1000,10000]
color_stops = create_color_stops(color_breaks, colors='YlGnBu')
# Create the viz from the dataframe
viz = CircleViz('points.geojson',
access_token=token,
height='400px',
color_property = "Avg Medicare Payments",
color_stops = color_stops,
center = (-95, 40),
zoom = 3,
below_layer = 'waterway-label'
)
viz.show()
```

Contributor guide
Research direction
Reproduce the documented points example in a Databricks Jupyter notebook using Python 3.9 and mapboxgl 0.10.2, including the shown CircleViz configuration. Compare the result with the attached screenshot and inspect the example and documentation to identify why the points are not rendered; done means the sample points display in the notebook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100