Analyzed DataSet
http://www.dadosabertos.pe.gov.br/PortalDadosAbertos/public/pages/recurso/recursoDetalhado.jsf:
Continuing with the Climate Dataset in Recife with 172,486 measurements of rainfall in the state of Pernambuco between 2010 and 2013.
In the image above we noticed by the first 3 data of the dataset that daily measurements were made in all municipalities, our objective is to create categories based on the table below
As we have many measurements for each municipality I will group them with the groupby () function using the aggregate function to take the average of all the measurements of each municipality. the result is out [77]
In in [126]: We created the function categoriza_volume_chuvas () that receives the parameter s that is the rainfall average, this function maps the categories shown in the table above and returns the rain media category.
in [127]: I create the column "Category_Time" using the apply () function to apply the function that we created the Volume_chuvas_mm, out [128] column and the output dataset.
Counting by created categories:
http://www.dadosabertos.pe.gov.br/PortalDadosAbertos/public/pages/recurso/recursoDetalhado.jsf:
Continuing with the Climate Dataset in Recife with 172,486 measurements of rainfall in the state of Pernambuco between 2010 and 2013.
In the image above we noticed by the first 3 data of the dataset that daily measurements were made in all municipalities, our objective is to create categories based on the table below
As we have many measurements for each municipality I will group them with the groupby () function using the aggregate function to take the average of all the measurements of each municipality. the result is out [77]
In in [126]: We created the function categoriza_volume_chuvas () that receives the parameter s that is the rainfall average, this function maps the categories shown in the table above and returns the rain media category.
in [127]: I create the column "Category_Time" using the apply () function to apply the function that we created the Volume_chuvas_mm, out [128] column and the output dataset.
Counting by created categories: