Commit Graph
858 Commits
Author SHA1 Message Date
Edward Betts 74fa1368a3 Correct spelling mistakes. (#615) 2017-11-20 15:56:48 +01:00
Chris Holdgraf 1da8f6279c DOC: add sphinx gallery for examples (#463) 2017-11-19 23:54:05 +01:00
James McBride 3e26d22b05 TST: Test inplace transform on geodataframe (#593)
Simple test effectively replicating the test on a not-inplace transform.
2017-11-19 14:43:24 -08:00
robochat 18160efc16 BUG: retain index names of input frames to sjoin (#545)
* BUG: sjoin modifies original frame (#525)

Original pandas table's index names are no
longer changed by sjoin() call. Includes
some unit-tests. Fixes issue #525

* New code to fix issue that is compatible with pandas 0.16.2 - 0.20.3

* applied suggested changes to test_sjoin.py
2017-10-22 13:59:27 -07:00
Dani Arribas-Bel 87e7541daf Fix error on plot empty GeoDataFrame (#571) 2017-10-16 23:34:29 +02:00
James McBride cc1a0f535b CLN: Remove try/except for old GEOS bug (#576)
Handling for a bug discussed in
https://github.com/Toblerity/Shapely/issues/47#issuecomment-18506767
seems no likely necessary, given the issue was fixed 4 years ago.
2017-10-16 21:38:41 +02:00
James McBride 714d9a8ea2 TST: Warning for sjoin CRS mismatch, and test (#577) 2017-10-16 21:35:33 +02:00
James McBride 2e9c72b22e Add asv benchmark for to_crs (#578) 2017-10-10 14:49:02 +02:00
James McBride 173e6e4265 COMPAT: Remove deprecated usage if ix (#579)
As of 0.20.0, pandas .ix is deprecated. This switches all such instances
to the label based .loc indexer. (In searching for usage, I also noticed
the CHANGELOG contained an error in describing the introduction of the
.cx indexer.)
2017-10-09 09:14:30 +02:00
James McBride 6daedd6b99 TST: Add test of overlay with non-integer index (#580)
All current overlay tests have indices for which loc/iloc give the same
result. Since ix will be deprecated, add a test to distinguish behavior
between the two.
2017-10-09 09:13:37 +02:00
Chris Holdgraf f053d654ba DOC: update installation instructions in README (#548) 2017-10-01 11:24:53 +02:00
James McBride 5fd7f2db42 TST: Set test gdf crs to silence crs warning (#567)
* TST: Set test gdf crs to silence crs warning

The symmetric difference test compared a frame with a crs to one
without. It didn't seem that this was intentional, so set the second
frame crs to the first so that the tests run without warnings.

Warning below:
geopandas/tests/test_geom_methods.py::TestGeomMethods::()::test_symmetric_difference_series
  /home/james/python/geopandas/geopandas/base.py:29: UserWarning: GeoSeries crs mismatch: {'init': 'epsg:4326', 'no_defs': True} and None
    other.crs))

geopandas/tests/test_geom_methods.py::TestGeomMethods::()::test_symmetric_difference_operator
  /home/james/python/geopandas/geopandas/base.py:29: UserWarning: GeoSeries crs mismatch: {'init': 'epsg:4326', 'no_defs': True} and None
    other.crs))

* Add test intended to catch CRS warning
2017-09-29 17:20:36 +02:00
James McBride fb075e80fa CLN: Remove unused internal function (#569)
_array_input was not used anywhere, and has been sitting around unused
for ~4 years, so far as I can tell.
2017-09-29 09:39:31 +02:00
James McBride 51cbe5bdf0 TST: Add tests for centroid and convex_hull (#568)
Basic tests of methods that were not previously covered.
2017-09-29 09:38:13 +02:00
James McBride 5202d9211d Update CHANGELOG.md
Record improvements and bug fixes in ~month since 0.3.0 release.
2017-09-28 20:48:02 -07:00
Joris Van den Bossche 38458e8d05 TST: addexrGeoDataFrame constructor tests (#495) 2017-09-28 22:45:32 +02:00
Fabien Maussion b9a2d0f39d Add legend_kwds to plot() (#434)
`plot_dataframe` now accepts a `legend_kwds` argument, through which a user can pass keyword arguments accepted by the call to matplotlib's legend function (if `legend=True`).
2017-09-26 16:11:16 -07:00
Andrew Feierman 55d59ee7d5 DOC: Update geocoding.rst (#555) 2017-09-21 17:06:24 +02:00
Joris Van den Bossche 5ae1c65ed1 DOC: add numpydoc to doc build environment 2017-09-21 13:13:36 +02:00
Joris Van den Bossche 5dd32f1fa1 DOC: add mock to doc env file 2017-09-21 11:57:03 +02:00
James McBride abd2864947 ENH: Expose all geopy services (#550)
Use geopy's get_geocoder_for_service to map strings to the proper class
to use, so a geopandas user can use any available geopy Geocoder. Also
provide option to use a Geocoder instance, rather than the string
mapping, which is potentially more transparent.
2017-09-20 21:24:53 +02:00
James McBride e00ecd26a1 TST: Add case sensitivity flag to validate_boro_df (#554) 2017-09-20 10:14:56 +02:00
Elliott Sales de Andrade 661e2da4e8 COMPAT: fix tests of Matplotlib 2.0.0 (#551)
* Fix default cmap for Matplotlib 2.0.0.

* TST: Fix determination of expected dash style.

In Matplotlib 2.0.0, there was a minimum dash length that was eventually
removed because it was problematic. The expected line style does not
apply this minimum.
2017-09-19 20:48:52 -07:00
Levi John Wolf 4e8da4a08a BUG: ensure that the colorbar gets plotted to the right axis (#523) 2017-09-16 18:56:17 +02:00
Geir Arne Hjelle 597dfcf597 DOC: Improve API reference docs (#534)
* Add autodoc to sphinx configuration

* Add support for numpy docstring to sphinx configuration

* Use autodoc for reference documentation, reading documentation from docstrings

* Improve docstrings of properties and methods listed in Reference documentation

* Pass through kwargs for GeoSeries.buffer (#535)

* Fix choropleth typo in doc (#542)

* Remove warnings from numpydoc when generating docs

* Add autodoc to sphinx configuration

* Add support for numpy docstring to sphinx configuration

* Use autodoc for reference documentation, reading documentation from docstrings

* Improve docstrings of properties and methods listed in Reference documentation

* Remove warnings from numpydoc when generating docs

* Add GeoSeries-subsection for consistency

* Consistently only add parameters for functions passing through args/kwargs

* Clarify how contains and within are inverses of each other

* remove plot signature in reference
2017-09-15 18:57:40 +02:00
Robert Gieseke a43d166561 Add basic support for remote resources to read_file (#531)
* Add basic support for remote resources to `read_file`

Tested with GeoJSON files.

* TST: Use GeoJSON file from GeoPandas repo

* Switch to numpydoc style

* Fix syntax in docs

* Formatting and rename test marker
2017-09-13 21:12:49 -07:00
Tim Tröndle 7101fc9a8a Fix choropleth typo in doc (#542) 2017-09-06 21:54:49 -07:00
Geir Arne Hjelle 3bf59112ae Pass through kwargs for GeoSeries.buffer (#535) 2017-09-02 13:18:08 +02:00
James McBride e49532e670 DOC: Update copyright date range in sphinx docs (#520) 2017-08-28 19:53:05 -07:00
Joris Van den Bossche e48af9b2f9 RLS: v0.3.0 2017-08-29 01:39:13 +02:00
Joris Van den Bossche d42f85d500 update setup.py 2017-08-29 01:39:06 +02:00
Joris Van den Bossche 687e91dc91 update changelog before release 2017-08-29 01:15:25 +02:00
Ezequiel Alvarez 1d33ae8297 BUG: fixing a problem with bins in choropleth legend (#450)
* fixing a problem with bins in choropleth legend

* adding a test for it
2017-08-29 01:14:31 +02:00
Joris Van den Bossche 060cbbb7e3 BUG/COMPAT: fix fillna by filling with Polygon instead of Point (#512)
See #509. Polygon cannot be converted to an array, and therefore
fillna works (starting with shapely 1.6, an empty Point can be
converted to an aray -> broke fillna).
However, we should find a better fix for this in the long term.

* unpin shapely, add test builds with older shapely

* adapt test

* change to BaseGeometry
2017-08-28 23:54:15 +02:00
Joris Van den Bossche 06650d5839 DOC: make figures a bit larger in the docs (#518)
* DOC: make figures a bit larger in the docs

* update some plot styles in docs to look nicer with new defaults
2017-08-28 23:23:02 +02:00
James McBride 8054456580 COMPAT: Alias isnull -> isna, following pandas (#517)
* COMPAT: Alias isnull -> isna, following pandas

Add same alias for notnull -> notna, and add tests of empty geometries
to ensure that the check is working for the case it is supposed to
catch.
2017-08-28 00:32:14 +02:00
Joris Van den Bossche 8b40eda559 DOC: add pillow to doc env file
so it is installed from conda-forge, otherwise get conflicts
2017-08-28 00:31:36 +02:00
Joris Van den Bossche 77a770984e DOC: try 3.5 in docs environment.yaml file 2017-08-28 00:05:42 +02:00
Joris Van den Bossche c6dbd94dc9 DOC: update doc build env to python 3.6 2017-08-27 23:46:14 +02:00
James McBride bdbc56e998 Update CHANGELOG.md
Note plotting improvements, point `from_features` improvement to the PR instead of the issue.
2017-08-27 10:41:46 -07:00
Joris Van den Bossche 4ed906ece6 VIS: updated plotting defaults (#510)
* remove hardcoded defaults

* use uniform color by default

* for categorical data use default cmap tab10 instead of Set1

* forgot to remove hardcoded markersize

* remove no longer used gencolor function

* update MultiPolygons test

* fix some tests + mixed geom case with cmap

* enable more tests

* fix for matplotlib 1.4.3

* skip one for 1.4.3

* fix some collection tests

* small updates to docstring

* undo take squaring of the markersize
2017-08-27 10:19:08 -07:00
James McBride c6cf3b2bba CLN: Remove unused imports (#513) 2017-08-27 09:28:32 +02:00
Joris Van den Bossche c47b28e367 TST: clean requirements.txt, add pysal on travis, omit _versions.py from coverage (#504) 2017-08-25 22:06:44 +02:00
Emilio Mayorga 722223e4fb ENH: GeoDataFrame.from_features to accept FeatureCollection as well (#507) 2017-08-25 18:33:23 +02:00
Sean Gillies 6dc4ab2cc9 Open output file in a GDAL error-handling context (#496)
This solves confusing error messages like the one reported at https://github.com/Toblerity/Fiona/issues/468.
2017-08-23 22:50:48 +02:00
Joris Van den Bossche da75f3c774 Clean-up / simplify plotting code (#502)
* Simplify plot_point_collection

Pass values or colors separately to c / color kwargs
Matplotlib automatically handles them well

* Simplify plot_linestring_collection

Handle values or colors separately.
Colors are then handles by the constructor of
LineCollection itself and don't need to be set
afterwards

* Simplify plot_polygon_collection

Handle values or colors separately.
Colors are then handles by the constructor of
PatchCollection itself and don't need to be set
afterwards

Difference is that color sets both face and edgecolor

* Update (and remove legacy support for alpha) plot_series/plot_frame

get plot_series and plot_frame working with the new plot_*_collection functions
removed the workaround to keep old alpha behaviour for polygons
(no longer apply alpha only on fill and not on edge)

changes in behaviour:
- color has now priority over facecolor, not the other way around

MutliPolygons without specifying values don't work yet

* compute s.geometry.type only once

* address review comments

* try to fix tests for older matplotlib versions

* PEP8 clean-up

* skip more tests with older matplotlib

* merge two testing functions
2017-08-23 22:49:22 +02:00
Joris Van den Bossche be0148204e TST: temporary pin shapely to < 1.6 (#508)
xref #509
2017-08-23 15:18:28 +02:00
Joris Van den Bossche baa1601c78 Start adding an asv benchmark suite (#497) 2017-08-20 13:44:20 +02:00
James McBride a3ee99b558 RLS: add pre-0.3.0 changelog (#476) 2017-08-20 11:58:06 +02:00
Joris Van den Bossche d57f51a707 TST: clean-up tests (remove unittest.TestCase subclassing, more pytest usage, PEP8) (#494)
* Remove no longer used baseline images

* Remove dependency on unittest.TestCase (to be able to use pytest functionality) in test_geodataframe.py

* also remove unittest TestCase usage in other test files (+ PEP8 cleaning)

* remove check for old pandas version (not supported anymore)

* automatically close figures after plotting tests

* further cleanup tests/util.py

* ensure recent version of pytest is used
2017-08-17 22:14:27 -07:00