-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(docs): update installation instructions for GOES-DL package #7
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ Satellites - R Series][4]. | |
|
||
## Installation | ||
|
||
To install **GOES-DL**, use `pip` *(not yet)*: | ||
To install **GOES-DL**, use `pip`: | ||
|
||
```bash | ||
pip install goes-dl | ||
|
@@ -75,7 +75,7 @@ pip install goes-dl | |
Below are examples of how to use the GOES-DL package to download data from each | ||
of the supported sources. | ||
|
||
### 1. Download GOES 2nd Generation Data | ||
### 1. Download GOES 2nd Generation Data (from NOAA's NCEI archive) | ||
|
||
```python | ||
# Import the locator and datasource according to your desired product | ||
|
@@ -86,7 +86,7 @@ from GOES_DL.downloader import Downloader | |
# Initialize the downloader for GridSat-GOES (GOES-12, Full Disk) | ||
locator = GridSatProductLocatorGC("F", "G12") | ||
|
||
datasource = DatasourceHTTP(locator) | ||
datasource = DatasourceHTTP(locator, repository="./my_data/gridsat-gc") | ||
|
||
downloader = Downloader( | ||
datasource=datasource, | ||
|
@@ -107,7 +107,7 @@ files2 = downloader.get_files( | |
# file content, respectively. The file path is relative to the base URL. | ||
``` | ||
|
||
### 2. Download GOES 3rd Generation Data | ||
### 2. Download GOES 3rd Generation Data (from NOAA's AWS archive) | ||
|
||
```python | ||
# Import the locator and datasource according to your desired product | ||
|
@@ -118,7 +118,9 @@ from GOES_DL.downloader import Downloader | |
# Initialize the downloader for GOES-R Series (set your desired product) | ||
locator = GOESProductLocatorABIPP("CMIP", "F", ["C02", "C08", "C13"], "G16") | ||
|
||
datasource = DatasourceAWS(locator) | ||
# GOES-16 data is updated every 10 minutes. If you are downloading | ||
# old data, you may leave the cache refresh rate as default (+inf). | ||
datasource = DatasourceAWS(locator, repository="./my_data/goes-r", cache=600) | ||
|
||
downloader = Downloader( | ||
datasource=datasource, | ||
|
@@ -138,7 +140,7 @@ files2 = downloader.get_files( | |
# file content, respectively. The file path is relative to the base URL. | ||
``` | ||
|
||
### 3. Download GridSat-B1 Data | ||
### 3. Download GridSat-B1 Data (from NOAA's AWS archive) | ||
|
||
```python | ||
# Import the locator and datasource according to your desired product | ||
|
@@ -149,7 +151,45 @@ from GOES_DL.downloader import Downloader | |
# Initialize the downloader for GridSat-B1 | ||
locator = GridSatProductLocatorB1() | ||
|
||
datasource = DatasourceAWS(locator) # also available in HTTP from NCEI | ||
# Also available in HTTP from NCEI's archive, see next example | ||
datasource = DatasourceAWS(locator, repository="./my_data/gridsat-b1") | ||
|
||
downloader = Downloader( | ||
datasource=datasource, | ||
locator=locator, | ||
date_format="%Y-%m-%dT%H:%M%z", | ||
) | ||
|
||
# Set your desired date... | ||
files1 = downloader.get_files(start="1984-08-23T00:00Z") | ||
|
||
# ...or your desired date range | ||
files2 = downloader.get_files( | ||
start="1984-08-23T00:00-0004", | ||
end="1984-08-24T00:00-0004", | ||
) | ||
|
||
# `files1` and files2` are lists of tuple[str, bytes] with file path and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (documentation): Fix missing backtick in files2 variable name |
||
# file content, respectively. The file path is relative to the base URL. | ||
``` | ||
|
||
### 4. Download GridSat-B1 Data (from NOAA's NCEI archive) | ||
|
||
```python | ||
# Import the locator and datasource according to your desired product | ||
from GOES_DL.dataset.gridsat import GridSatProductLocatorB1 | ||
from GOES_DL.datasource import DatasourceHTTP | ||
from GOES_DL.downloader import Downloader | ||
|
||
# Initialize the downloader for GridSat-B1 | ||
locator = GridSatProductLocatorB1() | ||
|
||
# NCEI archive has the same folder structure as AWS, so, if you have | ||
# downloaded data from AWS, you can use the same locator and change the | ||
# datasource to HTTP. If a file is not found in the local repository, it | ||
# will be downloaded from the remote datasource. In all previous examples, | ||
# if a file was already downloaded, it will not be downloaded again. | ||
datasource = DatasourceHTTP(locator, repository="./my_data/gridsat-b1") | ||
|
||
downloader = Downloader( | ||
datasource=datasource, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (documentation): Consider explaining the cache parameter's default value
The comment mentions '+inf' as the default value, but this might not be clear to all users. Consider adding a note about what this means in practice.