Code Monkey home page Code Monkey logo

cimir's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cimir's Issues

Error when running example query: Invalid char in json text

I think perhaps the API has changed.

library(cimir)
#> Set your CIMIS App Key with "set_key()".
set_key(key = Sys.getenv("Rcimis_key"))
if(is_key_set()) {
  cimis_data(targets = 170, start.date = Sys.Date() - 4, 
             end.date = Sys.Date() - 1)
} 
#> Error: lexical error: invalid char in json text.
#>                                        <html><head><title>Request Reje
#>                      (right here) ------^

Created on 2020-01-17 by the reprex package (v0.3.0)

Question about Hourly CIMIS "Hour" column

Hello everyone,

Thank you for making this package, it is a great reference code base for what I am building at the moment, lots of neat ideas!

I have a question about the "Hour" column of the hourly data from CIMIS:

  • The "Hour" column has values within (0100, 0200, ... 2400)
  • Does 0100 mean 1 A.M?
  • And does 2400 equate to "midnight" of that day, or 0 A.M of the next day?

From this code, as well as looking at the usage of cimis_to_datetime(), it seems like that is the case, but wanted to confirm.
https://github.com/mkoohafkan/cimir/blob/d75c7a52ef049cad7896f9040ae69e6b7c553e97/R/util.r#LC24:~:text=cimis_to_datetime%20%3D%20function(d)%20%7B

I tried to look for documentations about this column, but couldn't see any.

Api Key error

Hi, I am running this code:
library(cimir)
set_key(key = "MY API KEY")
cimis_station()

After waiting some time, I get this message:

cimis_station()
Error: The CIMIS API returned an error. Check that your API key is correct.
CIMIS error message:
<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 4274547741574638676<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>

Then I double-check my key and seems fine.

is_key_set()
[1] TRUE

Sometimes this very same key works sometimes it does not. What could be the issue here?

warnings from tidyr::unnest() about deprecated syntax

Maybe this is coming from bind_records.

library(cimir)
#> Set your CIMIS App Key with "set_key()".
set_key(key = Sys.getenv('Rcimis_key'))
cimis_data(
  targets = 170,
  start.date = Sys.Date() - 4,
  end.date = Sys.Date() - 1
)
#> Warning: `cols` is now required.
#> Please use `cols = c(Data)`

#> Warning: `cols` is now required.
#> Please use `cols = c(Data)`

#> Warning: `cols` is now required.
#> Please use `cols = c(Data)`

#> Warning: `cols` is now required.
#> Please use `cols = c(Data)`
#> Warning: `cols` is now required.
#> Please use `cols = c(Records)`
#> # A tibble: 56 x 13
#>    Name  Type  Owner Date       Julian Station Standard ZipCodes Scope
#>    <chr> <chr> <chr> <date>      <int> <chr>   <chr>    <chr>    <chr>
#>  1 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  2 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  3 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  4 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  5 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  6 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  7 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  8 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#>  9 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#> 10 cimis stat~ wate~ 2020-01-13     13 170     english  94529, ~ daily
#> # ... with 46 more rows, and 4 more variables: Item <chr>, Value <dbl>,
#> #   Qc <chr>, Unit <chr>

Created on 2020-01-17 by the reprex package (v0.3.0)

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.