Skip to main content

All Questions

Tagged with
0 votes
1 answer
97 views

Altair choropleth not rendering in streamlit app on Snowflake and color coding problem

I am trying to make a choropleth map in a streamlit app on Snowflake. Outside of snowflake, I can use the following code to render a map where just one county in Alabama is color coded. import ...
jh_'s user avatar
  • 103
2 votes
1 answer
561 views

Is there a way to reverse the color scheme of an altair choropleth map with binned data?

So I am trying to create a choropleth map at the county level using binned data in Altair. I got the bin function to work, but I can't reverse the direction of the color scheme. If I use the following ...
Thomas Becker's user avatar
0 votes
0 answers
67 views

Is it possible to implement data classification scheme (for choropleth plot) in altair?

I am creating a choropleth plot function with Altair and want to use different data classification scheme for the size of the scatter markers. I have looked up the bin parameters and bin transform in ...
pickyaudience's user avatar
1 vote
2 answers
951 views

Problem with missing values in Altair or Plotly choropleth map

I have data for a few states in the US and others are Null. While creating the maps, I would like to shade in the states with the missing value in the text but I am struggling to find the correct ...
nchatt's user avatar
  • 17
0 votes
1 answer
235 views

Problem while displaying Choropleth map for UK using Altair

I am downloading dataset from two different sources for UK areas. And I am using Altair code to display a Choropleth Map. But this what I get for both datasets using the following code: _map = alt....
Adham Enaya's user avatar
0 votes
1 answer
52 views

Requite helps shading in Altair choropleth

I would like to shade in the non-highlighted items below too but I am struggling to find the correct method. I essentially want everything grey or any other set colour, except for the Boroughs ...
Jimmy K's user avatar
  • 133
1 vote
1 answer
699 views

Adding dynamic tooltip and title to Choropleth (with slider) in Altair

In a previous post, @jakevdp produced the very nice choropleth in Altair using a slider (pasted below for convenience): import altair as alt import pandas as pd from vega_datasets import data ...
user4687531's user avatar
  • 1,101
3 votes
1 answer
990 views

Adding labels to altair choropleth maps

Is there a way to add labels to the state maps? For example, to have the percentages directly on the individual states instead of only being able to see them via the tool tip? I'm not sure if Altair ...
Morgan McCue 's user avatar
4 votes
1 answer
952 views

Format Altair choropleth map legend scale and tooltip

I am trying to make the tool tip 'Percentage' be an actual percent and not a decimal. Even when I include alt.Tooltip('Percentage:Q',format='.2%'), it doesn't seem to work. Also, I am trying to make ...
Morgan McCue 's user avatar
4 votes
1 answer
2k views

Altair choropleth map, color highlight based on line chart selection

I am plotting a choropleth map colored by the field Passenger_0_ and a line chart showing the evolution of Passenger_0_ throughout a day by zone. I would like to select a line (zone) in the line chart ...
angelrps's user avatar
4 votes
1 answer
2k views

Filtering to State Level for Choropleth Maps in Altair

I've been playing around with Altair's map functionality. I'm very easily able to build US maps with state and county boundaries now. What I'm stuck on is filtering the maps down to a lower level. For ...
Ragnar Lothbrok's user avatar
2 votes
1 answer
2k views

Dealing with missing values / nulls in Altair choropleth map

I've created a choropleth map in Altair with US state-level data. However, I have no data for some of the states. By default, these states do not appear on the map at all. Here's an example image: I ...
Ragnar Lothbrok's user avatar