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

CSV contains two lists with two different formats #34

Closed
dwaam opened this issue Nov 6, 2024 · 8 comments
Closed

CSV contains two lists with two different formats #34

dwaam opened this issue Nov 6, 2024 · 8 comments
Assignees

Comments

@dwaam
Copy link

dwaam commented Nov 6, 2024

Hi,

There is an issue with the CSV export for resource code-list:
Header:
Change,Country,Location,Name,NameWoDiacritics,Subdivision,Status,Function,Date,IATA,Coordinates,Remarks
for around 61K lines

then a new header appears at line 61396
Change,Country,Location,Name,NameWoDiacritics,Subdivision,Function,Status,Date,IATA,Coordinates,Remarks

Same data but two header are switched.

Is there a way to fix that please?

I see that it is directly the data file which is corrupted:
https://raw.githubusercontent.com/datasets/un-locode/refs/heads/main/data/code-list.csv

Thank

@dwaam dwaam changed the title CSV contains two lists with to different formats CSV contains two lists with two different formats Nov 6, 2024
@sabas
Copy link
Contributor

sabas commented Nov 6, 2024

Good catch! @gradedSystem please check Thanks

@gradedSystem
Copy link
Member

@sabas should be fixed with the latest PR #35

sabas added a commit that referenced this issue Nov 7, 2024
[fix-data][s] Fixing up the data issue format - #34
@dwaam
Copy link
Author

dwaam commented Nov 7, 2024

Hi,
Thanks for the PR, but I don't think the data is fixed.
The second header is removed, but the problem is that two columns are switched, so all the next data should have the two columns switched back no?

@gradedSystem
Copy link
Member

Hi @dwaam can you give me an example, cause i didnt seem to get it

@dwaam
Copy link
Author

dwaam commented Nov 7, 2024

Of course
image

As you can see here:
,ZW,ZVS,Zvishavane,Zvishavane,MI,RL,--3-----,1207,,2020S 03002E,
You have status RL then function --3-----.
Then, those two columns are switched
,AO,FBY,Farta Bay,Farta Bay,,1-------,RQ,0901,,1237S 01312E,
You have 1------- function, then RQ status

@gradedSystem
Copy link
Member

ok now i think i understood @dwaam

@gradedSystem
Copy link
Member

@dwaam I added function to fix this issue raised a PR waiting for an approve

@dwaam
Copy link
Author

dwaam commented Nov 7, 2024

Alright thanks, yep, now the data seems all good in the csv thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants