Created
October 30, 2023 07:30
-
-
Save peio/c805949aab6bd7ab3670ce87a0500972 to your computer and use it in GitHub Desktop.
Google Sheets import and cleaning of results of the 2023 Municipal election from the webiste of CIK.bg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=QUERY({ | |
INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 1), | |
INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 2), | |
ARRAYFORMULA(IFERROR(VALUE(SUBSTITUTE(SUBSTITUTE(TRIM(INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 3)), "*", ""), " ", "")), INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 3))), | |
ARRAYFORMULA(IFERROR(VALUE(SUBSTITUTE(SUBSTITUTE(TRIM(INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 4)), "*", ""), " ", "")), INDEX(IMPORTHTML("https://results.cik.bg/mi2023/tur1/rezultati/2246.html", "table", 1), , 4))) | |
}, "SELECT * WHERE Col1 IS NOT NULL", 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment