|
14 | 14 | " 3) Input data set search criteria using spatial and temporal filters. \n", |
15 | 15 | " 4) Explore different methods of specifying spatial criteria including lat/lon bounds,\n", |
16 | 16 | " polygon coordinate pairs, and polygon input from a Shapefile or KML. \n", |
17 | | - " 5) Search for matching files and receiving information about file volume.\n", |
| 17 | + " 5) Search for matching files and receive information about file volume.\n", |
18 | 18 | " 6) Obtain information about subsetting and reformatting capabilities for a specfic data set.\n", |
19 | 19 | " 7) Configure data request by \"chunking\" request by file number. \n", |
20 | 20 | " 8) Submit a request and monitoring the status of the request.\n", |
21 | 21 | " 9) Compare subsetted and original, \"native\" data outputs.\n", |
22 | 22 | " \n", |
23 | | - "#### Data Used:\n", |
24 | | - "* `s3://pangeo-data-upload-oregon/icesat2/pine_island_glims/glims_polygons.kml` \n", |
25 | | - "\n" |
| 23 | + "#### Data Sources:\n", |
| 24 | + "The Pine Island Glacier outline was originally downloaded from the the NSIDC [Global Land Ice Measurements from Space (GLIMS) database](http://www.glims.org/maps/glims). Direct download access: http://www.glims.org/maps/info.html?anlys_id=528486" |
26 | 25 | ] |
27 | 26 | }, |
28 | 27 | { |
|
62 | 61 | "from requests.auth import HTTPBasicAuth" |
63 | 62 | ] |
64 | 63 | }, |
65 | | - { |
66 | | - "cell_type": "markdown", |
67 | | - "metadata": {}, |
68 | | - "source": [ |
69 | | - "## Pull data from s3 bucket\n", |
70 | | - "\n", |
71 | | - "#### We will pull the following folder from our Amazon s3 bucket:\n", |
72 | | - " 1) Pine Island Glacier outline\n", |
73 | | - "\n", |
74 | | - "#### The Pine Island Glacier outline will be used below for filtering and subsetting the data." |
75 | | - ] |
76 | | - }, |
77 | | - { |
78 | | - "cell_type": "code", |
79 | | - "execution_count": null, |
80 | | - "metadata": {}, |
81 | | - "outputs": [], |
82 | | - "source": [ |
83 | | - "%%bash\n", |
84 | | - "\n", |
85 | | - "# Download from s3 using bash magic\n", |
86 | | - "\n", |
87 | | - "cd /home/jovyan/ICESat2_hackweek_tutorials/03_NSIDCDataAccess_Steiker\n", |
88 | | - "aws s3 sync s3://pangeo-data-upload-oregon/icesat2/pine_island_glims/ pine_island_glims/ " |
89 | | - ] |
90 | | - }, |
91 | | - { |
92 | | - "cell_type": "markdown", |
93 | | - "metadata": {}, |
94 | | - "source": [ |
95 | | - "#### Data Sources:\n", |
96 | | - "The Pine Island Glacier outline was originally downloaded from the the NSIDC [Global Land Ice Measurements from Space (GLIMS) database](http://www.glims.org/maps/glims). Direct download access: http://www.glims.org/maps/info.html?anlys_id=528486\n", |
97 | | - "\n", |
98 | | - "The unsubsetted data are from the ATL06 data set (more resources below): https://doi.org/10.5067/ATLAS/ATL06.001\n", |
99 | | - "\n", |
100 | | - "The subsetted data were generated using the [NASA Earth Observing System Data and Information System (EOSDIS)](https://earthdata.nasa.gov/eosdis/science-system-description/eosdis-services) Service Interface (ESI)." |
101 | | - ] |
102 | | - }, |
103 | 64 | { |
104 | 65 | "cell_type": "markdown", |
105 | 66 | "metadata": {}, |
|
384 | 345 | "# Use geopandas to read in polygon file\n", |
385 | 346 | "# Note: a shapefile or geojson, or almost any other vector-based spatial data format could be substituted here.\n", |
386 | 347 | "\n", |
387 | | - "kml_filepath = str('/home/jovyan/data-access/pine_island_glims/glims_polygons.kml')\n", |
| 348 | + "kml_filepath = str(os.getcwd() + '/pine_island_glims/glims_polygons.kml')\n", |
388 | 349 | "\n", |
389 | 350 | "#Return a GeoDataFrame object\n", |
390 | 351 | "gdf = gpd.read_file(kml_filepath)\n", |
|
1318 | 1279 | " shape_post = {'shapefile': open(kml_filepath, 'rb')}\n", |
1319 | 1280 | " request = session.post(base_url, params=subset_request_params, files=shape_post) \n", |
1320 | 1281 | " \n", |
1321 | | - "# FOR ALL OTHER REQUESTS THAT DO NOT UTILIZED AN UPLOADED POLYGON FILE, USE A GET REQUEST INSTEAD OF POST:\n", |
1322 | | - "# request = session.get(base_url, params=request_params)\n", |
| 1282 | + "# # FOR ALL OTHER REQUESTS THAT DO NOT UTILIZED AN UPLOADED POLYGON FILE, USE A GET REQUEST INSTEAD OF POST:\n", |
| 1283 | + "# request = session.get(base_url, params=subset_request_params)\n", |
1323 | 1284 | " \n", |
1324 | 1285 | " print('Request HTTP response: ', request.status_code)\n", |
1325 | 1286 | "\n", |
|
1686 | 1647 | "name": "python", |
1687 | 1648 | "nbconvert_exporter": "python", |
1688 | 1649 | "pygments_lexer": "ipython3", |
1689 | | - "version": "3.6.7" |
| 1650 | + "version": "3.7.0" |
1690 | 1651 | } |
1691 | 1652 | }, |
1692 | 1653 | "nbformat": 4, |
1693 | | - "nbformat_minor": 2 |
| 1654 | + "nbformat_minor": 4 |
1694 | 1655 | } |
0 commit comments