|
47 | 47 | "from IPython import display\n", |
48 | 48 | "import fiona\n", |
49 | 49 | "import pandas as pd\n", |
50 | | - "from planet import Auth\n", |
| 50 | + "from planet import Auth, data_filter\n", |
51 | 51 | "from planet import Session, DataClient, OrdersClient\n", |
52 | 52 | "import pyproj\n", |
53 | 53 | "import shapely\n", |
|
131 | 131 | "\n", |
132 | 132 | "The data is provided as a shapefile. It is easier to process the data as geojson. Therefore, we will convert the data to geojson. Additionally, the data contains polygons that aren't crops. Since we are only interested in crops, we will filter the data to only the crop polygons.\n", |
133 | 133 | "\n", |
134 | | - "We will use [fiona](http://toblerity.org/fiona/manual.html) to load the shapefile, [shapely](http://toblerity.org/shapely/manual.html) to manage the geometries" |
| 134 | + "We will use [fiona](https://fiona.readthedocs.io/en/latest/) to load the shapefile, [shapely](https://shapely.readthedocs.io/en/stable/) to manage the geometries" |
135 | 135 | ] |
136 | 136 | }, |
137 | 137 | { |
|
418 | 418 | "\n", |
419 | 419 | "We will answer this question by querying the planet api. The client is how we interact with the planet api. It is created with the user-specific api key, which is pulled from $PL_API_KEY\n", |
420 | 420 | "\n", |
421 | | - "[planet client documentation](https://planetlabs.github.io/planet-client-python/index.html) \n", |
| 421 | + "[Planet Client Documentation](https://planet-sdk-for-python-v2.readthedocs.io/en/latest/) \n", |
422 | 422 | "\n", |
423 | 423 | "Much of this code is pulled from [PythonFromSpace/TheBasics.ipynb](https://github.com/kscottz/PythonFromSpace/blob/master/TheBasics.ipynb)" |
424 | 424 | ] |
|
459 | 459 | "\n", |
460 | 460 | "geom_filter_test = data_filter.geometry_filter(aoi_test)\n", |
461 | 461 | "geom_filter_train = data_filter.geometry_filter(aoi_train)\n", |
462 | | - "date_range_filter = data_filter.date_range_filter(\"acquired\", datetime(month=6, day=1, year=2016), datetime(month=10, day=1, year=2016))\n", |
| 462 | + "date_range_filter = data_filter.date_range_filter(\"acquired\", gt=datetime(month=6, day=1, year=2016), lt=datetime(month=10, day=1, year=2016))\n", |
463 | 463 | "cloud_cover_filter = data_filter.range_filter('cloud_cover', None, 75)\n", |
464 | 464 | "\n", |
465 | 465 | "combined_filter_test = data_filter.and_filter([geom_filter_test, date_range_filter, cloud_cover_filter])\n", |
|
0 commit comments