778 questions
2
votes
0
answers
45
views
Plotly Choropleth Map Using GeoJSON Not working in R Server
I am trying to plot a Plotly Choropleth Map Using GeoJSON in RStudio Server. Choropleth maps work in r on my local machine but when I try and plot them in RStudio Server the figure plots but the ...
3
votes
1
answer
70
views
Plotly chloropleth of India not showing states properly (too small)
I am trying to create a choropleth of India that shows railway accident data. When I try to make run it a choropleth is created, but the states of India are too small and do not reflect their real ...
1
vote
2
answers
95
views
How to Add Value Labels to 3D-like Bar Chart on a Basemap in Python_
I'm working on a Python project where I'm plotting a bar chart on top of a basemap. My original goal is to create a visualization that mimics a 3D bar chart by plotting vertical bars at specific ...
1
vote
0
answers
72
views
R Plotly choropleth not plotting geojson data
I am trying to follow this tutorial to create a choropleth map in R using plotly. The geojson file I am using is available here. The problem I am having is that plotly won't plot the shapes of the ...
1
vote
1
answer
83
views
Plotly choropleth - change width to rectangular
I'm making an R Shiny application that uses a choropleth to display some data. The plotly version works well, but I can't find how to adjust its sizing to make full use of the space.
It always looks ...
-1
votes
1
answer
41
views
Plotly + Knime + choroplethmap: how to put labels on top of regions?
I'm using Knime on a Mac, using Generic Javascript View. The code that I'm using:
var body = document.getElementsByTagName('body')[0];
var html = '<div id="myDiv">';
body.innerHTML = ...
0
votes
1
answer
109
views
Ipyleaflet displaying gray map on Shiny [closed]
I have developed a dashboard on Shiny Python that contains an ipyleaflet map with a Choropleth gradient. Everything was going fine until I decided to ensure that it will run on other machines by ...
0
votes
0
answers
83
views
Remove white space around sf/ggplot2 choropleth map
Is there a way to remove the ample white space around choropleth maps without saving the plot? (Because when I save the plot, I can resize the resulting picture.) @Spacedman: I aim to get a graphic in ...
0
votes
0
answers
121
views
D3.js: getting "TypeError: cannot read properties of undefined" from my json dataset. I do not know why
I am trying to load my data onto a d3.js map but I keep getting this error: TypeError: cannot read properties of undefined
I am using my own json data and nothing is mapping. It seems that it cannot ...
0
votes
0
answers
58
views
Geopandas plot: Image size of 833x81232 pixels is too large. It must be less than 2^16 in each direction
I am plotting a global choropleth map in Jupyter Notebook displaying each country's share of electricity production from fossil fuels (%). I managed to plot the original shapefile on a map, so I know ...
1
vote
1
answer
158
views
Plotly Choropleth - How to add outline to shape from geojson
I want to draw an outline highlighting a shape in a Choropleth map drawn from a GeoJSON using Plotly (in my case over Dash).
I have a dataframe "df" like this one:
state (string) value (...
0
votes
1
answer
202
views
TypeError: 'MultiPolygon' object is not iterable with Plotly Choropleth
I am trying to make a choropleth map from county level FIPS data using this example from plotly.
import plotly.figure_factory as ff
import numpy as np
import pandas as pd
df_sample = pd.read_csv('...
1
vote
1
answer
45
views
Trouble sorting legend when using transform_calculate linked to a new category in Altair
I'm trying to order the legend of two and more concatenated choropleth maps which are labeled by using a dictionary of strings. They share the legend. However when concatenating them, the legend gets ...
2
votes
1
answer
219
views
How to display a custom color for NA values in an R Plotly choropleth map?
I would like to change the fill color of NA values in a choropleth r plotly interactive map from white (or transparent?) to light gray. This is for an R Shiny application, so I would like to retain ...
0
votes
1
answer
108
views
Subplot two plotly python express choropleth maps including time animations next to each other
I would like to plot multiple plotly express choropleth maps with their own time sliders next to each other.
I have tried lots of different approaches by now, but nothing seems to work. I am aware of ...
1
vote
1
answer
65
views
Choropleth map is not coloring the regions
So I have previously done a choropleth map and it was working. This time I used the same approach but its not showing anymore
map and unis_colleges have the same shape, as well as index
The map and ...
0
votes
0
answers
90
views
How to create a 'count' choropleth map? Large dataframe with many different values overlain on separate geodatabase
I am aiming to plot a choropleth map (plotted using the polygons from a geodatabase) that will count the number of instances per region (wildlife management units) from a separate data frame (...
0
votes
1
answer
233
views
Plotly Choropleth Map not displaying GeoJSON Data Correctly - Possible Geometry or Mapping Issue
I'm quite new to choropleth_mapbox() and I don't know where the problem is in my script. I would like to display the average spot market energy prices in individual bidding zones. Ultimately, I would ...
0
votes
0
answers
164
views
Streamlit-folium no data return on click
Using streamlit_folium and geopandas explore() to display a choropleth map drawn with this code:
m = my_shapefile.explore(
column = 'risk',
popup = ['ID_PARCEL', 'Risk of infection:'],
...
1
vote
0
answers
85
views
Plotly Express choropleth giving error "Object of type bytes is not JSON serializable"
I am trying to use Choropleth from Plotly Express to plot data in US zip codes. I have a GeoJSON from this GitHub repo and am trying to use it in conjunction with a CSV which gives zip codes and the ...
0
votes
0
answers
237
views
Power BI Choropleth Map Legend Sort not by distribution but by a custom order
I am building a Power BI Choropleth map using the January 2024 PBI desktop version and would like some assistance setting a custom sort order for the map.
Currently, the sort order for the legend is ...
0
votes
0
answers
132
views
Dropdown menu in folium doesn't work (Python code)
I try to create a choropleth with Folium. The choropleth should show the different growth rates of the countries (lower growth rate = dark green, growth rate > 0 = red). In addition, I would like ...
1
vote
1
answer
197
views
Plotly ScatterGeo Text color
I'm using plotly to make a choropleth map.
I would like to add text labels to the map using fig.add_scattergeo, but it's borrowing the colormapping from the plot and it doesn't look good. The text ...
0
votes
1
answer
73
views
How to send less data to the client with Shiny/leaflet
I'd like to host a page that visualizes a choropleth map at the Census Tract level in the US. I think because of the fidelity of the data necessary, it is probably best to implement this as some kind ...
0
votes
1
answer
437
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 ...
0
votes
0
answers
59
views
Plotly choropleth map
I'm trying to make a choropleth map of country Indonesia to visualize the population value of each provinces. I'm using the plotly graph_objects module. The legend is showing, but the map just show as ...
1
vote
0
answers
42
views
How to implement color scale in choropleth map
I am creating a choropleth map that visualizes a world map, with certain countries highlighted with a color manually provided by plotly.dash. I want to have the ability to change the colors by a color ...
0
votes
1
answer
56
views
Finding regions in Choroplet map
I am trying to prepare Choropleth map for Kosovo. My intention is to map following districts/regions : Ferizaj, Gjakova,Gjilan,Mitrovica,Pecki,Pristina and Prizren.
I tried to do this with ggplot2 ...
1
vote
1
answer
140
views
Excel choropleth map - find/get regions?
I'm working on an Excel file with municipalities in NL. With the data->data type->geography I can label those municipalities. Next, I can add a value and create a map (image on the left). There ...
1
vote
1
answer
94
views
Plotly Express Choropleth of Census Data Fails
I am attempting to use Plotly Express to create interactive choropleths of Census data which I retrieve using the censusdis package. This works for two of the variables which I am retrieving, but not ...
2
votes
3
answers
761
views
Python Folium - Combine states in choropleth map of USA
I want to create a custom choropleth map for USA in which instead of showing states individually, I'd like to combine some states together e.g. Louisiana, Mississippi, Alabama, and Arkansas.
Below is ...
0
votes
1
answer
178
views
Python World States Plotly Choropleth Map
After longer than I probably should have waited it's time to ask some experts. I am working with the following data set https://gadm.org/data.html. I have downloaded the world polygons as a .gpkg file ...
1
vote
2
answers
367
views
Show state borders but not county borders on US Choropleth map
I have some US county-level data and I want a choropleth map that does show state borders but not county borders. Following this solution, I end up with this:
As you can see it seems the state ...
1
vote
1
answer
115
views
How can I edit the legend of a chloropleth map?
I am working on a map showing the minimum wage across the states in the US.
My code generates a map that looks good, but the legend is unordered, which is awkward. I would like it to be in ascending ...
0
votes
0
answers
53
views
Why choropleth mapbox, using animation, not show all discrete values from a dataframe?
I'm trying to plot a map using this dataframe (df_FR_1)
My problem is when I try to use choropleth_mapbox like this :
px.choropleth_mapbox(df_FR_1, geojson = geo_reg, locations = 'Code', color = '...
0
votes
1
answer
155
views
Highcharts map in python/Jupyter : no rendering
New to highcharts, I'm trying to draw a choropleth map for department in France with Jupyter notebooks (as a start)
from highcharts_maps.chart import Chart
import geopandas as gpd
import numpy as np
...
0
votes
1
answer
149
views
choropleth plotly with shapefiles not working
I'm downloading Fema's shapefiles (https://hazards.fema.gov/nri/data-resources) because I want to add a layer of my own data on top of it.
library(sf);library(dplyr);library(plotly)
counties=st_read(...
0
votes
1
answer
100
views
Plotly choropleth : deal with union of polygons and borders
I'm trying to make a choropleth map of cities in France (which means color the city in a scale). But, I'd like to enhance border of departments (which are a connex union of cities)
I manage to create ...
-1
votes
1
answer
426
views
Custom legend color and interval on geopandas explore
I have a geodataframe called gdf_isochrone that consists of 3 polygons:
isochrone_id travel_time_mins geometry furthest_distance speed category
0 is15 15 POLYGON ((106.77372 -6....
0
votes
1
answer
75
views
Choropleth plot gets inverted after simplifying geojson with rmapshaper
I want to make a geojson file small/less detailed to speeden up a R Plotly choropleth plot. This is a reproducible plot with the original geojson file:
library(rjson)
library(plotly)
geojson <- ...
2
votes
1
answer
83
views
Horizontal side by side choropleth subplots do not work
I want to have two r plotly choropleth plots in one subplot horizontally (side by side), but nrow=1 does not work, instead they appear vertically (above each other):
library(plotly)
df <- read.csv(&...
2
votes
1
answer
136
views
Label for Geopandas Choropleth
import plotly.figure_factory as ff
import numpy as np
import pandas as pd
df_sample = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/laucnty16.csv')
df_sample['State FIPS Code'...
1
vote
0
answers
52
views
Problem with creating breaks and setting colours for choropleth maps in RStudio
I am trying to plot a choropleth map of Ethiopia that shows the number of internally displaced persons (IDPs) as a percentage of the total population for each Zone (county). I have uploaded the ...
0
votes
0
answers
62
views
D3 map showing a blank/dead area for only one county
I updated a D3 map of all US counties by SNAP participation to use newer data (2017-2021 5-year ACS) and an updated topojson file (counties-alters-10m.json, from US Atlas, on Github here: https://...
-1
votes
1
answer
63
views
json in Python - str to int
I am trying to learn how to create Geographical Visualizations with Python. I have downloaded json of UK cities. But they are coming in as str and so I don't know how to use them.
My json is from here:...
1
vote
1
answer
79
views
Adding interactive points on highcharter USA map that already includes state data
I would like to add interactive map points on a map that I created using highcharter. Everything looks fine up to the point that I add those points.
While the points appear on the correct location, ...
1
vote
1
answer
434
views
choropleth map does not render in Dashboard Studio but it does in Classic Dashboards
I need to plot a world map and color countries based on the count and this to a dashboard. This is my query
...<ommitted> AS iso2
| search iso2=*
| stats count by iso2
| lookup ...
1
vote
1
answer
243
views
How do I bring the search circle from leaflet.extras::addSearchOSM() to front of leaflet/tmap map?
I am trying to bring the blue search circle from the addSearchOSM() function from leaflet.extras above a choropleth map made by tmap and converted to leaflet. Does anybody know how to bring the blue ...
0
votes
1
answer
134
views
Trouble making a Choropleth map with Folium
I am looking to make a chloropleth map of UK cities
I am using this geojson: https://geoportal.statistics.gov.uk/datasets/ons::counties-december-2019-boundaries-en-bfc/explore
venue_map = folium.Map(...
1
vote
1
answer
85
views
Plotly Choropleth Map not populating
I'm trying to create a Choropleth map of Users per state, but it's blank and I'm not sure what's going on.
My data
import pandas as pd
import plotly.express as px
data = pd.read_csv('...