MazamaScience / MazamaSatelliteUtils

Satellite Data Download and Utility Functions
http://mazamascience.github.io/MazamaSatelliteUtils
GNU Lesser General Public License v3.0
0 stars 0 forks source link

use "recipe style" examples in documentation #82

Closed jonathancallahan closed 3 years ago

jonathancallahan commented 3 years ago

This is a fairly minor thing but I would like our function examples to make use of "recipe style" code with pipes wherever reasonable.

The documentation example for goasaodc_findClosestScanFile() currently has:

print(MazamaCoreUtils::parseDatetime(
  goesaodc_convertFilenameToDatetime(closestScanFile),
  "America/Los_Angeles"
))

My preference would be to have this:

# Print precise time of scan
closestScanFile %>%
  MazamaSatelliteUtils::goesaodc_convertFilenameToDatetime() %>%         # always UTC
  MazamaCoreUtils::parseDatetime(timezone = "America/Los_Angeles") %>%   # local time
  print()