mkoohafkan / cimir Goto Github PK
View Code? Open in Web Editor NEWR interface to the CIMIS web API
Home Page: https://mkoohafkan.github.io/cimir/
R interface to the CIMIS web API
Home Page: https://mkoohafkan.github.io/cimir/
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)
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:
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.
Also explore if implementing asynchronous requests is worthwhile.
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?
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.