Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • dataRetrieval dataRetrieval
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Maintenance scheduled for Thursday, March 23rd at 15:00 MST. Expected downtime <1 hour.

  • Water
  • dataRetrievaldataRetrieval
  • Issues
  • #281
Closed
Open
Issue created Sep 06, 2016 by Appling, Alison Paige@aappling

allow non-DST options for tz (e.g., EST, CST, MST, PST)

My collaborators collect sensor data in the Northeast; their sensors all use EST only (no daylight savings time). For merging with USGS data, it would be easiest if dataRetrieval allowed them to request data with tz='EST', but this is currently not one of the options (https://github.com/USGS-R/dataRetrieval/blob/master/R/importWaterML1.r#L124). Would the fix be as simple as adding 'EST','CST', etc. to that match.arg call?

This is the specific R call they'd like to make (and there are probably others that would become available after adjusting importWaterML1):

> qdat2 <- 
    readNWISuv(
      siteNumbers='01092000', parameterCd=c('00060','00065'), startDate='2013-11-03', 
      endDate='2013-11-03', tz='EST') %>%
    renameNWISColumns()

This is what they'd like to see (note exactly 4 observations / hour even across the DST transition):

> qdat2[2:18,]
   agency_cd  site_no            dateTime Flow_Inst GH_Inst Flow_Inst_cd GH_Inst_cd tz_cd
2       USGS 01092000 2013-11-02 23:15:00      5050    5.19            A          A   EST
3       USGS 01092000 2013-11-02 23:30:00      5050    5.19            A          A   EST
4       USGS 01092000 2013-11-02 23:45:00      5020    5.18            A          A   EST
5       USGS 01092000 2013-11-03 00:00:00      5020    5.18            A          A   EST
6       USGS 01092000 2013-11-03 00:15:00      5070    5.20            A          A   EST
7       USGS 01092000 2013-11-03 00:30:00      5100    5.21            A          A   EST
8       USGS 01092000 2013-11-03 00:45:00      5130    5.22            A          A   EST
9       USGS 01092000 2013-11-03 01:00:00      5190    5.24            A          A   EST
10      USGS 01092000 2013-11-03 01:15:00      5210    5.25            A          A   EST
11      USGS 01092000 2013-11-03 01:30:00      5240    5.26            A          A   EST
12      USGS 01092000 2013-11-03 01:45:00      5240    5.26            A          A   EST
13      USGS 01092000 2013-11-03 02:00:00      5210    5.25            A          A   EST
14      USGS 01092000 2013-11-03 02:15:00      5160    5.23            A          A   EST
15      USGS 01092000 2013-11-03 02:30:00      5070    5.20            A          A   EST
16      USGS 01092000 2013-11-03 02:45:00      5020    5.18            A          A   EST
17      USGS 01092000 2013-11-03 03:00:00      5020    5.18            A          A   EST
18      USGS 01092000 2013-11-03 03:15:00      5020    5.18            A          A   EST

(I achieved this by running the 'currently possible' command below, then calling qdat2 <- mutate(qdat, dateTime=lubridate::with_tz(dateTime, 'EST')); qdat2$tz_cd <- 'EST'. A dataRetrieval solution would be better.)

This is what's currently possible (data selected to show the DST transition between rows 8 and 9):

> qdat <-
    readNWISuv(
      siteNumbers='01092000', parameterCd=c('00060','00065'), startDate='2013-11-03', 
      endDate='2013-11-03', tz='America/New_York') %>%
    renameNWISColumns()
> qdat[2:18,]
   agency_cd  site_no            dateTime Flow_Inst GH_Inst Flow_Inst_cd GH_Inst_cd            tz_cd
2       USGS 01092000 2013-11-03 00:15:00      5050    5.19            A          A America/New_York
3       USGS 01092000 2013-11-03 00:30:00      5050    5.19            A          A America/New_York
4       USGS 01092000 2013-11-03 00:45:00      5020    5.18            A          A America/New_York
5       USGS 01092000 2013-11-03 01:00:00      5020    5.18            A          A America/New_York
6       USGS 01092000 2013-11-03 01:15:00      5070    5.20            A          A America/New_York
7       USGS 01092000 2013-11-03 01:30:00      5100    5.21            A          A America/New_York
8       USGS 01092000 2013-11-03 01:45:00      5130    5.22            A          A America/New_York
9       USGS 01092000 2013-11-03 01:00:00      5190    5.24            A          A America/New_York
10      USGS 01092000 2013-11-03 01:15:00      5210    5.25            A          A America/New_York
11      USGS 01092000 2013-11-03 01:30:00      5240    5.26            A          A America/New_York
12      USGS 01092000 2013-11-03 01:45:00      5240    5.26            A          A America/New_York
13      USGS 01092000 2013-11-03 02:00:00      5210    5.25            A          A America/New_York
14      USGS 01092000 2013-11-03 02:15:00      5160    5.23            A          A America/New_York
15      USGS 01092000 2013-11-03 02:30:00      5070    5.20            A          A America/New_York
16      USGS 01092000 2013-11-03 02:45:00      5020    5.18            A          A America/New_York
17      USGS 01092000 2013-11-03 03:00:00      5020    5.18            A          A America/New_York
18      USGS 01092000 2013-11-03 03:15:00      5020    5.18            A          A America/New_York
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking