iui-group-l-name-zensiert/1-first-project/DataVisualization.ipynb

163 lines
2.0 MiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "877ecd7c",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c7b1f50c",
"metadata": {},
"outputs": [],
"source": [
"delim = ';'"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "c906f335",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA3wAABC/CAYAAADCXkJrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOzdd5xkV33n/c+5FTt3z0xPTgojiRFCSAhJRBOFwIC0XsDggIzxys8uXmOvn8cLTtjY3sVeL/ZiG2xstAbWRmDDGpERAiyC0ijnyaPJnVNVVz7PH/fe6qru6u6q7sr1fb9e85qqW6FPVZ+qPr/7O+d3jLUWERERERERaT9OoxsgIiIiIiIitaGAT0REREREpE0p4BMREREREWlTCvhERERERETalAI+ERERERGRNqWAT0REREREpE0p4BMREREREWlTCvhalDHm+8aYSWNMpNFtESmX+q20GvVZaTXqs9Jq1GdrTwFfCzLG7AVeAVjgrY1tjUh51G+l1ajPSqtRn5VWoz5bHwr4WtO7gXuBfwBuaWxTRMqmfiutRn1WWo36rLQa9dk6MNbaRrdBKmSMOQx8FLgP90Oy01p7vrGtElmZ+q20GvVZaTXqs9Jq1GfrQxm+FmOMeTmwB/iCtfZB4AjwM41tlcjK1G+l1ajPSqtRn5VWoz5bPwr4Ws8twLettWPe9X9CKXBpfuq30mrUZ6XVqM9Kq1GfrRNN6Wwhxpgu4BwQAOa8wxFgEHihtfbRBjVNZFnqt9Jq1Gel1ajPSqtRn60vZfhay81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gJe5d3t08D3gf/qHf+Mdd/he40xg8aYbd5977TWTgA
"text/plain": [
"<Figure size 1080x5616 with 130 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"from math import isqrt\n",
"\n",
"count = 5\n",
"\n",
"plt_in_row = 5\n",
"\n",
"fig, axs = plt.subplots(26, plt_in_row, figsize=(3*plt_in_row, 3*26), sharey=True)\n",
" \n",
"for j,k in zip(range(1,27), range(65,91)):\n",
" num = j\n",
" letter = chr(k)\n",
" filename = f'{num}{letter}.csv'\n",
" for i in range(0, count):\n",
" path = f'/opt/iui-datarelease1-sose2021/{i}/split_letters_csv/{filename}'\n",
" try:\n",
" ex_letter = pd.read_csv(path, delim)\n",
" except:\n",
" continue\n",
" f = ex_letter['Force']\n",
" temp_axs = axs[j-1][i%plt_in_row]\n",
" temp_axs.title.set_text(f'{letter}')\n",
" temp_axs.plot(ex_letter['Time']-ex_letter['Time'][0], f)\n",
" \n",
"plt.savefig('./single_first_five.png')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "89662e4f",
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"from math import isqrt\n",
"\n",
"count = 100\n",
"\n",
"numxalph = np.array(np.meshgrid(range(65,91), range(0,4)))[0].flatten()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "28c993cc",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABJUAAAzsCAYAAAAK9v2wAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOy9d5ws21Xf+1u7qtPMnJkTb04KV1dXEkpIAgF+PJIQwUbmYYyNQbbB2IAxwX4geGSMDTYGJBNksgABQgFJSEJZV/FG3ZzjuSfHydOhqvZe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EU4lSq4sdwAvqvvGxodbRKcBCidR9bkf420qk0RjWVOJNaSoIgCIIg7Fy6SeEwOrHQL5xKZpWaSs6ixCWnko0zxyfKEwRBEITVEVGpih/ZiXzzthLrranEQQvZcxGAslWCkXHB9Mf/Gi8m/vqOQzg6X1+gXRAEQRCE8aObaDzvwCQA4NBsF8asI/3N11RCjVNJZCVBEAThIkFEpSredEOoHc/XKyqZMIg4BwuzF5V+8bW/WFo+Vk6l/vrcW8LazK4k+On3PIDv+7M7t/tSBEEQBOGiQBuNtz/y9pEdcy8EvVRj90QTAJBmKYxJAKyR/uZEJVPjVBJRSRAEQbhYEFGpAgeFupk2P6BzkLbW1ZtPD/OiUqzGt/yVOJW2jl5qg0nfRUYQBEEQhNX53NHP4dfu+DX85l2/eV6O/6Hfvx+/+x8+ueo2SWYw2bKxWhqIW6s5lTLt099Cp5LEVIIgCMLFhYhKVUqzRcOr63vC1RwmmJm6b2ll05ej3XGGRKUxmsAy4lTactb7ORMEQRCEnUrS7+EPfujfYPnpIwCAR2cfPS/neea
"text/plain": [
"<Figure size 1440x4320 with 26 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig, axs = plt.subplots(13,2,figsize=(20, 60), sharey=True)\n",
"\n",
"for j,k in zip(range(1,105),numxalph):\n",
" num = j\n",
" letter = chr(k)\n",
" filename = f'{num}{letter}.csv'\n",
" r = int((j-1)/2)%13\n",
" c = (j-1)%2\n",
" for i in range(0, count):\n",
" path = f'/opt/iui-datarelease1-sose2021/{i}/split_letters_csv/{filename}'\n",
" try:\n",
" ex_letter = pd.read_csv(path, delim)\n",
" except:\n",
" continue\n",
" f = ex_letter['Force']\n",
" idx = (f > 100) | (f == 0)\n",
" f=f[idx]\n",
" t=ex_letter['Time']-ex_letter['Time'][0]\n",
" t=t[idx]\n",
" axs[r][c].title.set_text(f'{letter}')\n",
" axs[r][c].plot(f)\n",
"plt.savefig('./all_entries.png')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6bf9cbc7",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}