Giter VIP home page Giter VIP logo

pyncei's People

Contributors

adamancer avatar

Stargazers

 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

pyncei's Issues

Max_Temp looks incorrect

Hi Adam,
For certain stations, the data(TMAX) seems incorrect. When I view the data for a specific year for these particular stations using the web tool, I get different data .

For e.g. for the station, RIVERSIDE FIRE STATION 3, CA US (GHCND:USC00047470), I am getting
TMAX in range of 200, which seems incorrect. I get different results when queried from web
(https://www.ncdc.noaa.gov/cdo-web/datasets/GHCND/stations/GHCND:USC00047470/detail).

#Example
from datetime import date
from pyncei.reader import NCEIReader
import datetime as dt
import csv
import pandas as pd

token = '##############'
ncei = NCEIReader(token,encode_queries=False)
mindate = '1970-01-01' # either yyyy-mm-dd or a datetime object
maxdate = dt.datetime.today().strftime("%Y-%m-%d")
datatypes = ['TMAX']
dataset = 'GHCND'
minyear = int(mindate[:4])
year = date.today().year
val='GHCND:USC00047470'
ncei.get_data(dataset=dataset,
station=val,
datatype=datatypes,
startdate=date(1990, 1, 1),
enddate=date(1990, 12, 31))

There are several other stations for which the data seems incorrect.

Thanks

Examples not working

Hi,

I just tried the examples provided but they are returning empty list.

Thanks

Syntax Error in ... pyncei\reader.py

File "C:\Users\slowt\Anaconda3\envs\tide\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 4, in
from pyncei import NCEIReader

File "C:\Users\slowt\Anaconda3\envs\tide\lib\site-packages\pyncei-0.12-py3.8.egg\pyncei_init_.py", line 1, in
from .reader import NCEIReader

File "C:\Users\slowt\Anaconda3\envs\tide\lib\site-packages\pyncei-0.12-py3.8.egg\pyncei\reader.py", line 701
print textwrap.fill(s, initial_indent=' ' * indent,
^
SyntaxError: invalid syntax

Key error for some stations

There is a good chance this is a user error, but I am running into the following error, specifically when pulling GHCND and PRCP data. If I follow the example and generate a response, there appears to be data, but using to_dataframe() throws the following error for some stations:

File "/PycharmProjects/Regenerate/.venv/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-15-7a2ac4d974af>", line 1, in <module> response.to_dataframe() File "/PycharmProjects/Regenerate/.venv/lib/python3.12/site-packages/pyncei/bot.py", line 1068, in to_dataframe df = pd.DataFrame(self.values()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/PycharmProjects/Regenerate/.venv/lib/python3.12/site-packages/pandas/core/frame.py", line 832, in __init__ data = list(data) ^^^^^^^^^^ File "/PycharmProjects/Regenerate/.venv/lib/python3.12/site-packages/pyncei/bot.py", line 1010, in values yield {k: val[k] for k in self.key_order if k in keys} ~~~^^^ KeyError: 'station'

Is there anything I can do to avoid this or check for this issue before running to_dataframe() to avoid erroring out?

Documentation lost

Hi Adam! Thanks for the interesting work.
I find the documentation page is gone. Or is it still under development?

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.