Update Clustering authored by Christine Nowak's avatar Christine Nowak
......@@ -51,21 +51,23 @@ Several errors were encountered, when developing/using this tool. The following
| some error in a clustering routine yielding a list of country codes | Although you might not see it, the list contains different country codes but it shouldn't. Make sure that you don't create clusters that span across borders, as this causes issues. Use `n.buses` to see which bus should go into which country and check your result for differences.
E.g. the thrown error can look like this:
> File "C:\ProgramData\Miniconda3\envs\pypsa-eur\lib\site-packages\pypsa\networkclustering.py", line 60, in consense
> assert ((x == v).all() or x.isnull().all()), (
> AssertionError: In Bus cluster country the values of attribute country do not agree:
> 8235 SE
> 8121 SE
> 8070 SE
> 5565 SE
> 6181 SE
> ..
> 8669 SE
> 7630 SE
> 8362 SE
> 8034 SE
> 8479 SE
> Name: country, Length: 137, dtype: object
```
File "C:\ProgramData\Miniconda3\envs\pypsa-eur\lib\site-packages\pypsa\networkclustering.py", line 60, in consense
assert ((x == v).all() or x.isnull().all()), (
AssertionError: In Bus cluster country the values of attribute country do not agree:
8235 SE
8121 SE
8070 SE
5565 SE
6181 SE
..
8669 SE
7630 SE
8362 SE
8034 SE
8479 SE
Name: country, Length: 137, dtype: object
```
Gain insight by altering the following code in ´C:\ProgramData\Miniconda3\envs\pypsa-eur\Lib\site-packages\pypsa\networkclustering.py´:
```
......
......