andrea-cuttone / geoplotlib Goto Github PK
View Code? Open in Web Editor NEWpython toolbox for visualizing geographical data and making maps
License: MIT License
python toolbox for visualizing geographical data and making maps
License: MIT License
Hey Andrea,
Do you have any idea how to embed the pyglet window into a jupyter notebook?
Currently I output as an image and just reference it from there. Any better idea or integration available?
Hello Andrea!
I try using geoplotlib but getting an error: module 'geoplotlib' has no attribute 'utils'.
import geoplotlib
thedata = geoplotlib.utils.read_csv('bus.csv')
geoplotlib.dot (thedata)
geoplotlib.show ()
Geoplotlib was istalled by 'pip install geoplotlib' successfully. What is my problem?
Thank you!
I'm defining a bounding box like this
max_lat = -123.0137
min_lon = 37.6040
min_lat = -122.3549
max_lon = 37.8324
bbox = BoundingBox(north=max_lat, west=min_lon, south=min_lat, east=max_lon)
geoplotlib.set_bbox(bbox)
geoplotlib.inline()
geoplotlib.dot(geo_data)
geoplotlib.show()
And I get this error (presumably because you're taking the log of a negative "lat" number?)
File "C:\Users\xxx\Anaconda2\lib\site-packages\geoplotlib\core.py", line 689, in deg2num ytile = (1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n ValueError: math domain error
Am i doing something wrong?
Running someone's demo behind a company proxy, I encountered an error:
>>> data
DataAccessObject(['City', 'lat', 'lon'] x 52)
>>> geoplotlib.dot(data,point_size=3)
>>> geoplotlib.show()
('http://a.basemaps.cartocdn.com/light_all/7/63/40.png', <HTTPError 403: 'Forbidden'>)
('http://a.basemaps.cartocdn.com/light_all/7/63/41.png', <HTTPError 403: 'Forbidden'>)
('http://a.basemaps.cartocdn.com/light_all/7/64/44.png', <HTTPError 403: 'Forbidden'>)
('http://a.basemaps.cartocdn.com/light_all/7/70/43.png', <HTTPError 403: 'Forbidden'>)
('http://a.basemaps.cartocdn.com/light_all/7/64/42.png', <HTTPError 403: 'Forbidden'>)
('http://b.basemaps.cartocdn.com/light_all/7/71/43.png', <HTTPError 403: 'Forbidden'>)
...
What resolved this for me was explicitly defining the urllib proxy in Python 3:
>>> proxy_handler = geoplotlib.utils.urllib.request.ProxyHandler({'http':'http://my-company-proxy:1234'})
>>> opener = geoplotlib.utils.urllib.request.build_opener(proxy_handler)
>>> geoplotlib.utils.urllib.request.install_opener(opener)
Repeating the demo, all map tiles became visible beneath the data dots.
urllib will auto-detect the environmental variable for http_proxy
, so another way to resolve this issue in Windows is to define that variable in the System Properties dialog.
MacOS after
import geoplotlib
raise error
OSX NotImplementedError: abstract
used 3 pyglet versions (1.2.4, 1.3 and 1.4)
Hi there, I'm using geoplotlib on Linux and I have nvidia drivers set with optirun and bumblebee. geoplotlib fails silently when doing a simple import geoplotlib
when I activate my graphics to use with it. Can you point me some suggestions or documentation where I can try to move forward or make tests with that?
Thanks!
Hi,
I'm using geoplotlib for academic research and projects. Sometimes I only want the graph, such as air flight graph, but not map tiles. Is there a way to turn off tile provider and let the graph rendered on a blank background ?
I have found a solution but it is a little bit inelegant. I set the tile provider with a invalid url so that the background will be black and no map tile will appear. My solution is easy, but every time I shut down the pyglet window, there will be a huge bunch of warnings, which will take some time to wait for my ipython console to display them. Is there a more elegant way ?
Thank you !
Hi I am encountering a memory Error at utils.py, line 152, in read_csv values[k].a[[end(v) when I was loading a 700MB csv file.
Thanks,
This lib is very cool and powerful though many aspects can also be improved.
When i use it, two problems bother me.
Window
Class has a argument resizable
that can be used to let the geoplotlib Window become resizable, the pyglet on_resize
event method must be re-write in geoplotlib to take care of the Map background.i want implement, but i'am not very familiar with pyglet and geoplotlib,
do you have some suggestions?
Hello, on Windows and also I believe on Mac running pip install geoplotlib
, then import geoplotlib
, and then trying to use any of the methods results in the following error:
ImportError: No module named 'pyglet'
This isn't a huge deal—just pip install pyglet
and you're done. But this a dependency that should install alongside geoplotlib
when you run pip install geoplotlib
. Unless there is some good reason for not immediately including it that I'm not aware of?
Geopandas is a powerful extension of the pandas package. It can handle an array of geospatial data formats.
As such it would be nice to have it integrated into the plotting capabilities of geoplotlib. Isn't it possible to extend the functionality of the GeoJSONLayer in order to support data of type GeoDataFrame, too?
@andrea-cuttone
As of now, I have been adding dots and labels at latitude, longitude locations which is fine for screenshots, but it would be helpful to be able to keep it in a certain location of the window when zooming...I guess this would be a pyglet object. I am not familiar with pyglet so any help in the right direction is welcome!
Hello,
I can't seem to get this to work... All I have is this so far:
import geoplotlib
import csv
thedata = geoplotlib.utils.read_csv('cities_2.csv')
and it's throwing this error:
Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
I used savefig, but the result image is not completed.
Is there any way to solve it??
class CustomLayer(BaseLayer):
def __init__(self, data, label):
self.data = data
self.label = label
def invalidate(self, proj):
x, y = proj.lonlat_to_screen(self.data['lon'], self.data['lat'])
self.painter = BatchPainter()
#self.painter.points(x, y)
# TODO: Change the color or size depending on the some index.
# TODO: ADD edge
for i in range(len(x)):
self.painter.circle_filled(x[i], y[i], r=5)
self.painter.labels(x,y,self.label)
def draw(self, proj, mouse_x, mouse_y, ui_manager):
self.painter.batch_draw()
def draw_geo(meta, path_img, coords, csv_name):
data = geoplotlib.utils.read_csv(csv_name)
label = np.array(coords)[1:,0]
geoplotlib.add_layer(CustomLayer(data, label))
#geoplotlib.dot(data, point_size=5)
#geoplotlib.labels(data, 'name', color=[0,0,255,255], font_size=10, anchor_x='center')
# TODO: Change the color or size depending on the some index.
# TODO: ADD edge
#geoplotlib.show()
geoplotlib.savefig(path_img)
while loading a png marker pyglet seems to be blending the transparent pixels with black instead of with whatever there is below them. Therefore, for example multiple red half-transparent markers on top of one another become black instead of red.
Possible fix:
http://stackoverflow.com/questions/27827547/load-image-with-pyglet-turns-some-transparency-pixels-white
https://gist.github.com/jamesadney/1975776
Hello!
I'm new to python so I don't exactly know how to manage the libraries, so maybe I made a mistake somewhere, but this lib just doesn't work for me.
I added the library through Project Interpreter, where I added your repository via url. Then I installed geoplotlib and tried to run your example code - but a problem occured - it can not find the reference utils. I'm attaching a screen, where you can see, that I have imported geoplotlib and that there is your example file bus.csv:
Can you, please, help me with this problem?
Thanks in advance,
Erika.
Hi, I had this problem while using KMeansLayer:
raise Exception('convexhull requires at least 3 points')
how can I use it?
ps: my data file is a txt file, and it has three columns (id, lon, lat).
here is my python code.
import geoplotlib geoplotlib.geojson('bus.json') geoplotlib.show()
and here is the content of file "bus.json".
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 39.994238, 116.326786 ] }, "properties": { "prop0": "value0" } } ] }
How could this happen?Any thing wrong?
Python Version = 3.10.8
Facing issue while trying to install geoplotlib using pip install geoplotlib
Install LOG:
_Collecting geoplotlib
Using cached geoplotlib-0.3.2.tar.gz (22 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in geoplotlib setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output._
For example in https://github.com/andrea-cuttone/geoplotlib/blob/master/examples/follow_camera.py, changing the bottom part to:
otherdata = read_csv('data/taxi.csv')
geoplotlib.dot(otherdata)
geoplotlib.add_layer(TrailsLayer())
geoplotlib.show()
leads to the dot map not being displayed. This is because the following happens:
in fact, invalidating the layers at every frame (for example in https://github.com/andrea-cuttone/geoplotlib/blob/master/geoplotlib/core.py#L229).
The code should be changed so that changes in the projection are propagated to all layers.
A workaround for now is to render the dots in the same method where the projection is modified, using two separate painters:
def draw(self, proj, mouse_x, mouse_y, ui_manager):
df = self.data.where((self.data['timestamp'] > self.t) & (self.data['timestamp'] <= self.t + 30*60))
proj.fit(BoundingBox.from_points(lons=df['lon'], lats=df['lat']), max_zoom=14)
allx, ally = proj.lonlat_to_screen(self.data['lon'], self.data['lat'])
self.painter = BatchPainter()
self.painter.set_color([255,0,0])
self.painter.points(allx, ally)
self.painter.batch_draw()
x, y = proj.lonlat_to_screen(df['lon'], df['lat'])
self.painter = BatchPainter()
self.painter.set_color([0,0,255])
self.painter.linestrip(x, y, 10)
self.t += 30
if self.t > self.data['timestamp'].max():
self.t = self.data['timestamp'].min()
self.painter.batch_draw()
ui_manager.info(epoch_to_str(self.t))
Thanks to Zhicheng Liu for reporting the issue.
Hi, I try to run this simple code:
import geoplotlib
from geoplotlib.utils import read_csv
data = read_csv('bus.csv')
geoplotlib.dot(data)
geoplotlib.show()
but, I got this error:
Traceback (most recent call last):
File "C:\Anaconda\lib\site-packages\geoplotlib__init__.py", line 31, in _runapp
app.start()
File "C:\Anaconda\lib\site-packages\geoplotlib\core.py", line 308, in start
self.proj.fit(BoundingBox.from_bboxes([l.bbox() for l in self.geoplotlib_config.layers]))
File "C:\Anaconda\lib\site-packages\geoplotlib\layers.py", line 159, in bbox
return BoundingBox.from_points(lons=self.data['lon'], lats=self.data['lat'])
File "C:\Anaconda\lib\site-packages\geoplotlib\utils.py", line 62, in getitem
return self.dict[key]
KeyError: 'lon'
While setting this up to play around with a few of the examples, I faced a few issues because of lack of dependencies that are required to run this file, one of which is pylab
but which isn't mentioned in the installation document. Pylab
error was thrown when running python graph-flights.py
. It'd be great if this could be added to the documentation. Also a simpler way to set it up would be to use a requirements.txt
file, so that in case developers use a virtualenv
, they can get all the requirements to run geoplotlib with a one step installation by doing pip install -r requirements.txt
, After the whole installation, the required requirements file on my dev environment. Most of these have been installed after pylab
. It'd be great if this file could be present in the repo.
funcsigs==0.4
geoplotlib==0.3.0
matplotlib==1.4.3
mock==1.3.0
nose==1.3.7
numpy==1.9.3
pbr==1.8.0
pyglet==1.2.4
pyparsing==2.0.3
pyshp==1.2.3
python-dateutil==2.4.2
pytz==2015.6
scipy==0.16.0
six==1.9.0
wsgiref==0.1.2
[x] Bug (Typo)
segamentation
, however expect to see segmentation
.tesselation
, however expect to see tessellation
.sacle
, however expect to see scale
.screeshot
, however expect to see screenshot
.Semi-automated issue generated by
https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md
To avoid wasting CI processing resources a branch with the fix has been
prepared but a pull request has not yet been created. A pull request fixing
the issue can be prepared from the link below, feel free to create it or
request @timgates42 create the PR. Alternatively if the fix is undesired please
close the issue with a small comment about the reasoning.
https://github.com/timgates42/geoplotlib/pull/new/bugfix_typos
Thanks.
Hi Andrea,
i am using google localisation data as input. -cf below-
geoplotlib and pygmet correct versions have been imported.
yet the nature of my data does not seem correct. -KeyError: 'lon', cf below-
Can you help?
tz=getattr(series.dtype, 'tz', None))
File "pandas_libs\index.pyx", line 98, in pandas._libs.index.IndexEngine.get_value
File "pandas_libs\index.pyx", line 106, in pandas._libs.index.IndexEngine.get_value
File "pandas_libs\index.pyx", line 156, in pandas._libs.index.IndexEngine.get_loc
KeyError: 'lon'
df_course_real['Pickup location lat/long'].head()
Out[22]:
1 48.876389, 2.3584339000000236
2 48.86339, 2.313086
4 48.8410203, 2.3203779
10 48.863203, 2.315618
11 48.862982, 2.312684
Name: Pickup location lat/long, dtype: object
I have a .csv file that looks just like the flights.csv example but when I try to run the graph method, I get that error. It has the latitude and longitude of bike routes and they look like they're in degrees to me.
Can you interprete the framework of the souce code or make some explain? Thanks
I'd like to show percentage changes of a quantity for different states on a map. However, in color.py, it generates an exception for negative values. When looking at colormap examples for matplotlib at http://matplotlib.org/examples/color/colormaps_reference.html it seems that the "diverging" colormaps are made for positive and negative values. Is there a deep reason for this exception, or could I comment it out and re-install geoplotlib like that? Thanks!
Hi Andrea,
I love the idea of this package but have been unlucky when trying to run it on my computer.
When I try to run any file with this package (in jupyter or a .py), a second python process fires up, even when I am only running import statements.
When I get through to a drawing (.show()) step, the kernel or python crashes unexpectedly.
I attempted this and had the process crash with both my own examples that I had worked on and your taxi example. My collaborator, however, had no such issues.
I did have luck getting a still image to pop up using .inline(), but that was it.
Any ideas what might be going wrong?
Hi,
I have two sets of data, which I want to plot as dots at the same time with different colors. Is that possible without writing a custom layer?
Regards
The Queue module used in geoplotlib/core.py is not supported in Python3. It has been changed to lowercase 'q' in python3.
Line 4 in 83c39d9
Stacktrace, Is there something that's missing to run this sample, I am facing this issue on
2015-09-30 12:05:38.429 Python[19294:2380557] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/sx/5cqr_xwj5c50nlc6by1431sm0000gn/T/org.python.python.savedState
Traceback (most recent call last):
File "delaunay.py", line 10, in <module>
geoplotlib.delaunay(data, cmap='hot_r')
File "build/bdist.macosx-10.10-x86_64/egg/geoplotlib/__init__.py", line 177, in delaunay
File "build/bdist.macosx-10.10-x86_64/egg/geoplotlib/layers.py", line 405, in __init__
File "build/bdist.macosx-10.10-x86_64/egg/geoplotlib/colors.py", line 18, in __init__
ImportError: cannot import name get_cmap
Hi 👋
I'm trying to create a visualisation in which the dots are all coloured according to a given variable, e.g. the price of an accommodation. Each dot should represent this price with a color mapped to a colormap.
Currently my approach is this:
...
for id in self.data['id']:
grp = self.data.where(self.data['id'] == id)
color = self.cmap.to_color(max('price'], 1), max_val, 'log')
self.painter.set_color(color)
x, y = proj.lonlat_to_screen(grp['lon'], grp['lat'])
self.painter.points(x, y, 5)
...
However, this is very inefficient and nearly freezes the visualisation...
Do you have any proposal on how to do that @andrea-cuttone ?
Thank you very much
Best
Tim
Hello All,
I only have 2 years of experience with Python and only a few weeks of playing around with Geoplotlib. So, I'm no expert.
I'm receiving a few exceptions when feeding a script-generated dictionary ultimately into the geoplotlib.plot() function. Utilizing the exact script sequence, but with a hand-written dictionary, ultimately a map is generated. After a good deal of experimentation, the crucial difference between the two dictionaries appears to be that one character space between the colon after the 'key' and the start of a list containing 'values' is present in the script-generated dictionary.
ex:
hand-written - {'key':[value]}
script-generated dictionary - {'key': [value]} #note one character space between ':' and '['
Here's a list of what appears to be the necessary modules loaded in my Python v3.6 installation:
...
numpy 1.14.3
pandas 0.22.0
geoplotlib 0.3.2
matplotlib 3.0.2
pyglet 1.3.2
scipy 1.1.0
pyshp 1.2.12
And an example of the script that runs fine in one case, ie produces a map, as well as the variation that produces the exceptions and no map. Note: Both dictionaries take the name 'dict' after their declaration statements below when ran separately through the rest of the script. Here, implying their renaming was done just to reduce redundancy in the post.
<
...
import numpy as np
import pandas as pd
import geoplotlib
import matplotlib
from geoplotlib.utils import DataAccessObject
import pyglet
import scipy
...
generated_dict = {'lat': [37.7749, 51.5074], 'lon': [-122.4194, 0.1278]} # generated via extraction from a source
static_dict = {'lat':[37.7749, 51.5074], 'lon':[-122.4194, 0.1278]} # typed by hand
print(type(dict)) #output: <class 'dict'>
print(type(dict['lat'][0])) #output: <class 'float'>
df = pd.DataFrame(dict) # characteristics as expected
dao = DataAccessObject(df) # no exceptions
geoplotlib.dot(dao) # no exceptions
geoplotlib.show()
# static_dict results in producing map as expected. No exceptions
# generated_dict throws exception at his step. No map generated
Lastly, the exceptions produced:
Console: Exceptions
C:...Python\Python36\lib\site-packages\geoplotlib\core.py:753:
RuntimeWarning: invalid value encountered in log ytile = (1.0 - np.log(np.tan(lat_rad) + (1 / np.cos(lat_rad))) / math.pi) / 2.0 * n
File "C:...Python\Python36\lib\site-packages\geoplotlib\core.py", line 365, in start
force_zoom=self.geoplotlib_config.requested_zoom)
File "C:...Python\Python36\lib\site-packages\geoplotlib\core.py", line 677, in fit
west_tile, north_tile = self.deg2num(bbox.north, bbox.west, self.zoom)
File "C:...Python\Python36\lib\site-packages\geoplotlib\core.py", line 689, in deg2num
ytile = (1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n ValueError: math domain error
Any help would be greatly appreciated, how do I avoid generating exceptions when feeding a generated dictionary from my scripts into the rest of the processing steps leading to a map being generated? Thanks.
Is it possible to save the maps into a file automatically from the python code, instead of using the keyboard control "P" to save a screenshot?
I am running Windows 7 Enterprise (Service Pack 1). I run Python 2.7. I can run the pyglet "hello world" but when I import geoplotlib, I get the following error message:
Traceback (most recent call last):
File "<pyshell#1>", line 1
import geoplotlib
File "C:\Python27\Lib\site-packages\geoplotlib__init__.py", line 24
global_config = AppConfig()
File "C:\Python27\Lib\site-packages\geoplotlib__init_.py", line 9, in init
self.reset()
File "C:\Python27\Lib\site-packages\geoplotlib__init__.py", line 19, in reset
screen = pyglet.canvas.get_display().get_default_screen()
AttributeError: 'module' object has no attribute 'canvas'
I did import pyglet before importing geoplotlib, and it does not make any difference. I also re-installed geoplotlib from the source, as you advised, but it still gives the same message.
Pyglet was already installed with the Python version I downloaded a while ago (Python 2.7 from Enthought)
Many thanks!!
I know I can use the keyboard key 'P' to take a screenshot, but I want to save the output using python only, since once we execute it runs in GUI in background but there's no way to save the result.
Wiki:
By default, geoplotlib uses map tiles from MapQuest
The default seems to be positron. I can get all other tiles to work.
Off topic: how come all the stamen maps, except terrain are implemented?
Error traceback (doesn't seem to work with .show() either)
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-49-eb21797bb0c1> in <module>()
12
13 geoplotlib.kde(geo_data_for_plotting, bw=5, cmap='jet', cut_below=1e-4)#, scaling='lin')
---> 14 geoplotlib.inline()
/Users/mads/anaconda2/lib/python2.7/site-packages/geoplotlib/__init__.pyc in inline(width)
65 break
66
---> 67 savefig(fname)
68
69 if os.path.isfile(fname + '.png'):
/Users/mads/anaconda2/lib/python2.7/site-packages/geoplotlib/__init__.pyc in savefig(fname)
46 """Launch geoplotlib, saves a screeshot and terminates"""
47 _global_config.savefig = fname
---> 48 _runapp(_global_config)
49
50
/Users/mads/anaconda2/lib/python2.7/site-packages/geoplotlib/__init__.pyc in _runapp(app_config)
28
29 def _runapp(app_config):
---> 30 app = GeoplotlibApp(app_config)
31 try:
32 app.start()
/Users/mads/anaconda2/lib/python2.7/site-packages/geoplotlib/core.pyc in __init__(self, geoplotlib_config)
172 self.ui_manager = UiManager()
173 self.proj = Projector()
--> 174 self.map_layer = MapLayer(geoplotlib_config.tiles_provider, skipdl=False)
175
176 self.scroll_delay = 0
/Users/mads/anaconda2/lib/python2.7/site-packages/geoplotlib/core.pyc in __init__(self, tiles_provider, skipdl)
839 self.attribution = _DEFAULT_TILE_PROVIDERS[tiles_provider]['attribution']
840 else:
--> 841 raise Exception('unknown style ' + tiles_provider)
842 else:
843 self.tiles_dir = tiles_provider['tiles_dir']
Exception: unknown style mapquest
Error message:
Traceback (most recent call last):
File "C:\Miniconda3\lib\site-packages\geoplotlib__init__.py",2, in runapp
app.start()
File "C:\Miniconda3\lib\site-packages\geoplotlib\core.py", linin start
l.invalidate(self.proj)
File "C:\Miniconda3\lib\site-packages\geoplotlib\layers.py", l, in invalidate
self.painter.sprites(self.marker, x, y, self.scale)
File "C:\Miniconda3\lib\site-packages\geoplotlib\core.py", linin sprites
sprite = Sprite(image, batch=self.batch)
File "C:\Miniconda3\lib\site-packages\pyglet\sprite.py", line init
self.texture = img.get_texture()
File "C:\Miniconda3\lib\site-packages\pyglet\image__init.py 818, in get_texture
force_rectangle)
File "C:\Miniconda3\lib\site-packages\pyglet\image__init_.py 809, in create_texture
self.anchor_x, self.anchor_y, 0, None)
File "C:\Miniconda3\lib\site-packages\pyglet\image__init__.py 986, in blit_to_texture
data)
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong typ
I am using geoplot to visualize air pressure at 10 m level. Air pressure values are always between 870 and 1084 hPa
I am happy to feed the data as actual_data - minimum_value. I am not happy with the color bar which consequently reaches
from 0 to 214 hPa and will have labels accordingly. I tried to overlay the colorbar class of UiManager, but did not have succes yet. Please see my proposed changes
Proposedcolorbar.pdf
print('smallest non-zero count', H[H > 0][0])
IndexError: index 0 is out of bounds for axis 0 with size 0
In [1]: import geoplotlib
libGL error: pci id for fd 10: 80ee:beef, driver (null)
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table
OpenGL Warning: glVertexArrayRangeNV not found in mesa table
OpenGL Warning: glCombinerInputNV not found in mesa table
OpenGL Warning: glCombinerOutputNV not found in mesa table
OpenGL Warning: glCombinerParameterfNV not found in mesa table
OpenGL Warning: glCombinerParameterfvNV not found in mesa table
OpenGL Warning: glCombinerParameteriNV not found in mesa table
OpenGL Warning: glCombinerParameterivNV not found in mesa table
OpenGL Warning: glFinalCombinerInputNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table
OpenGL Warning: glDeleteFencesNV not found in mesa table
OpenGL Warning: glFinishFenceNV not found in mesa table
OpenGL Warning: glGenFencesNV not found in mesa table
OpenGL Warning: glGetFenceivNV not found in mesa table
OpenGL Warning: glIsFenceNV not found in mesa table
OpenGL Warning: glSetFenceNV not found in mesa table
OpenGL Warning: glTestFenceNV not found in mesa table
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
Segmentation fault
Tried to run the example code from the arxiv paper:
>>> from pandas import read_csv # BTW this line should be included in the paper
>>> data = read_csv("data/opencellid_dk.csv")
>>>
>>> import geoplotlib
>>> geoplotlib.hist(data,colorscale='sqrt',binsize=8)
>>> geoplotlib.show()
Traceback (most recent call last):
File "build/bdist.macosx-10.6-x86_64/egg/geoplotlib/__init__.py", line 32, in _runapp
app.start()
File "build/bdist.macosx-10.6-x86_64/egg/geoplotlib/core.py", line 367, in start
l.invalidate(self.proj)
File "build/bdist.macosx-10.6-x86_64/egg/geoplotlib/layers.py", line 200, in invalidate
for v1, v2 in uniquevalues}
File "build/bdist.macosx-10.6-x86_64/egg/geoplotlib/layers.py", line 200, in <dictcomp>
for v1, v2 in uniquevalues}
File "/Users/Joke/anaconda/lib/python2.7/site-packages/pandas/core/generic.py", line 3244, in wh
ere
try_cast=try_cast)
File "/Users/Joke/anaconda/lib/python2.7/site-packages/pandas/core/internals.py", line 2210, in
where
return self.apply('where', **kwargs)
File "/Users/Joke/anaconda/lib/python2.7/site-packages/pandas/core/internals.py", line 2192, in
apply
applied = getattr(b, f)(**kwargs)
File "/Users/Joke/anaconda/lib/python2.7/site-packages/pandas/core/internals.py", line 999, in w
here
mask = np.array([cond[i].all() for i in range(cond.shape[0])],
AttributeError: 'float' object has no attribute 'all'
First of all, really thank geoplotlib . It helps me a lot.
I recently use geoplotlib.graph to create graph on map, I notice that the color of edges represents the length of edges(I find it in the paper)。
I wonder if there are any chance to draw the edge color based on edge weights or something else ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.