Entry for Draft Legislation / Brazil

brazil
godi

#1

This is a discussion about the submission for Draft Legislation / Brazil.

The analysis of this submission has to be split into parts. First, the distinction between the two parliament houses has to be made. Then, each aspect of the information requested by the survey will be considered separately.

I am also assuming here that the contents of bills do not need to be structured / machine readable (i.e., each chapter, article, etc., having special markup). That is, I am considering that PDFs are fine for contents of bills. For a more detailed discussion of the issue, see the following topic:

Chamber of Deputies

Content of the bill

Available? Yes. The webservice call ObterProposicao has, as a return value, a LinkInteiroTeor, a link that points to the content of the bill. See an example of an Open Data Bill, PL 7.804/2014.

In bulk? No. The content of the bill has to be requested one at a time. The bulk downloads do not include the full contents of the bills. However, they do have a summary - called “Ementa” - of each bill.

Author of the bill

Available through either the webservice calls or the bulk downloads.

Votes on bill per member of parliament

Available? Yes, by the webservice call ObterVotacaoProposicao. Example call: [the controversial PEC 241/2016]((http://www.camara.leg.br/SitCamaraWS/Proposicoes.asmx/ObterVotacaoProposicao?tipo=PEC&numero=241&ano=2016), which limits increases on government spending to only the yearly inflation.

In bulk? No, I do not think so. The bulk download CSVs all refer to the propositions themselves, not the votings.

Transcripts of debates on the bills

Available? Yes. Basic metadata on speeches can be obtained through the ListarDiscursosPlenario method of the webservices. One cannot search by bill number, but only by date range, session, speaker or party. Example: metadata on all speeches given on October 10th, 2016.

Full text of the speech is available through another method: ListarDiscursosPlenario. The parameters for getting the transcript of the speech can be obtained from the aforementioned webservice call. Example of a webservice call returning a transcript of a speech of Dep. Alessandro Molon about PEC 241/2016 on October 10th, 2016. The transcript is inside the XML element discursoRTFBase64, which needs to be decoded from Base64 to form the contents of an RTF file.

In bulk? No, I do not think so. The bulk download CSVs all refer to the propositions themselves, not any speeches.

Status of bill

Availaible both in the webservice call (see element “Situacao” (situation) in the example) and the bulk download (attribute DES_SITUACAO_PROPOSICAO on proposicoes.csv).

Federal Senate

Content of the bill

Available? Yes. First, get some basic metadata about the bill through the call

GET /materia/{sigla}/{numero}/{ano}

Example: PEC 55/2016, which limited the growth of government spending to the yearly inflation. From there you get the link to another call to get data on all texts associated with the bill:

GET /materia/textos/{codigo}

Example: texts associated with PEC 55/2016.

Finally, the response for that call gets you the direct links to the documents, in PDF, that have the full contents of the bill. An excerpt of the response in the previous example:

<Texto>
  <CodigoTexto>201943</CodigoTexto>
  <DescricaoTipoTexto>Avulso da matéria</DescricaoTipoTexto>
  <TipoDocumento>PDF</TipoDocumento>
  <FormatoTexto>application/pdf</FormatoTexto>
  <DataTexto>2016-10-26</DataTexto>
  <UrlTexto>http://www.senado.leg.br/atividade/rotinas/materia/getTexto.asp?t=201943</UrlTexto>
  <DescricaoTexto>Avulso da Matéria</DescricaoTexto>
</Texto>

In bulk? I don’t think so. I couldn’t find any bulk downloads from the Senate.

Author of the bill

Avaliable? Yes, on the same call that returns the basic bill metadata.

In bulk? I don’t think so. I couldn’t find any bulk downloads from the Senate.

Votes on bill per member of parliament

Avaliable? Yes. You need to get the internal code of the bill through the previously described API call, though.

Example: how each senator has voted on PEC 55/2016 about the controversial spending limitation.

In bulk? I don’t think so. I couldn’t find any bulk downloads from the Senate.

Transcripts of debates on the bills

Avaliable? Yes. As is the case of the Chamber of Deputies, the transcripts of the senators’ discourse are directly obtainable from a date or session number, but not directly from a bill. It is necessary to query the API first for the sessions in which the bill appeared, and then query the API call for obtaining the speeches.

By using the following API call, you can list all the plenary speeches on a given date:

GET /plenario/lista/discursos/{dataInicio}/{dataFim}

Example: plenary speeches on October 26th, 2016, mainly about PEC 55/2016 on budget limitations.

The response contains, for each speech, the link to the contents of its transcript.

In bulk? I don’t think so. I couldn’t find any bulk downloads from the Senate.

Status of bill

Avaliable? Yes, on the same call that returns the basic bill metadata.

In bulk? I don’t think so. I couldn’t find any bulk downloads from the Senate.

Summary

All of the required data is available. Some, but not all of it, in bulk downloads. Contents of bills is in unstructured text.


#2

Hello @herrmann,

I really thought that the webservices did provide bulk download through API. Actually it is too much data to visualize, so they offer only extracts of responses to the system, not the whole dataset, but if you create a webservice to “call” data to your servers, I thought it was possible to have to whole dataset administered by this webservice.

But, I have to confess, I am not very acquainted with the specifics of programming and etc.

Thanks!
Wagner


#3

@MRB Hello Michael Beatty,

I would like to check if you took @herrmann 's comments in your review. I see that you did consider eventually the download in bulk to be available, but @herrmann states that it is not.

Since you didn’t comment on that issue in your review, I would like to check what criteria you used to evaluate if you took this comment into account.

I’ll be waiting for your answer!

Thanks,
Wagner

@arielkogan @Mor @Andressa_Falconiery


#4

Hi @Wagner_Faria_de_Oliv @herrmann , thank you very much for your feedback. As part of the public dialogue, we will follow up on your input along with the reviewers and will get back to you in the coming days.
All the best,
Oscar


#5

Hi @Wagner_Faria_de_Oliv, @herrmann,

thanks for this incredibly detailed input. I would like to add @alyssaopennorth to this conversation because she did a great job at coordinating the review of draft legislation and national law. She has the best overview of this data category (and might be able to connect with @MRB directly)

Alyssa, maybe you can tell Wagner how you went about to assess bicameral systems and how you dealt with inconsistent open data publication between different legislatures? Many thanks in advance! :slight_smile:

Best
Danny


#6

Hi @Wagner_Faria_de_Oliv and @herrmann, the submission interface is blocked, but we are in the review (“consulta pública”) period: please appreciate the suggestion to add LexML metadata sources (with ~73000 items!) to the Draft Legislation. It is an important source of “valid names” and “valid URLs”.


#7

Just to close this off, @herrmann, your elaborations are correct, I will therefore change the entry and say that the data in total are not available in bulk, and change machine-readability to “no” (in accordance with what I mentioned in the topic you linked to)

I’ll however document that information like bill status and author are available in structured form