A simple scraping application to visualize data about water in São Paulo.
-
Clone the repository
git clone https://github.com/rafaell-lycan/sabesp-mananciais-api.git
-
Install dependencies
cd sabesp-mananciais-api yarn
-
Start the dev server
yarn develop
-
You can now access it on http://localhost:3000.
yarn test
Description | Method | URL | Params |
---|---|---|---|
Get data of today | GET | / |
NULL |
Get data of a specific day | GET | /:date |
YYYY-MM-DD |
Get data of today | GET | /v2 |
NULL |
Get data of a specific day | GET | /v2/:date |
YYYY-MM-DD |
It isn't possible get data before January 1th, 2003 or future.
[
{
"name": "Cantareira",
"data": [
{"key": "volume armazenado", "value": "7,2 %"},
{"key": "pluviometria do dia", "value": "0,0 mm"},
{"key": "pluviometria acumulada no mês", "value": "0,0 mm"},
{"key": "média histórica do mês", "value": "271,1 mm"} ]
},
//...
]
Thank you @wcastello for the suggestion.
[
{
"name": "Cantareira",
"data": {
"volume_armazenado": "19,0 %",
"pluviometria_do_dia": "0,2 mm",
"pluviometria_acumulada_no_mes": "206,5 mm",
"media_historica_do_mes": "178,0 mm"
}
},
//...
]
Sabesp API was made with love and a lot of JavaScript by these guys:
Rafaell Lycan | William Bruno |