Skip to main content

API de dados abertos da PRF

Project description

PRF API

https://img.shields.io/pypi/v/prf-api.svg https://img.shields.io/travis/nymarya/prf_api.svg Updates

API de dados abertos da PRF

Esta pacote tem o objetivo de facilitar o download e o uso dos dados abertos da PRF, que contém informações sobre acidentes e infrações cometidas nas rodovias federais do Brasil.

Dependências

Para baixar dados anteriores a 2018, é necessário instalar unrar.

Para MacOS

brew install unrar

Para Linux

apt-get install unrar

Uso

O pacote pode ser obtido via pip.

pip install prf-api

Para utlizar, basta instanciar a classe:

from prf_api import prf_api

data = prf_api.PRFApi()

data.baixar('infracoes', anos=list(range(2017, 2019)))

df = data.dataframe('infracoes', anos=list(range(2017, 2019)), estado='RN')

Créditos

Este pacote foi criado com Cookiecutter e o template audreyr/cookiecutter-pypackage .

History

0.0.1 (2019-08-09)

  • First release on PyPI.

0.2.1 (2021-06-08)

  • Fix download of accident data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prf_api-0.2.2.tar.gz (13.8 kB view hashes)

Uploaded source

Built Distribution

prf_api-0.2.2-py2.py3-none-any.whl (9.1 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page