Comments (6)
Hi @dakmatt,
Thanks for sharing, I tried to reproduce with the following data based on your screenshot:
df = pd.DataFrame(
[
["JUMLAH", 790136, np.nan, np.nan],
["ALOR GAJAH", 173712, 2.382211, 102.211561],
["Ayer Pa'Abas", 2644, 2.396907, 102.166641],
],
columns=['label', 'size', 'latitude', 'longitude'],
)
mplt.plot_markers(df)
and it worked... except for the fact that the NaN
values lead to a weird marker on the map, I'll add that improvement to the backlog:
Could you share more so that I can reproduce your error?
I believe it is due to an unsuccessful query to Google APIs, which then return a wrong string (not an image basically) and Pillow fails to load it. Can't be 100% sure given the context though.
If I can reproduce it, I'm more than happy to add some verbose to the error, I acknowledge it's not very helpful at the moment!
Hope it helps,
Thomas
from mapsplotlib.
Added this issue to the board #4
from mapsplotlib.
Any luck @dakmatt ?
from mapsplotlib.
I can confirm that this happens when Google sends a "403" response code. For me, it meant that I forgot to enable the "static maps" API.
from mapsplotlib.
Ok thanks @rudolfbyker, I'll add some logic to handle the response codes.
from mapsplotlib.
I released version 1.0.6 on pypi with HTTP error handling, it should prevent this issue in the future.
Thanks for reporting!
from mapsplotlib.
Related Issues (17)
- AttributeError: module 'gmaps' has no attribute 'plot_markers' HOT 3
- how to know which color is which cluster? HOT 2
- Unusable Map Results HOT 3
- Heatmap returns error: UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128) HOT 12
- HTTP firbidden error HOT 5
- Integrate with GeoPandas? HOT 1
- Image positioning and zooming HOT 2
- Integrate into subplot HOT 3
- Heatmap colours are very dim HOT 2
- Polyline? HOT 3
- Allow passing API key without adding it to code (for install through pypi) HOT 1
- Filter out NaNs in lat/long
- Rotate map HOT 4
- Set upper limit in `get_zoom` function. HOT 3
- unable to import mapsplotlib HOT 5
- Zoom in and out HOT 5
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.