<jupyter_start><jupyter_text>Analyza OpavskaAbych si usetril praci, tak vyuzivam prikazy ze:* analyzy vetru - https://github.com/martin-majlis/ms-opendata-tools/blob/master/01-Analyza-Vetru.ipynb* simulace skoly - https://github.com/martin-majlis/ms-opendata-simulation/blob/master/Analysis.ipynb<jupyter_code># import balicku
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
# nactu predpripravena data
data_raw = pd.read_csv('opavska_sensor.csv')
# podivam se, jake sloupce jsou dostupne
data_raw.columns
# Ted si vyberu sloupecky, ktere vypadaji uzitecne
COLUMNS_OPAVSKA = [
    'TS', 
    'TS_H',
    '0004A30B001EF8A4-Wind_Direction', 
    '0004A30B001EF8A4-Wind_Speed',
    '0004A30B001EFD5D-Soil_Moisture',
    '0004A30B001F3A88-Events_counter',
    '0004A30B001F3A88-Magnet_status',
    '0004A30B001F5607-Humidity',
    '0004A30B001F5607-Temperature',
    '0004A30B001F6CED-Noise'    
]
data_opavska = data_raw[COLUMNS_OPAVSKA]
data_opavska.describe()
# Z analyzy vetru vime, ze senzor pro mereni vetru je rozbity
# Ted si vyrobime grafy pro vsechny hodnoty. 
# Protoze maji ruzne jednotky, nema smysl je davat do jednoho grafu.
# Bud bych mohl nekolikrat zkopirovat prikaz pro vygenerovani grafu:
data_opavska['0004A30B001EF8A4-Wind_Direction'].plot(title='0004A30B001EF8A4-Wind_Direction')
plt.show()
data_opavska['0004A30B001EF8A4-Wind_Speed'].plot(title='0004A30B001EF8A4-Wind_Speed')
plt.show()
data_opavska['0004A30B001EFD5D-Soil_Moisture'].plot(title='0004A30B001EFD5D-Soil_Moisture')
plt.show()

# Nebo muzu udelat smycku pro vsechny sloupecky
for col in COLUMNS_OPAVSKA:
    if col in ['TS', 'TS_H']:
        continue
    data_opavska[col].plot(title=col)
    plt.show()
data_opavska
# Ted opet vyradime cast dat, kdy udaje nebyly spolehlive.
# Podle grafu to vypada, ze to zacalo fungovat, kdyz teplota stoupla nad 5 stupnu
COLUMNS_TEMP = [
    'TS_H', 
    '0004A30B001EFD5D-Soil_Moisture',
    '0004A30B001F5607-Humidity',
    '0004A30B001F5607-Temperature',
    '0004A30B001F6CED-Noise'
]
data_valid_temp = data_opavska[data_opavska['0004A30B001F5607-Temperature'] > 5][COLUMNS_TEMP]
# Ted se opet muzeme podivat na jejich vlastnosti
data_valid_temp.describe()
# Nebo muzu udelat smycku pro vsechny sloupecky
for col in COLUMNS_TEMP:
    if col in ['TS', 'TS_H']:
        continue
    data_valid_temp[col].plot(title=col)
    plt.show()
# A ted se muzeme podivat s cim koreluje vnitrni teplota
data_valid_temp.corr()['0004A30B001F5607-Temperature'].sort_values()
# Take se muzeme podivat, jaka je korelace mezi vlhosti vzduchy a ostanimi hodnotami
data_valid_temp.corr()['0004A30B001F5607-Humidity'].sort_values()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0974169741697417, 'fraction_numerical': 0.09040590405904059, 'mean_word_length': 5.424170616113744, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '545289', 'license': 'MIT', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1156, 'n_words': 215, 'path': '02-Opavska.ipynb', 'repo_name': 'martin-majlis/ms-opendata-tools', 'size': '2710'}