Git Product home page Git Product logo

entsoeapi's People

Contributors

hubert-crea avatar krose avatar sbudai avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

entsoeapi's Issues

Install Issue

When installing on WIndows using:

devtools::install_github("krose/entsoeapi")

I receive the message:
Downloading GitHub repo krose/entsoeapi@master
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/krose/entsoeapi/tarball/master'

I'd appreciate any suggestions you might have to install entsoeapi.

en_generation_agg_gen_per_type function on a Mac

I recently switched from a Windows machine to a Mac running Monterey. In windows in had no issue with entsoeapi.

On the mac, when I use the function en_generation_agg_gen_per_type, I receive an error. If I run the API call directly in a browser:

CALL: https://transparency.entsoe.eu/api?documentType=A75&processType=A16&in_Domain=10Y1001A1001A83F&periodStart=2021-01-01&periodEnd=2021-12-31%2023:00:00&securityToken=YOUR_TOKEN

RESPONSE: <Acknowledgement_MarketDocument xmlns="urn:iec62325.351:tc57wg16:451-1:acknowledgementdocument:7:0">
4ed90d04-8b2f-4
2022-04-10T12:23:23Z
<sender_MarketParticipant.mRID codingScheme="A01">10X1001A1001A450</sender_MarketParticipant.mRID>
<sender_MarketParticipant.marketRole.type>A32</sender_MarketParticipant.marketRole.type>
<receiver_MarketParticipant.mRID codingScheme="A01">10X1001A1001A450</receiver_MarketParticipant.mRID>
<receiver_MarketParticipant.marketRole.type>A39</receiver_MarketParticipant.marketRole.type>
<received_MarketDocument.createdDateTime>2022-04-10T12:23:23Z</received_MarketDocument.createdDateTime>

999
Expected parameter value length is 12. Delivered parameter: PeriodEnd, value 2021-01-01

</Acknowledgement_MarketDocument>

The ENTSOE API does not like the PeriodEnd. I've tried different variations but none work. I.e, 2021-01-01 00:00 or 2021-01-01 00:00:00, adding "UTC", etc.

So, something changes in the formatting of the request between windows and Mac. Have you run into this before?

Set new_style in en_outages_clean as default.

Hi @sbudai. Would it break anything on your end if we set the new_style as the default in the en_outages_clean function. It's a function that already tries to add a level of improvements to the default output, so why not just do the full improvement as default? Let me know what you think.

new package version?

Hi,
I wanted to download data but got an error message.

entsoeapi::en_transmission_day_ahead_prices(
eic = "10YBA-JPCC-----D",
period_start = "2022-08-01 05:00:00 UTC",
period_end = "2022-08-04 05:00:00 UTC",
security_token = token
)

https://transparency.entsoe.eu/api?documentType=A44&in_Domain=10YBA-JPCC-----D&out_Domain=10YBA-JPCC-----D&periodStart=202208010500&periodEnd=202208040500&securityToken=195a1ed2-9725-47ea-9204-328e3dbe8f04 ...
downloaded
Error in en_cont[, c("in_domain_mrid", "out_domain_mrid", "currency_unit", "price_unit", "dt", "price")]:
! Can't subset columns that don't exist.
✖ Columns currency_unit, price_unit, and dt don't exist.

And when I have a look at the function it looks different than the one which you have on github. Do you may have a net package version but don't update it?

current function which I am loading is:

entsoeapi::en_transmission_day_ahead_prices
function (eic, period_start, period_end, in_domain = NULL, out_domain = NULL,
security_token = NULL)
{
period_start <- url_posixct_format(period_start)
period_end <- url_posixct_format(period_end)
if (is.null(in_domain)) {
in_domain <- eic
}
if (is.null(out_domain)) {
out_domain <- eic
}
if (is.null(security_token)) {
security_token <- Sys.getenv("ENTSOE_PAT")
}
if (length(eic) > 1) {
stop("This wrapper only supports one EIC per request.")
}
url <- paste0("https://transparency.entsoe.eu/api", "?documentType=A44",
"&in_Domain=", in_domain, "&out_Domain=", out_domain,
"&periodStart=", period_start, "&periodEnd=", period_end,
"&securityToken=", security_token)
en_cont <- api_req(url)
en_cont <- xml2::as_list(en_cont)
en_currency <- en_cont$Publication_MarketDocument$TimeSeries$currency_Unit.name[[1]]
en_price_unit <- en_cont$Publication_MarketDocument$TimeSeries$price_Measure_Unit.name[[1]]
en_cont <- tm_price_helper(en_cont)
en_cont$price <- as.numeric(en_cont$price)
en_cont$currency_unit <- en_currency
en_cont$price_unit <- en_price_unit
en_cont$in_domain_mrid <- in_domain
en_cont$out_domain_mrid <- out_domain
en_cont <- en_cont[, c("in_domain_mrid", "out_domain_mrid",
"currency_unit", "price_unit", "dt", "price")]
en_cont
}
<bytecode: 0x555e4ac12e30>
<environment: namespace:entsoeapi>

Package Version:

packageVersion("entsoeapi")
[1] ‘0.1.4.3’

CRAN submission request

Hi guys,
in order to use the package more easily within Posit Connect (ex RStudio Connect), it would be nice to have it on CRAN.

Are you planning to submit it?

Thanks.

Missing or invalid security token

Ran into this error after obtaining a new security token and saving it in the .Renviron file (and trying to add it directly to my R script as well). I get this after running the example code in the github readme.

Is there anything else I could try to make sure the token has been saved? thanks!

https://transparency.entsoe.eu/api?documentType=A65&processType=A16&outBiddingZone_Domain=10Y1001A1001A83F&periodStart=201912312300&periodEnd=202001012200&securityToken= ...
Error in api_req(url) : 
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Error</title>
</head>
<body>Unauthorized. Missing or invalid security token</body>
</html>

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.