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.