Comments (3)
Edited: Oops, I read this as GraduatedCircleViz at first. I see the issue here. Current behavior is that radius and color are defined by point density. Can you post an example of your use-case that requires controlling the cluster visualization with a different properties?
from mapboxgl-jupyter.
I'm trying to do something like:
import pandas as pd
import os
from mapboxgl.utils import *
from mapboxgl.viz import *
# Load data from sample csv
data_url = 'https://raw.githubusercontent.com/mapbox/mapboxgl-jupyter/master/examples/points.csv'
df = pd.read_csv(data_url)
# Create a geojson file export from a Pandas dataframe
data = df_to_geojson(df,
properties=['Avg Medicare Payments', 'Avg Covered Charges', 'date'],
lat='lat', lon='lon', precision=3)
#Create a clustered circle map
color_stops = create_color_stops([1,10,50,100], colors='BrBG')
viz = ClusteredCircleViz(data,
access_token=token,
color_stops = color_stops,
radius_stops = [[1,5], [10, 10], [50, 15], [100, 20]],
cluster_maxzoom = 10,
cluster_radius = 30,
opacity = 0.9,
center = (-95, 40),
zoom = 3,
color_property = 'Avg Medicare Payments',
radius_property = 'Avg Covered Charges'
)
viz.show()
However I get:
TypeError: __init__() got an unexpected keyword argument 'color_property'
from mapboxgl-jupyter.
@akacarlyann I'd like to be able to combine a GraduatedCircleViz with a ClusteredCircleViz in some way. In my case I'm weighting points with some factor and I'd like the size of the cluster circles reflect the sum of these weights.
For example, let's say we've got a list of houses with occupancy. With a ClusteredCircleViz we're forced to have cluster circles that reflect the sum of houses in a region. However, it might be nice to use the sum of occupancies instead. While we could do this with a GraduatedCircleViz, it would be crazy dense, so a ClusteredCircleViz would be awesome!
from mapboxgl-jupyter.
Related Issues (20)
- Mapbox Jupyter doesn't render ChoroplethViz HOT 7
- New feature to edit colour legends title
- TemplateNotFound in conda environment HOT 7
- Coverage/Coveralls hangs indefinitely HOT 1
- Examples don't work as shown, due to Jupyter "Blocking request with no referer" HOT 5
- Support MapboxGL 'step' expression for color and height function types HOT 5
- Is there a way to hide the "token = os.getenv('MAPBOX_ACCESS_TOKEN')" HOT 5
- Will Mapbox add support for JupyterLab? HOT 6
- Please add interactive callback events to this widget.
- Adding search for map HOT 1
- Heat Map in time HOT 3
- Subplot support HOT 4
- How to hide the legends for GraduatedCircleViz? HOT 1
- Example displays base map but not points HOT 2
- any chance multiple viz can be combined in a single view? HOT 1
- viz.create_html() rounds lat/lng to 4 decimal places which drops accuracy to 11m
- How to hide null/Nan values on a CircleViz ? HOT 3
- Uncaught Error: An API access token is required to use Mapbox GL.
- Mapboxgl cannot be imported on Windows 10 after conda install
- mapbox doesn't render points on jupyter notebook running on Databricks. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapboxgl-jupyter.