Skip to content

Commit

Permalink
Merge pull request #125 from NASA-IMPACT/develop
Browse files Browse the repository at this point in the history
Update API usage documentation, add Nightlight's data processing documentation
  • Loading branch information
leothomas authored May 13, 2021
2 parents 0acd3ae + a8a77b2 commit 3539503
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions guidelines/api-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,27 @@ The URL for requesting data from the `nightlights-viirs` data for Beijing, for x
[https://8ib71h0627.execute-api.us-east-1.amazonaws.com/v1/9/421/193@1x?url=s3://covid-eo-data/bm_500m_daily/VNP46A2_V011_be_2020_01_01_cog.tif&resampling_method=nearest&bidx=1&rescale=0%2C100&color_map=viridis](https://8ib71h0627.execute-api.us-east-1.amazonaws.com/v1/9/421/193@1x?url=s3://covid-eo-data/bm_500m_daily/VNP46A2_V011_be_2020_01_01_cog.tif&resampling_method=nearest&bidx=1&rescale=0%2C100&color_map=viridis)

Which will display in the browser.

You can also download the above tile with a curl command:

```bash
curl 'https://8ib71h0627.execute-api.us-east-1.amazonaws.com/v1/9/421/193@1x?url=s3://covid-eo-data/bm_500m_daily/VNP46A2_V011_be_2020_01_01_cog.tif&resampling_method=nearest&bidx=1&rescale=0%2C100&color_map=viridis' -o tile.tif
```

The source COGs, from which the API generates the tiles are publicly available at the location specified by the `url` parameter in the link above. For example, the source COG for the above tile can be downloaded using the [aws-cli](https://aws.amazon.com/cli/) with the following command:

```bash
aws s3 cp s3://covid-eo-data/bm_500m_daily/VNP46A2_V011_be_2020_01_01_cog.tif ./cog.tif --no-sign-request
```

Some of the COGs can be quite large. To verify the size before downloading use this command:

```bash
aws s3 ls s3://covid-eo-data/bm_500m_daily/VNP46A2_V011_be_2020_01_01_cog.tif --summarize --human-readable --no-sign-request

# Output:
2021-03-24 08:50:12 5.9 MiB VNP46A2_V011_be_2020_01_01_cog.tif

Total Objects: 1
Total Size: 5.9 MiB
```
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ancillary data refered to in `COVIDDashboardProductReadme.docx` can be found at `s3://covid-eo-data/bmhd_ancillary/`
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

setup(
name="covid_api",
version="0.6.0",
version="0.6.1",
description=u"",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 3539503

Please sign in to comment.