<jupyter_start><jupyter_text>Importamos o numpy<jupyter_code>import numpy as np<jupyter_output><empty_output><jupyter_text>Usamos o numpy para abrir os dados do .txt<jupyter_code>dados= np.loadtxt('dados/brazil-TAVG-Trend.txt', comments='%')
print(dados)<jupyter_output>[[  1.83200000e+03   1.00000000e+00  -5.75000000e-01 ...,              nan
               nan              nan]
 [  1.83200000e+03   2.00000000e+00  -1.00500000e+00 ...,              nan
               nan              nan]
 [  1.83200000e+03   3.00000000e+00  -7.93000000e-01 ...,              nan
               nan              nan]
 ..., 
 [  2.01300000e+03   7.00000000e+00   7.72000000e-01 ...,              nan
               nan              nan]
 [  2.01300000e+03   8.00000000e+00   1.86000000e-01 ...,              nan
               nan              nan]
 [  2.01300000e+03   9.00000000e+00              nan ...,              nan
               nan              nan]]<jupyter_text>Faremos a média das anomalias anuais<jupyter_code>ano = dados[:,0]
mes = dados[:,1]
anomalia_anual = dados[:,4]
media=np.nanmean(anomalia_anual)
print(media)<jupyter_output>-0.229509107894<jupyter_text>Faremos o desvio padrão das anomalias anuais<jupyter_code>desvpad=np.nanstd(anomalia_anual)
print(desvpad)<jupyter_output>0.496111048439<jupyter_text>Plotaremos um gráfico a partir dos dados de Anomalia de Temperatura Média Anual X Tempo<jupyter_code>ano_dec= ano+(mes -1)/12
media_tem= np.nanmean(dados[:,8])
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot(ano_dec, anomalia_anual)
plt.xlabel('Tempo (em anos)')
plt.ylabel('Anomalia de Temperatura')
plt.title('Brasil')
plt.savefig('Brasil.pdf')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12096300645918967, 'fraction_numerical': 0.12918379330593072, 'mean_word_length': 2.564853556485356, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '3715', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 794, 'n_tokens_neox': 644, 'n_words': 106, 'path': 'python1.ipynb', 'repo_name': 'mat-esp-2016/python-1-carlosjessicathais2', 'size': '1703'}