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

Fix senadores #11

Merged
merged 4 commits into from
Apr 13, 2024
Merged

Fix senadores #11

merged 4 commits into from
Apr 13, 2024

Conversation

dieghernan
Copy link
Member

Hola @llrs , ¿que tal?,

After #10 I saw that the package was failing. I had the chance to have a look and the issue was that senadores() was not working since https://www.senado.es/web/ficopendataservlet?tipoFich=10 gives now and empty xml (API Senado).

However https://www.senado.es/web/ficopendataservlet?tipoFich=10&legis=XX gives results, so I vectorized senadores() over legislatura and used the previous code as an iterator (senadores_lappl() with a try() that catches errors and blanks, a sloppy approach) but now it works. I hard -coded the iterator up to legislatura 24 that should be enough (we're in 14 after 46 years).

I also did some cleaning in the actions, they were outdated and even redudant, and small fixes on typos in order to avoid NOTEs. Now the package should pass the checks and build the site correctly.

Regards

@llrs
Copy link
Member

llrs commented Apr 13, 2024

Hola! Gracias por revisar.

So it seems they changed some of the data below the API (see the diff of this PR, and you realize the data changed for the XII and XIII legislature).

It make more sense to provide flexibility and allow users to select which data they want themselves.
While creating this I couldn't reproduce your output, for me the 0 to 11 legislature fails to provide the data. However, when I request a single one I get all the legislatures!
But I get different data if I request only the 12 than if I request from 12 to 14! I get more data with the latest request.
Still there is some problem with the data because some people are returned twice with slightly different names: "LÓPEZ CONDÉS" vs "LÓPEZ CONDES".

Thanks for the updates in the actions too, as the package so far hasn't got much attention I didn't keep up all tidy and well.

@llrs llrs merged commit 679e2f1 into rOpenSpain:master Apr 13, 2024
5 of 6 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants