Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-Border Physical Flow with several same position/value are not parsed. #97

Open
ThomasAuriel opened this issue Jan 24, 2021 · 2 comments
Labels
more info needed when more info is needed from the person opening the issue question

Comments

@ThomasAuriel
Copy link

ThomasAuriel commented Jan 24, 2021

The api is currently unable to collect data on the Cross-Border Physical Flow DE-NO

https://transparency.entsoe.eu/transmission-domain/physicalFlow/show?name=&defaultValue=false&viewType=GRAPH&areaType=BORDER_CTY&atch=false&dateTime.dateTime=18.01.2021+00:00|CET|DAY&border.values=CTY|10Y1001A1001A83F!CTY_CTY|10Y1001A1001A83F_CTY_CTY|10YNO-0--------C&dateTime.timezone=CET_CEST&dateTime.timezone_input=CET+(UTC+1)+/+CEST+(UTC+2)

The time step of this data is 15min instead of 1hr. But this is not the source of the issue.

The soup library, once the xml parsed, returns several position/flows with the same value. This is confusing for the function _parse_crossborder_flows_timeseries(soup) :

def _parse_crossborder_flows_timeseries(soup):
    """
    Parameters
    ----------
    soup : bs4.element.tag

    Returns
    -------
    pd.Series
    """
    positions = []
    flows = []
    for point in soup.find_all("point"):
        positions.append(int(point.find("position").text))
        flows.append(float(point.find("quantity").text))

    series = pd.Series(index=positions, data=flows)
    series = series.sort_index()
    series.index = _parse_datetimeindex(soup)

    return series

The soup first positions are :

<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>,
<position>1</position>, <position>1</position>, <position>1</position>, <position>1</position>, <position>2</position>,
<position>3</position>, <position>4</position>, <position>5</position>, <position>6</position>, <position>7</position>,
<position>8</position>, <position>9</position>, <position>10</position>, <position>11</position>, <position>12</position>,
<position>13</position>, <position>14</position>, <position>15</position>, <position>16</position>, <position>17</position>,
<position>18</position>, <position>19</position>, <position>20</position>, <position>21</position>, <position>22</position>
@FrankBoermanTenneT
Copy link
Contributor

do you have a python code that shows this crashing? I was planning on using this data so was concerned when I saw this but when I run this:

start=pd.Timestamp('20210118', tz='Europe/Amsterdam')
end=pd.Timestamp('20210119', tz='Europe/Amsterdam')
df = clientP.query_crossborder_flows('DE', 'NO', start=start, end=end)

I get perfectly fine data with latest version of the package.

@fboerman
Copy link
Collaborator

hi @ThomasAuriel does the last comment fix your issue?

@fboerman fboerman added more info needed when more info is needed from the person opening the issue question labels Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed when more info is needed from the person opening the issue question
Projects
None yet
Development

No branches or pull requests

3 participants