Skip to content

Commit 3bbbca5

Browse files
authored
Merge pull request #46 from devonfw-forge/data-sharks-machine-learning
Data sharks machine learning
2 parents 96ac065 + 84dba25 commit 3bbbca5

11 files changed

+18185
-10225
lines changed

Notebook-Cluster.ipynb

Lines changed: 0 additions & 10135 deletions
This file was deleted.

Notebook_Cluster.ipynb

Lines changed: 11640 additions & 0 deletions
Large diffs are not rendered by default.

Notebook_Dashboard.ipynb

Lines changed: 3496 additions & 0 deletions
Large diffs are not rendered by default.

Notebook_Dashboard_Silviu.ipynb

Lines changed: 2617 additions & 0 deletions
Large diffs are not rendered by default.

Notebook_Graphics.ipynb

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19067,9 +19067,9 @@
1906719067
}
1906819068
],
1906919069
"source": [
19070-
"def tableOut(Threshold, Country):\n",
19070+
"def tableOut(threshold, country):\n",
1907119071
"\n",
19072-
" df = search(Threshold, col_country, Country)\n",
19072+
" df = search(threshold, col_country, country)\n",
1907319073
" if df.empty:\n",
1907419074
" return print(\"No indicators have been found.\")\n",
1907519075
" \n",
@@ -19088,10 +19088,10 @@
1908819088
"\n",
1908919089
"\n",
1909019090
"@interact(\n",
19091-
" Country = sorted(corr_df.index.tolist()),\n",
19092-
" Threshold = (0, 1, 0.05))\n",
19093-
"def g(Country = 'Afghanistan', Threshold = 0.7):\n",
19094-
" return tableOut(Threshold,Country)"
19091+
" country = sorted(corr_df.index.tolist()),\n",
19092+
" threshold = (0, 1, 0.05))\n",
19093+
"def g(country = 'Afghanistan', threshold = 0.7):\n",
19094+
" return tableOut(threshold ,country)"
1909519095
]
1909619096
},
1909719097
{
@@ -19134,9 +19134,9 @@
1913419134
}
1913519135
],
1913619136
"source": [
19137-
"def tableRegAgg(Threshold, Region):\n",
19137+
"def tableRegAgg(threshold, region):\n",
1913819138
"\n",
19139-
" df = search(Threshold, col_region, Region)\n",
19139+
" df = search(threshold, col_region, region)\n",
1914019140
" if df.empty:\n",
1914119141
" return print(\"No indicators have been found.\")\n",
1914219142
"\n",
@@ -19154,10 +19154,10 @@
1915419154
"\n",
1915519155
"\n",
1915619156
"@interact(\n",
19157-
" Region = region_list,\n",
19158-
" Threshold = (0, 1, 0.05))\n",
19159-
"def g(Region = region_list[0], Threshold = 0.7):\n",
19160-
" return tableRegAgg(Threshold, Region)\n"
19157+
" region = region_list,\n",
19158+
" threshold = (0, 1, 0.05))\n",
19159+
"def g(region = region_list[0], threshold = 0.7):\n",
19160+
" return tableRegAgg(threshold, region)\n"
1916119161
]
1916219162
},
1916319163
{
@@ -19191,13 +19191,13 @@
1919119191
"median_corr_df_pearson_region = pd.merge(corr_df_pearson, region_df, how = 'inner', left_index = True, right_index = True).groupby(level = col_region).median()\n",
1919219192
"median_corr_df_spearman_region = pd.merge(corr_df_spearman, region_df, how = 'inner', left_index = True, right_index = True).groupby(level = col_region).median()\n",
1919319193
"\n",
19194-
"def tableRegMed(Region, Threshold): \n",
19195-
" median_corr_series_pearson_region = median_corr_df_pearson_region.loc[Region]\n",
19194+
"def tableRegMed(region, threshold): \n",
19195+
" median_corr_series_pearson_region = median_corr_df_pearson_region.loc[region]\n",
1919619196
" median_corr_series_pearson_region.name = 'GDP Pearson Corr'\n",
19197-
" median_corr_series_spearman_region = median_corr_df_spearman_region.loc[Region]\n",
19197+
" median_corr_series_spearman_region = median_corr_df_spearman_region.loc[region]\n",
1919819198
" median_corr_series_spearman_region.name = 'GDP Spearman Corr'\n",
1919919199
" df = pd.concat([median_corr_series_pearson_region, median_corr_series_spearman_region], axis = 1)\n",
19200-
" df = df.loc[(abs(df['GDP Pearson Corr']) >= Threshold) & (abs(df['GDP Spearman Corr']) >= Threshold)]\n",
19200+
" df = df.loc[(abs(df['GDP Pearson Corr']) >= threshold) & (abs(df['GDP Spearman Corr']) >= threshold)]\n",
1920119201
"\n",
1920219202
" if df.empty:\n",
1920319203
" return print(\"No indicators have been found.\")\n",
@@ -19216,10 +19216,10 @@
1921619216
"\n",
1921719217
"\n",
1921819218
"@interact(\n",
19219-
" Region = region_list,\n",
19220-
" Threshold = (0, 1, 0.05))\n",
19221-
"def g(Region = region_list[0], Threshold = 0.7):\n",
19222-
" return tableRegMed(Region, Threshold)\n"
19219+
" region = region_list,\n",
19220+
" threshold = (0, 1, 0.05))\n",
19221+
"def g(region = region_list[0], threshold = 0.7):\n",
19222+
" return tableRegMed(region, threshold)\n"
1922319223
]
1922419224
},
1922519225
{
@@ -19260,9 +19260,9 @@
1926019260
}
1926119261
],
1926219262
"source": [
19263-
"def tableWorldAgg(Threshold):\n",
19263+
"def tableWorldAgg(threshold):\n",
1926419264
"\n",
19265-
" df = search(Threshold, 'Global')\n",
19265+
" df = search(threshold, 'Global')\n",
1926619266
" if df.empty:\n",
1926719267
" return print(\"No indicators have been found.\")\n",
1926819268
"\n",
@@ -19280,9 +19280,9 @@
1928019280
"\n",
1928119281
"\n",
1928219282
"@interact(\n",
19283-
" Threshold = (0, 1, 0.05))\n",
19284-
"def g(Threshold = 0.7):\n",
19285-
" return tableWorldAgg(Threshold)\n"
19283+
" threshold = (0, 1, 0.05))\n",
19284+
"def g(threshold = 0.7):\n",
19285+
" return tableWorldAgg(threshold)\n"
1928619286
]
1928719287
},
1928819288
{
@@ -19316,9 +19316,9 @@
1931619316
"median_corr_df_pearson = pd.merge(corr_df_pearson, region_df, how = 'inner', left_index = True, right_index = True).median().rename('GDP Pearson Corr')\n",
1931719317
"median_corr_df_spearman = pd.merge(corr_df_spearman, region_df, how = 'inner', left_index = True, right_index = True).median().rename('GDP Spearman Corr')\n",
1931819318
"\n",
19319-
"def tableWorldMed(Threshold):\n",
19319+
"def tableWorldMed(threshold):\n",
1932019320
" df = pd.concat([median_corr_df_pearson, median_corr_df_spearman], axis = 1)\n",
19321-
" df = df.loc[(abs(df['GDP Pearson Corr']) >= Threshold) & (abs(df['GDP Spearman Corr']) >= Threshold)]\n",
19321+
" df = df.loc[(abs(df['GDP Pearson Corr']) >= threshold) & (abs(df['GDP Spearman Corr']) >= threshold)]\n",
1932219322
"\n",
1932319323
" if df.empty:\n",
1932419324
" return print(\"No indicators have been found.\")\n",
@@ -19336,9 +19336,9 @@
1933619336
"\n",
1933719337
"\n",
1933819338
"@interact(\n",
19339-
" Threshold = (0, 1, 0.05))\n",
19340-
"def g(Threshold = 0.7):\n",
19341-
" return tableWorldMed(Threshold)"
19339+
" threshold = (0, 1, 0.05))\n",
19340+
"def g(threshold = 0.7):\n",
19341+
" return tableWorldMed(threshold)"
1934219342
]
1934319343
}
1934419344
],

0 commit comments

Comments
 (0)