Code Monkey home page Code Monkey logo

climata's People

Contributors

jeremiahsa avatar sheppard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

climata's Issues

MethodNotFound error

I'm trying to run one of the quick sample codes from the Climate Viewer:

from climata.snotel import RegionDailyDataIO

data = RegionDailyDataIO(
start_date="2013-01-01",
end_date="2013-12-31",
basin="18010202",
parameter="SNWD",
)

I'm getting the following MethodNotFound error:
MethodNotFound: Method not found: 'AwdbWebService.AwdbWebServiceImplPort.nonzero'

Any thoughts here? Not sure if this is a bug or just user error, b/c I can't find any documentation.

StationHourlyDataIO request thows attributeerror: 'hourlyDataValue' object has no attribute 'items' when running the example

Example as documented in the snowtel code:

params = StationHourlyDataIO(
    station='302:OR:SNTL',
    start_date='2014-07-01',
    end_date='2014-07-02',
)

for param in params:
    print(param.element_name)
    for row in param.data:
        print("   ", row.datetime, row.value, param.storedunitcd)

OUTPUT:

BATTERY

Stack Trace:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-15-11de896be9bd> in <module>()
      7 for param in params:
      8     print(param.element_name)
----> 9     for row in param.data:
     10         print("   ", row.datetime, row.value, param.storedunitcd)

C:\Users\scott\Anaconda3\envs\python35\lib\site-packages\wq\io\base.py in __iter__(self)
    153     def __iter__(self):
    154         for item in self.data:
--> 155             uitem = self.usable_item(item)
    156             if uitem is None:
    157                 return

C:\Users\scott\Anaconda3\envs\python35\lib\site-packages\wq\io\mappers.py in usable_item(self, item)
    122 
    123     def usable_item(self, item):
--> 124         mapped = super(TupleMapper, self).usable_item(item)
    125         try:
    126             return self.tuple_prototype._replace(**mapped)

C:\Users\scott\Anaconda3\envs\python35\lib\site-packages\wq\io\mappers.py in usable_item(self, item)
     24     def usable_item(self, item):
     25         uitem = {}
---> 26         for key, val in item.items():
     27             field = self.map_field(key)
     28             value = self.map_value(field, val)

AttributeError: 'hourlyDataValue' object has no attribute 'items'

I tried looking in to figuring out how to resolve this in the code but I'm not familiar with wq or the design of the library.
Thanks!

climata.usgs.DailyValueIO paramID=00065

Hey, thank you for making this great tool.

I am using USGS site 15485500 ( https://waterdata.usgs.gov/nwis/uv/?site_no=15485500). Using the climata call inside a python script as:

from climata.usgs import DailyValueIO

data = DailyValueIO(
start_date="2017-01-01",
end_date="2018-01-01",
station="15485500",
parameter="00060",
)

Everything works as expected.

However, if I want to return gage height (parameter="00065") the returned data instance only contains: "wq.io.exceptions.NoData: No data returned!"

I have tried this for multiple sites and the result is consistent across sites. I have tried to trace this issue through the climata package to the wq package but have had no success in finding the exact call sent to the USGS site. Can someone help me by pointing me to the exact call to the USGS site or pointing me to where I can correct this issue?

Thanks!

update OWSLib dependency to 0.10

Now that version 0.8 (and subsequent versions) of OWSLib are released, we don't need the dependency_links hack which didn't work well anyway.

snotel RegionDailyDataIO

Hi, thanks for creating this awesome tool. I'm having trouble unpacking the <wq.io.util.FlatIO object at 0x11a36a9b0> when accessing snotel data. Here is the code i'm running

from climata.snotel import RegionDailyDataIO

data = RegionDailyDataIO(
    basin="18030007",
    start_date="2017-01-01",
    end_date="2017-01-31",
    parameter="SNWD"
)

for series in data:
    for i in series:
        print (i.data)

climata.snotel

# HeightDepth parameters don't seem to be necessary.

Hello,

I wanted to ask why these parameters (depth unit and depth value) were not included. I understand that they are not necessary for all data (such as air temperature - code TAVG) but they are important to get soil moisture - SMS at different depth, for example -40in). I'm adding here the link to the AWDB test tool.

https://wcc.sc.egov.usda.gov/awdbWebService/webservice/testwebservice.jsf?webserviceName=/awdbWebService

I've tried to add these parameters to your script and they are not read properly, and the only output data I get is the data that doesn't depend on depth/height. Could you please check if these parameters can be added to your current script version?

Thank you,
Olena

appears to be broken?

Can't make climata work. Installed it some weeks ago and now get "can't find module named io" even though I had wq.io installed.

then I tried reinstalling climata:

Downloading/unpacking https://github.com/heigeo/climata.git
Downloading climata.git (unknown size): 11kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 278, in ru
n
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1198, in prepare_files
do_download,
File "/usr/lib/python3/dist-packages/pip/req.py", line 1376, in unpack_url
self.session,
File "/usr/lib/python3/dist-packages/pip/download.py", line 582, in unpack_htt
p_url
unpack_file(temp_location, location, content_type, link)
File "/usr/lib/python3/dist-packages/pip/util.py", line 645, in unpack_file
and is_svn_page(file_contents(filename))):
File "/usr/lib/python3/dist-packages/pip/util.py", line 211, in file_contents
return fp.read().decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid
start byte

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.