| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d2a38d5 commit abf2e82
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -554,3 +554,8 @@ ADD patches/tensorboard/notebook.py /opt/conda/lib/python3.6/site-packages/tenso | |||
| 554 | 554 | ||
| 555 | 555 | # Set backend for matplotlib | |
| 556 | 556 | ENV MPLBACKEND "agg" | |
| 557 | + | ||
| 558 | + # geospatial learn course | ||
| 559 | + RUN pip install rtree && \ | ||
| 560 | + pip install osmnx && \ | ||
| 561 | + apt-get -y install libspatialindex-dev | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,3 +6,11 @@ class TestGeopandas(unittest.TestCase): | |||
| 6 | 6 | def test_read(self): | |
| 7 | 7 | df = geopandas.read_file(geopandas.datasets.get_path('nybb')) | |
| 8 | 8 | self.assertTrue(df.size > 1) | |
| 9 | + | ||
| 10 | + def test_spatial_join(self): | ||
| 11 | + cities = geopandas.read_file(geopandas.datasets.get_path('naturalearth_cities')) | ||
| 12 | + world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres')) | ||
| 13 | + countries = world[['geometry', 'name']] | ||
| 14 | + countries = countries.rename(columns={'name':'country'}) | ||
| 15 | + cities_with_country = geopandas.sjoin(cities, countries, how="inner", op='intersects') | ||
| 16 | + self.assertTrue(cities_with_country.size > 1) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments