
Show HN: All Politicians in Switzerland - faebi
https://politiker-politicien-politici.ch/
======
beefhash
Encoding seems to have gotten you in some cases:

Aellig Pentti apparently lives in "D�rflingen". The website of the canton of
Schaffhausen (sh.ch) uses ISO-8859-1, you _do_ have to check the Content-Type
header and/or the respective meta tag. Not everyone uses UTF-8 in 2017, it
seems.

You may also be interested in TERMDAT[1], maintained by the Federal
Chancellery. It's a "specialist vocabulary in the Federal Administration"[2].
That should help you keep all the translations in line with what's used at a
federal level, including English. They do have entries for things like
"Kantonsrat", too, even though that's on a cantonal level.

[1]
[https://www.termdat.bk.admin.ch/Search/Search](https://www.termdat.bk.admin.ch/Search/Search)

[2]
[https://www.bk.admin.ch/bk/en/home/dokumentation/languages/t...](https://www.bk.admin.ch/bk/en/home/dokumentation/languages/termdat.html)

~~~
snowpanda
Does that mean that the encoding of the browser visiting the page (or the
server doing the scraping in this case) get ignored? I always thought it was
the browser that set the encoding, come to think of it, not sure why I thought
that.

~~~
mateuszf
Browsers fall back to default encoding if the page doesn't specify encoding,
or the encoding is not supported by browser.

~~~
snowpanda
Got it! Thanks for explaining.

------
lukego
I'm surprised that this is on HN but it is cool :).

Turns out that one of Switzerland's 200 national parliamentarians lives in the
same hundred-person village as me. That's neat. Especially since she's with
the Greens rather than the Swiss People's Party :).

~~~
matt_the_bass
I’m not from Switzerland. Can you elaborate on “especially since she’s with
the greens rather than the Swiss people’s party”

------
s3nnyy
Just a great example of direct democracy: In Switzerland you can meet the
politicians on the street, in the tram, in the local pub and since you have
always the theoretically the _possibility_ to punch them in the face, you can
really say that they have skin in the game.

I think such projects put even more of their skin in the game. Thanks for
building it! (content marketing: if you want to move here, I am a tech
recruiter hunting for engineers - my e-mail is in my HN-profile)

~~~
skummetmaelk
You can do this is most small countries.

~~~
s3nnyy
In Germany politicians drive around in bullet-proof BMW/Mercedes.

~~~
mieseratte
Is that all politicians or only fairly high level ones? Insofar as I'm aware
most Congresspersons in the US do not receive protection.

------
smsm42
Any interest in participating in
[https://www.wikidata.org/wiki/Wikidata:WikiProject_every_pol...](https://www.wikidata.org/wiki/Wikidata:WikiProject_every_politician)
?

------
bob_roboto
Great job! The search can probably be improved. Searching for "Cedric" without
the accent aigu (é) does not yield any results, despite there being several
Cédric in the database. If this was an educational project I recommend
spending some time on search methodologies since they are very interesting.
Start with using something like Levenshtein Distance and improve either
performance or accuracy from there. Otherwise just use one of the existing
open source libraries.

~~~
Aaronmacaron
Why would you treat e and é the same? Those are two different characters with
different pronunciations. You also wouldn't treat capital i (I) and small L
(l) the same just because they look similarly.

~~~
mkempe
Accents are generally considered _unimportant_ in the context of a search, at
least in French.

------
sruh
Interesting project. If you have email addresses for the majority of
politicians, you could build a dialogue platform similar to the German
abgeordnetenwatch.de.

------
myrion
What's with the points I gain for clicking on different parts of the website?
It's nice that I'm a "Pro User" now, but also a tad odd.

------
mkempe
Interesting. It looks like you only have people in the legislative branches,
at the Federal and Canton levels. Will you expand to the lower levels of
government and include, at least, people in the executive branches? do you
have a mechanism to update over time and keep track of people who were in
power in the past?

~~~
faebi
My app currently parses all the data automatically from the respective
federal/cantonal government websites. I thought about getting the politicians
from the local communities, but then I would have to parse the websites of
~2400 communities. Also I do not know how many communities even publish this
information. So for me it is currently to much work, unless the government
enforces a law to publish this data in a standard way.

The app does not keep track of people at all. Each new parsing deletes the old
data.

Thanks for the point about the executive and judical branches. That would be
something interesting to add.

~~~
KamelAufAbwegen
Pretty cool, thanks.

I started once to index all switzerland government websites with yacy. I could
index admin.ch and almost all cantons easy. But some city websites did not
answer if it was not "a browser" or "google" who asked for the website ;-)

------
mbi
You haven't included the politicians' parties or political affiliations in the
data set, is that on purpose?

~~~
faebi
No it's not on purpose. I just did not prepare all parsers yet to include or
detect the parties. For some it is actually already present but not visible.
Just search it in the searchbar on top. Example with SVP: [https://politiker-
politicien-politici.ch/en/people?utf8=%E2%...](https://politiker-politicien-
politici.ch/en/people?utf8=%E2%9C%93&locale=&q%5Braw_json_or_name_or_strasse_or_plz_or_ort_or_phones_json_or_emails_json_cont%5D=SVP&commit=Search)

------
PokeFind
Would you mind updating

Werner Luginbühl

to:

Alte Gasse 70 3704 Krattigen

from:

Bundesgasse 35 3001 Bern

source:[http://www.werner-luginbuehl.ch](http://www.werner-luginbuehl.ch)

------
mosselman
At the bottom it has a list of websites with the title: "Who ever made these
websites with the lists of People, you made a pretty bad job!"

What is the story behind this comment?

~~~
fastball
Those are all the websites for the various cantons in Switzerland, as it seems
the creator of this site needed to get the data from each canton's registry
individually. I would assume some of the sites had harder to scrape data than
others, and that is the reason for the differentiation.

Or maybe those sites allowed him to _easily_ download the entire registry from
those sites in an insecure way, so "you did a poor job obfuscating /
firewalling your data"?

Those are my two guesses.

~~~
m_mueller
Maybe it's just a Swiss acting according to the stereotype of Germans on
steroids [1].

[1]
[http://countryballs.net/_nw/9/18482749.png](http://countryballs.net/_nw/9/18482749.png)

;-)

~~~
faebi
Fits pretty good! Probably I should add a description why I didn't like
certain websites. Also the comment of KamelAufAbwegen hits the nail on the
head
[https://news.ycombinator.com/item?id=15958534](https://news.ycombinator.com/item?id=15958534)

For me it was astonishing in how many different ways the Kantons publish this
data and also how horrible certain websites are. Some publish a nice simple
HTML table with all data, the best ones even publish an excel file. Like this,
most people at least could generate a series letter in word.

Many websites are an insane mess of javascript and tons of requests for even
the simplest informations. Some websites are insane slow. Some websites seem
to have a broken server and every N-th request fails. Some are even barely
navigatable by a human. And then I think how much I probably paid for that
horrible piece of software with my taxes.

------
Fnoord
Is this PII?

What exactly are these addresses? Work or home address? Phone numbers, are
they work, home, or both?

------
du_bing
Where do you get these data? It's great.

------
iagooar
How is a call or a letter better than an email?

~~~
elbear
It's probably considered closer to a real life interaction, which has more
meaning than an email.

To make a comparison, imagine a close friend wishing you Happy Birthday
through email instead of calling you.

------
alexasmyths
That's quite a lot of 'politicians' for a country of 8 million people.

Some cantons have 200K people with 150 'politicians' ???

Bureaucrats - yes - many more, surely.

But Canada has ~350 at the Fed, and maybe ~300 provincial meaning maybe ~400
for about 900 people.

This seems like a lot of managers.

~~~
Lukas_Skywalker
Most of those in Switzerland still have a day job though. Those in the
cantonal council (the smallest administrational unit listed on the site) have
meetings during 50 days every year. The rest of the year they are mostly
working their normal jobs.

