Commit Graph
836 Commits
Author SHA1 Message Date
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
James McBride f09a2e2452 TST: Add (failing) tests of drop_duplicates (#487)
This adds tests of desired behavior of drop_duplicates as applied to
geoseries and geodataframes, with currently failing tests for both.
2017-08-17 10:56:09 +02:00
James McBride 6eaa859bb0 TST: Fix test of LineString style in mpl>=2.0 (#493)
* Fix test of LineString style in mpl>=2.0

* Do not allow matplotlib>2.0 failures in travis
2017-08-17 10:49:19 +02:00
James McBride e9278c1557 TST: fix tests of color in mpl 2.0 (#486)
Instead of specifying the name of the default color table, verify that
default geopandas plots have color schemes that match the mpl defaults.
2017-08-16 22:49:34 +02:00
James McBride bf8f8ea64e Omit tests from coverage report 2017-08-10 07:41:59 -07:00
James McBride 55d2d47d53 ENH: add cx indexer to GeoDataFrame (#471) (#482)
* Add coordinate indexing method cx to geodataframes

Add a few basic tests that it works on a geodataframe as it does for a
geoseries.

* Add docs on indexing, including slicing with cx

* Use consistent assert in gdf coord slice test

* Move _CoordinateIndexer to base module

With both geoseries and geodataframe modules using the class, base.py is
a better place to define the _CoordinateIndexer class.

Also add docs to the _CoordinateIndexer class.
2017-08-10 09:47:47 +02:00
Joris Van den Bossche e2722f36a5 DOC/TST: use datasets.get_path('nybb') in docs and tests (#480) 2017-08-09 09:38:23 +02:00
James McBride 74f8c90203 BUG: Fix handling of 0 slice in cx method (#477) (#478)
With the previous tests of the style xs.start or xmin, if xs.start
equalled 0, xmin was taken, ignoring the user specified slice boundary.
This fixes that issue, and adds miminal testing around slices with
boundaries at 0.
2017-08-08 09:06:47 +02:00
Joris Van den Bossche dd8bf019d3 Add NYC borough boundaries as included dataset (#384)
* Add NYC borough boundaries as included dataset

* TST: add tests for the datasets

* Add readme for datasets directory with attribution

* add description to README
2017-08-05 00:33:30 +02:00
Joris Van den Bossche cfc3ba329d TST: add more extensive tests of pandas functionality (#469)
* TST: add more extensive tests of pandas functionality

* add first groupby methods

* add get_group and select_dtypes

* ensure array input to where

* fix select dtypes test

* fix max test for python 2 (on python 2 objects are orderable, so max works)

* skip test for pandas 0.16

* windows fix int64

* fix skipif
2017-08-04 10:37:20 +02:00
James McBride cfb3120002 ENH: add access to x/y coordinates of point geoseries (#246) (#383) 2017-07-30 00:11:16 +02:00
Chris Holdgraf 9690870ea7 Change total_bounds to return an array (#459) 2017-07-29 23:03:34 +02:00
Micah Cochran 1731e44b2d TST: Add Pandas version 0.20.2 to travis matrix (#454)
Update newest tested matplotlib to version 1.5.3
2017-06-21 23:57:45 +02:00
Joris Van den Bossche e5f5eac7af CLN: clean up old compat code (#445) 2017-05-15 10:31:11 +02:00
James McBride ed2f8b4499 CLN: Remove deprecated PANDAS_NEW_SQL_API check (#442)
Was necessary to support pandas version <0.14, which is no longer
supported by geopandas.
2017-05-14 14:29:25 +02:00
Joris Van den Bossche 5d4a997301 Add a Gitter chat badge to README.md 2017-04-27 16:04:20 +02:00
Joris Van den Bossche 4abbe827b9 CLN/TST: remove usage of assert_isinstance from pandas (deprecated/removed) (#428) 2017-03-28 10:27:50 +02:00
Aleksey Bilogur 8ce1d41b6c ENH: Enable non-integer-indexed GeoDataFrame sjoin operations (#422) 2017-03-28 10:10:22 +02:00
Aleksey Bilogur 059cbeba06 add pytest cache to gitignore (#427) 2017-03-27 12:34:01 +02:00
Zhanzhao (Deo) Liang 46e4033a4a Fix some sindex issue (#403)
rename _sindex_valid to _sindex_generated to make it more understandable
2017-03-18 10:57:38 +01:00
James McBride 74eb7cd579 Match property behavior of cascaded_union to match unary_union (#394) 2017-03-18 10:55:41 +01:00
Joris Van den Bossche 8808ed509c TST: add more robust tests for sjoin (GH423) (#425)
* TST: add more robust tests for sjoin (GH423)
* fix right join test
* fix windows test
* use parametrized test + add tests (xfail) for non-default index
2017-03-17 22:27:59 +01:00
Aleksey Bilogur 92caf14356 CLN: more explicitly use row name as id in features (#421) 2017-03-14 20:00:53 +01:00