diff --git a/data_analytics_js.ipynb b/data_analytics_js.ipynb
index b08b2c6..611b52b 100644
--- a/data_analytics_js.ipynb
+++ b/data_analytics_js.ipynb
@@ -672,37 +672,64 @@
"bytes": null,
"data": [
{
- "brand": "peugeot"
- },
- {
- "brand": "bmw"
- },
- {
- "brand": "buick"
- },
- {
- "brand": "porcshce"
- },
- {
- "brand": "volvo"
- },
- {
- "brand": "maxda"
+ "brand": "subaru"
},
{
"brand": "renault"
},
{
- "brand": "mazda"
+ "brand": "buick"
+ },
+ {
+ "brand": "vw"
+ },
+ {
+ "brand": "chevrolet"
+ },
+ {
+ "brand": "audi"
+ },
+ {
+ "brand": "honda"
+ },
+ {
+ "brand": "plymouth"
+ },
+ {
+ "brand": "toyota"
},
{
"brand": "alfa-romero"
},
{
- "brand": "subaru"
+ "brand": "saab"
},
{
- "brand": "toyouta"
+ "brand": "mazda"
+ },
+ {
+ "brand": "mercury"
+ },
+ {
+ "brand": "peugeot"
+ },
+ {
+ "brand": "nissan"
+ },
+ {
+ "brand": "vokswagen"
+ },
+ {
+ "brand": "volkswagen"
+ },
+ {
+ "brand": "maxda"
+ },
+ {
+ "brand": "bmw"
+ },
+ {
+ "brand": "porcshce"
},
{
"brand": "mitsubishi"
@@ -717,37 +744,10 @@
"brand": "porsche"
},
{
- "brand": "vokswagen"
+ "brand": "toyouta"
},
{
- "brand": "saab"
- },
- {
- "brand": "volkswagen"
- },
- {
- "brand": "audi"
- },
- {
- "brand": "plymouth"
- },
- {
- "brand": "chevrolet"
- },
- {
- "brand": "toyota"
- },
- {
- "brand": "nissan"
- },
- {
- "brand": "vw"
- },
- {
- "brand": "mercury"
- },
- {
- "brand": "honda"
+ "brand": "volvo"
},
{
"brand": "jaguar"
@@ -783,7 +783,7 @@
"title": null
},
"text/html": [
- "
brand |
---|
peugeot |
bmw |
buick |
porcshce |
volvo |
maxda |
renault |
mazda |
alfa-romero |
subaru |
toyouta |
mitsubishi |
dodge |
isuzu |
porsche |
vokswagen |
saab |
volkswagen |
audi |
plymouth |
chevrolet |
toyota |
nissan |
vw |
mercury |
honda |
jaguar |
"
+ "brand |
---|
subaru |
renault |
buick |
vw |
chevrolet |
audi |
honda |
plymouth |
toyota |
alfa-romero |
saab |
mazda |
mercury |
peugeot |
nissan |
vokswagen |
volkswagen |
maxda |
bmw |
porcshce |
mitsubishi |
dodge |
isuzu |
porsche |
toyouta |
volvo |
jaguar |
"
]
},
"execution_count": 4,
@@ -819,6 +819,12 @@
"application/vnd.dataresource+json": {
"bytes": null,
"data": [
+ {
+ "brand": "subaru"
+ },
+ {
+ "brand": "peugeot"
+ },
{
"brand": "plymouth"
},
@@ -826,64 +832,58 @@
"brand": "mitsubishi"
},
{
- "brand": "dodge"
- },
- {
- "brand": "jaguar"
- },
- {
- "brand": "mercury"
- },
- {
- "brand": "honda"
- },
- {
- "brand": "subaru"
- },
- {
- "brand": "chevrolet"
- },
- {
- "brand": "nissan"
- },
- {
- "brand": "mazda"
- },
- {
- "brand": "peugeot"
- },
- {
- "brand": "alfa-romero"
- },
- {
- "brand": "isuzu"
- },
- {
- "brand": "audi"
- },
- {
- "brand": "buick"
+ "brand": "porsche"
},
{
"brand": "bmw"
},
+ {
+ "brand": "chevrolet"
+ },
+ {
+ "brand": "dodge"
+ },
+ {
+ "brand": "toyota"
+ },
+ {
+ "brand": "mazda"
+ },
+ {
+ "brand": "mercury"
+ },
+ {
+ "brand": "isuzu"
+ },
+ {
+ "brand": "renault"
+ },
+ {
+ "brand": "buick"
+ },
+ {
+ "brand": "audi"
+ },
+ {
+ "brand": "nissan"
+ },
+ {
+ "brand": "honda"
+ },
+ {
+ "brand": "jaguar"
+ },
{
"brand": "volkswagen"
},
+ {
+ "brand": "alfa-romero"
+ },
{
"brand": "saab"
},
{
"brand": "volvo"
- },
- {
- "brand": "toyota"
- },
- {
- "brand": "porsche"
- },
- {
- "brand": "renault"
}
],
"description": null,
@@ -916,7 +916,7 @@
"title": null
},
"text/html": [
- "brand |
---|
plymouth |
mitsubishi |
dodge |
jaguar |
mercury |
honda |
subaru |
chevrolet |
nissan |
mazda |
peugeot |
alfa-romero |
isuzu |
audi |
buick |
bmw |
volkswagen |
saab |
volvo |
toyota |
porsche |
renault |
"
+ "brand |
---|
subaru |
peugeot |
plymouth |
mitsubishi |
porsche |
bmw |
chevrolet |
dodge |
toyota |
mazda |
mercury |
isuzu |
renault |
buick |
audi |
nissan |
honda |
jaguar |
volkswagen |
alfa-romero |
saab |
volvo |
"
]
},
"execution_count": 5,
@@ -1810,6 +1810,10 @@
"brand": "renault",
"brand_count": 2
},
+ {
+ "brand": "jaguar",
+ "brand_count": 3
+ },
{
"brand": "chevrolet",
"brand_count": 3
@@ -1818,10 +1822,6 @@
"brand": "alfa-romero",
"brand_count": 3
},
- {
- "brand": "jaguar",
- "brand_count": 3
- },
{
"brand": "isuzu",
"brand_count": 4
@@ -1834,32 +1834,32 @@
"brand": "saab",
"brand_count": 6
},
- {
- "brand": "audi",
- "brand_count": 7
- },
{
"brand": "plymouth",
"brand_count": 7
},
{
- "brand": "bmw",
- "brand_count": 8
+ "brand": "audi",
+ "brand_count": 7
},
{
"brand": "buick",
"brand_count": 8
},
+ {
+ "brand": "bmw",
+ "brand_count": 8
+ },
{
"brand": "dodge",
"brand_count": 9
},
{
- "brand": "volvo",
+ "brand": "peugeot",
"brand_count": 11
},
{
- "brand": "peugeot",
+ "brand": "volvo",
"brand_count": 11
},
{
@@ -1871,11 +1871,11 @@
"brand_count": 12
},
{
- "brand": "honda",
+ "brand": "mitsubishi",
"brand_count": 13
},
{
- "brand": "mitsubishi",
+ "brand": "honda",
"brand_count": 13
},
{
@@ -1931,7 +1931,7 @@
"title": null
},
"text/html": [
- "brand | brand_count |
---|
mercury | 1 |
renault | 2 |
chevrolet | 3 |
alfa-romero | 3 |
jaguar | 3 |
isuzu | 4 |
porsche | 5 |
saab | 6 |
audi | 7 |
plymouth | 7 |
bmw | 8 |
buick | 8 |
dodge | 9 |
volvo | 11 |
peugeot | 11 |
subaru | 12 |
volkswagen | 12 |
honda | 13 |
mitsubishi | 13 |
mazda | 17 |
nissan | 18 |
toyota | 32 |
"
+ "brand | brand_count |
---|
mercury | 1 |
renault | 2 |
jaguar | 3 |
chevrolet | 3 |
alfa-romero | 3 |
isuzu | 4 |
porsche | 5 |
saab | 6 |
plymouth | 7 |
audi | 7 |
buick | 8 |
bmw | 8 |
dodge | 9 |
peugeot | 11 |
volvo | 11 |
subaru | 12 |
volkswagen | 12 |
mitsubishi | 13 |
honda | 13 |
mazda | 17 |
nissan | 18 |
toyota | 32 |
"
]
},
"execution_count": 8,
@@ -1958,12 +1958,12 @@
{
"brand": null,
"describe": "mean",
- "price": 15079.87737191671
+ "price": 15079.877371916704
},
{
"brand": null,
"describe": "std",
- "price": 8738.804703803095
+ "price": 8738.804703803093
},
{
"brand": "alfa-romero",
@@ -2031,7 +2031,7 @@
"title": null
},
"text/html": [
- "describe | brand | price |
---|
mean | null | 15079.87737191671 |
std | null | 8738.804703803095 |
min | alfa-romero | 6007 |
max | volvo | 34600 |
median | null | 10534.274509803921 |
"
+ "describe | brand | price |
---|
mean | null | 15079.877371916704 |
std | null | 8738.804703803093 |
min | alfa-romero | 6007 |
max | volvo | 34600 |
median | null | 10534.274509803921 |
"
]
},
"execution_count": 9,
@@ -2054,28 +2054,28 @@
"data": {
"text/plain": [
"{\n",
- " jaguar: \u001b[33m34600\u001b[39m,\n",
- " subaru: \u001b[33m8541.25\u001b[39m,\n",
- " buick: \u001b[33m33647\u001b[39m,\n",
- " audi: \u001b[33m17859.166714285715\u001b[39m,\n",
- " mitsubishi: \u001b[33m9239.76923076923\u001b[39m,\n",
- " mazda: \u001b[33m10652.882352941177\u001b[39m,\n",
- " dodge: \u001b[33m7875.444444444444\u001b[39m,\n",
- " peugeot: \u001b[33m15489.09090909091\u001b[39m,\n",
- " volkswagen: \u001b[33m10077.5\u001b[39m,\n",
- " renault: \u001b[33m9595\u001b[39m,\n",
- " honda: \u001b[33m8184.692307692308\u001b[39m,\n",
- " \u001b[32m\"alfa-romero\"\u001b[39m: \u001b[33m15498.333333333334\u001b[39m,\n",
- " saab: \u001b[33m15223.333333333334\u001b[39m,\n",
- " bmw: \u001b[33m26118.75\u001b[39m,\n",
- " isuzu: \u001b[33m8916.5\u001b[39m,\n",
" porsche: \u001b[33m31400.5\u001b[39m,\n",
- " nissan: \u001b[33m10415.666666666666\u001b[39m,\n",
+ " volkswagen: \u001b[33m10077.5\u001b[39m,\n",
+ " buick: \u001b[33m33647\u001b[39m,\n",
+ " plymouth: \u001b[33m7963.428571428572\u001b[39m,\n",
+ " peugeot: \u001b[33m15489.09090909091\u001b[39m,\n",
+ " renault: \u001b[33m9595\u001b[39m,\n",
" volvo: \u001b[33m18063.18181818182\u001b[39m,\n",
- " toyota: \u001b[33m9885.8125\u001b[39m,\n",
- " chevrolet: \u001b[33m6007\u001b[39m,\n",
+ " jaguar: \u001b[33m34600\u001b[39m,\n",
+ " mitsubishi: \u001b[33m9239.76923076923\u001b[39m,\n",
+ " saab: \u001b[33m15223.333333333334\u001b[39m,\n",
+ " honda: \u001b[33m8184.692307692308\u001b[39m,\n",
+ " audi: \u001b[33m17859.166714285715\u001b[39m,\n",
" mercury: \u001b[33m16503\u001b[39m,\n",
- " plymouth: \u001b[33m7963.428571428572\u001b[39m\n",
+ " chevrolet: \u001b[33m6007\u001b[39m,\n",
+ " dodge: \u001b[33m7875.444444444444\u001b[39m,\n",
+ " subaru: \u001b[33m8541.25\u001b[39m,\n",
+ " nissan: \u001b[33m10415.666666666666\u001b[39m,\n",
+ " isuzu: \u001b[33m8916.5\u001b[39m,\n",
+ " \u001b[32m\"alfa-romero\"\u001b[39m: \u001b[33m15498.333333333334\u001b[39m,\n",
+ " mazda: \u001b[33m10652.882352941177\u001b[39m,\n",
+ " toyota: \u001b[33m9885.8125\u001b[39m,\n",
+ " bmw: \u001b[33m26118.75\u001b[39m\n",
"}"
]
},
@@ -2108,9 +2108,6 @@
"application/vnd.dataresource+json": {
"bytes": null,
"data": [
- {
- "brand_category": "Budget"
- },
{
"brand_category": "Mid_Range"
},
@@ -2121,7 +2118,10 @@
"brand_category": "Luxury"
},
{
- "brand_category": "Budget"
+ "brand_category": "Luxury"
+ },
+ {
+ "brand_category": "Mid_Range"
}
],
"description": null,
@@ -2154,7 +2154,7 @@
"title": null
},
"text/html": [
- "brand_category |
---|
Budget |
Mid_Range |
Mid_Range |
Luxury |
Budget |
"
+ "brand_category |
---|
Mid_Range |
Mid_Range |
Luxury |
Luxury |
Mid_Range |
"
]
},
"execution_count": 11,
@@ -2228,6 +2228,36 @@
"tags": []
},
"outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "[\n",
+ " { brand: \"mercury\", brand_count: 1 },\n",
+ " { brand: \"renault\", brand_count: 2 },\n",
+ " { brand: \"jaguar\", brand_count: 3 },\n",
+ " { brand: \"chevrolet\", brand_count: 3 },\n",
+ " { brand: \"alfa-romero\", brand_count: 3 },\n",
+ " { brand: \"isuzu\", brand_count: 4 },\n",
+ " { brand: \"porsche\", brand_count: 5 },\n",
+ " { brand: \"saab\", brand_count: 6 },\n",
+ " { brand: \"plymouth\", brand_count: 7 },\n",
+ " { brand: \"audi\", brand_count: 7 },\n",
+ " { brand: \"buick\", brand_count: 8 },\n",
+ " { brand: \"bmw\", brand_count: 8 },\n",
+ " { brand: \"dodge\", brand_count: 9 },\n",
+ " { brand: \"peugeot\", brand_count: 11 },\n",
+ " { brand: \"volvo\", brand_count: 11 },\n",
+ " { brand: \"subaru\", brand_count: 12 },\n",
+ " { brand: \"volkswagen\", brand_count: 12 },\n",
+ " { brand: \"mitsubishi\", brand_count: 13 },\n",
+ " { brand: \"honda\", brand_count: 13 },\n",
+ " { brand: \"mazda\", brand_count: 17 },\n",
+ " { brand: \"nissan\", brand_count: 18 },\n",
+ " { brand: \"toyota\", brand_count: 32 }\n",
+ "]\n"
+ ]
+ },
{
"data": {
"image/svg+xml": [
@@ -2241,7 +2271,7 @@
":where(.plot-d6a7b5 text),\n",
":where(.plot-d6a7b5 tspan) {\n",
" white-space: pre;\n",
- "}toyotanissanmazdahondamitsubishisubaruvolkswagenpeugeotvolvododgebmwbuickaudiplymouthsaabporscheisuzualfa-romerochevroletjaguarrenaultmercurybrand051015202530brand_count →"
+ "}toyotanissanmazdahondamitsubishisubaruvolkswagenpeugeotvolvododgebmwbuickaudiplymouthsaabporscheisuzualfa-romerochevroletjaguarrenaultmercurybrand051015202530brand_count →"
]
},
"execution_count": 13,
@@ -2250,10 +2280,10 @@
}
],
"source": [
- "import {Plot, document} from 'https://l12.xyz/x/shortcuts/raw/branch/main/plots.ts?95'\n",
+ "import {Plot, document} from 'https://l12.xyz/x/shortcuts/raw/plots.ts'\n",
"\n",
"const brandCountRecords = brandCount.toRecords()\n",
- "\n",
+ "console.log(brandCountRecords)\n",
"const brandCountPlot = Plot.plot({\n",
" marginLeft: 80,\n",
" style: {\n",
@@ -2329,7 +2359,7 @@
"text/html": [
"\n",
" \n",
" "
]
@@ -2340,7 +2370,7 @@
}
],
"source": [
- "import { sideBySidePlot } from 'https://l12.xyz/x/shortcuts/raw/plots.ts?95'\n",
+ "import { sideBySidePlot } from 'https://l12.xyz/x/shortcuts/raw/plots.ts'\n",
"\n",
"let records = df.toRecords();\n",
"\n",
@@ -2535,7 +2565,7 @@
"text/html": [
"\n",
" \n",
" "
]
@@ -2684,16 +2714,16 @@
"data": {
"text/html": [
"\n",
- " \n",
- " \n",
- "
\n",
- "
\n",
- "
\n",
- " \n",
- "
\n",
- "
\n",
- " \n",
- " "
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " \n",
+ " "
]
},
"execution_count": 19,
@@ -2702,7 +2732,7 @@
}
],
"source": [
- "import { threeChart } from './plots.ts?15'\n",
+ "import { threeChart } from 'https://l12.xyz/x/shortcuts/raw/plots.ts'\n",
"\n",
"await display(threeChart(records, \"price\"))"
]
@@ -2753,7 +2783,7 @@
}
],
"source": [
- "import {ShapiroWilkW} from \"./normality.ts?18\"\n",
+ "import { ShapiroWilkW } from \"https://l12.xyz/x/shortcuts/raw/shapiro.ts\"\n",
"\n",
"ShapiroWilkW(df.price.sort())"
]
@@ -2774,16 +2804,16 @@
"data": {
"text/html": [
"\n",
- " \n",
- " \n",
- "
\n",
- "
\n",
- "
\n",
- " \n",
- "
\n",
- "
\n",
- " \n",
- " "
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ " \n",
+ " "
]
},
"execution_count": 21,
@@ -4378,7 +4408,7 @@
}
],
"source": [
- "import { oneHotEncoding } from './encoding.ts?6'\n",
+ "import { oneHotEncoding } from 'https://l12.xyz/x/shortcuts/raw/encoding.ts'\n",
"\n",
"let encodedCarData = oneHotEncoding(carDataGeneralized)\n",
"encodedCarData.head(5)"