geopandas

Getting error code 1 while installing geopandas with pip

拟墨画扇 提交于 2019-12-13 09:35:01
问题 This is the error I get when trying to install geopandas using pip install geopandas. I'm using Python 3.7. Collecting geopandas Using cached https://files.pythonhosted.org/packages/24/11/d77c157c16909bd77557d00798b05a5b6615ed60acb5900fbe6a65d35e93/geopandas-0.4.0-py2.py3-none-any.whl Collecting pyproj (from geopandas) Using cached https://files.pythonhosted.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz Complete output from command

How to fill missing geo location in datasets? [closed]

隐身守侯 提交于 2019-12-13 08:11:34
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I have a set of dataset with missing geo location names and coordinates at same time. I want to fill in the gaps so that I can proceed with the future analysis of the data. The data set is harvested from twitter so it is not a created data but this is how the data has come and I

GeoViews: add a slider to chloropleth with Polygon geometries

巧了我就是萌 提交于 2019-12-13 04:11:31
问题 I am trying to do something similar to the OP in this question Geoviews: Add a slider to choropleth map, but it wasn't fully answered. In brief, I have a GeoDataFrame like this: I would like to visualise pre_anom by geometry in a GeoViews map, but I have multiple years for each geometry element. I'd like to have a slider created automatically for the extra kdim year, but if I specify year as a kdim like so: gv.Polygons(gdf, kdims=['year'], vdims=['pre_anom']).opts(width=600, height=600, tools

Python: problem to import fiona after other installation

送分小仙女□ 提交于 2019-12-12 22:41:25
问题 I don't why but I am now experiencing this issue on mac. I installed everything trough anaconda . Everything was working fine before a Restart of the system import fiona --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-8-4c762272c079> in <module> ----> 1 import fiona /anaconda3/lib/python3.6/site-packages/fiona/__init__.py in <module> 81 os.environ["PATH"] = os.environ["PATH"] + ";" + libdir 82 ---> 83

GeoPandas, MatPlotLib Plot Custom Colors

百般思念 提交于 2019-12-12 07:39:02
问题 Given the shape file available here: I'd like to plot the specified set of counties below with custom colors; 'blue' for Wayne and Washtenaw counties and 'grey' for the others. import geopandas as gpd import matplotlib.pyplot as plt %matplotlib inline shpfile=<Path to unzipped .shp file referenced and linked above> c=gpd.read_file(shpfile) c=c.loc[c['GEOID'].isin(['26161','26093','26049','26091','26075','26125','26163','26099','26115','26065'])] c.plot() I'd prefer to assign the colors as a

Why can't one set to “False” specific axis ticklabels (ex: xlabels_top, ylabels_right) from a cartopy-geopandas plot?

可紊 提交于 2019-12-11 18:32:16
问题 I am having serious difficulties in setting to False the xlabels_top and ylabels_right from my Geopandas plot. This geopandas plot is made inside a Geoaxes subplot created with PlateCarree projection from Cartopy library. My geopandas Geodataframe is in SIRGAS 2000 (units: degrees), EPSG: 4989. Therefore I created a Geodetic Globe object from the cartopy library. Here is a code snippet: import matplotlib.pyplot as plt import cartopy.crs as ccrs import geopandas as gpd Geopandas_DF = gpd.read

Fiona reading data

一个人想着一个人 提交于 2019-12-11 11:08:24
问题 I have problems concerning reading data using geopandas , but it seems the error is due to fiona according to this post I tried to reinstall fiona to 1.1.6 version, but still it does not work.. import fiona with fiona.open('taz.shp') as src: for feature in src: print feature --------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-31-b70513efc12b> in <module>() 1 import fiona 2 with fiona.open('taz.shp') as src: --

format/round numerical legend label in GeoPandas

穿精又带淫゛_ 提交于 2019-12-11 10:07:26
问题 I'm looking for a way to format/round the numerical legend labels in those maps produced by .plot() function in GeoPandas. For example: gdf.plot(column='pop2010', scheme='QUANTILES', k=4) This gives me a legend with many decimal places: I want the legend label to be integers. 回答1: As I recently encountered the same issue, and a solution does not appear to be readily available on Stack Overflow or other sites, I thought I would post the approach I took in case it is useful. First, a basic plot

Geopandas touches method on geoseries does not work as I expect

China☆狼群 提交于 2019-12-11 06:59:56
问题 I have two geoseries in the same crs. I want to extract from the geoseries_1 all the polygons touching any polygon of geoseries_2. In the documentation it says that geoseries are tested element-wise, so I do: geoseries_1.touches(geoseries_2) but the output is 0 False 1 False 2 False ... 569 False 597 False 598 False Length: 599, dtype: bool but I know some of the polygons of geoseries_1 are actually touching some polygons in geoseries_2 and if I do for example: geoseries_1.touches(geoseries_2

Python Pandas - Flatten Nested JSON

落爺英雄遲暮 提交于 2019-12-11 05:38:34
问题 Working with Nested JSON data that I am trying to transform to a Pandas dataframe. The json_normalize function offers a way to accomplish this. {'locations': [{'accuracy': 17, 'activity': [{'activity': [{'confidence': 100, 'type': 'STILL'}], 'timestampMs': '1542652'}], 'altitude': -10, 'latitudeE7': 3777321, 'longitudeE7': -122423125, 'timestampMs': '1542654', 'verticalAccuracy': 2}]} I utilized the function to normalize locations, however, the nested part 'activity' is not flat. Here's my