GithubHelp home page GithubHelp logo

Comments (5)

aaraney avatar aaraney commented on June 8, 2024

With old wizards in mind, is the intended functionality to use a long data format as adhered to currently, or pivot output to a wide format? Just curious your thoughts on handling multiple stations.

from hydrotools.

jarq6c avatar jarq6c commented on June 8, 2024

With old wizards in mind, is the intended functionality to use a long data format as adhered to currently, or pivot output to a wide format? Just curious your thoughts on handling multiple stations.

Ah yes, the wide format (one station per column) would more closely match the USGS rdb tab-separated output. That could be an option later. However, I suspect an output format with a fixed number of columns might be easier to use. If we assume old wizards prefer to manually parse CSV output line-by-line in C or FORTRAN, I think they will have an easer time if the number of columns is fixed.

from hydrotools.

aaraney avatar aaraney commented on June 8, 2024

I agree, I think a long format would be best to implement from both our perspective and any perspective sorcerers.

from hydrotools.

jarq6c avatar jarq6c commented on June 8, 2024

Possible CSV output format:

# NCOLS 7
# NROWS 5
# HEADR 1
#
# value_date: Datetime of measurement (UTC) (character string)
# variable: USGS variable name (character string)
# usgs_site_code: USGS Gage Site Code (character string)
# measurement_unit: Units of measurement(character string)
# value: Measurement value (float)
# qualifiers: Qualifier string (character string)
# series: Series number in case multiple time series are returned (integer)
#
# Generated using nwis_client v1.3.0
# https://github.com/NOAA-OWP/evaluation_tools
# Retrieved 2021-02-18T13:51:02
# 
value_date,variable_name,usgs_site_code,measurement_unit,value,qualifiers,series
2019-09-29T23:00:00,streamflow,02146470,ft3/s,0.72,['A'],0
2019-09-30T00:00:00,streamflow,02146470,ft3/s,0.79,['A'],0
2019-09-30T01:00:00,streamflow,02146470,ft3/s,0.79,['A'],0
2019-09-30T02:00:00,streamflow,02146470,ft3/s,0.72,['A'],0
2019-09-30T03:00:00,streamflow,02146470,ft3/s,0.79,['A'],0

from hydrotools.

aaraney avatar aaraney commented on June 8, 2024

Good addition including metadata. I was not familiar with pd.read_csv(comment="#") option until now. I like this functionality. With this in mind, I think including a csv writer in the nwis_client is a good idea to support users who may want to distribute data in a canonical evaluation_tools csv format? Maybe my definition of format is a little loose here, but I hope you get what I mean.

from hydrotools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.