Spaces:
Sleeping
Sleeping
yolo
Browse files- app/app.py +6 -1
- app/dashboard.ipynb +9 -4
- app/data/sogrape_wine.csv +23 -0
app/app.py
CHANGED
|
@@ -22,6 +22,7 @@ app.layout = html.Div([
|
|
| 22 |
|
| 23 |
server = app.server
|
| 24 |
|
|
|
|
| 25 |
|
| 26 |
wine_similarity_df = pd.read_csv('data/wine_similarity.csv')
|
| 27 |
wine_list = wine_similarity_df['NAME'].unique()
|
|
@@ -80,7 +81,11 @@ dashboard_layout = html.Div([
|
|
| 80 |
),
|
| 81 |
html.Div(
|
| 82 |
[
|
| 83 |
-
html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
], className='six columns',
|
| 85 |
)
|
| 86 |
], className='row'),
|
|
|
|
| 22 |
|
| 23 |
server = app.server
|
| 24 |
|
| 25 |
+
raw_wine_similarity_df = pd.read_csv('data/sogrape_wine.csv')
|
| 26 |
|
| 27 |
wine_similarity_df = pd.read_csv('data/wine_similarity.csv')
|
| 28 |
wine_list = wine_similarity_df['NAME'].unique()
|
|
|
|
| 81 |
),
|
| 82 |
html.Div(
|
| 83 |
[
|
| 84 |
+
html.P(children='Data Example', style={'textAlign':'left'}),
|
| 85 |
+
dash_table.DataTable(
|
| 86 |
+
data=raw_wine_similarity_df.to_dict('records'),
|
| 87 |
+
columns=[{'id': c, 'name': c} for c in raw_wine_similarity_df.columns]
|
| 88 |
+
)
|
| 89 |
], className='six columns',
|
| 90 |
)
|
| 91 |
], className='row'),
|
app/dashboard.ipynb
CHANGED
|
@@ -2,14 +2,14 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
| 9 |
"name": "stderr",
|
| 10 |
"output_type": "stream",
|
| 11 |
"text": [
|
| 12 |
-
"/var/folders/b4/lwfgccm95kqd2skcwvrt2fr00000gn/T/ipykernel_36332/
|
| 13 |
"\n",
|
| 14 |
"Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n",
|
| 15 |
"\n"
|
|
@@ -30,7 +30,7 @@
|
|
| 30 |
" "
|
| 31 |
],
|
| 32 |
"text/plain": [
|
| 33 |
-
"<IPython.lib.display.IFrame at
|
| 34 |
]
|
| 35 |
},
|
| 36 |
"metadata": {},
|
|
@@ -75,6 +75,7 @@
|
|
| 75 |
"\n",
|
| 76 |
"server = app.server\n",
|
| 77 |
"\n",
|
|
|
|
| 78 |
"\n",
|
| 79 |
"wine_similarity_df = pd.read_csv('data/wine_similarity.csv')\n",
|
| 80 |
"wine_list = wine_similarity_df['NAME'].unique()\n",
|
|
@@ -133,7 +134,11 @@
|
|
| 133 |
" ),\n",
|
| 134 |
" html.Div(\n",
|
| 135 |
" [\n",
|
| 136 |
-
" html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
" ], className='six columns',\n",
|
| 138 |
" )\n",
|
| 139 |
" ], className='row'),\n",
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": 14,
|
| 6 |
"metadata": {},
|
| 7 |
"outputs": [
|
| 8 |
{
|
| 9 |
"name": "stderr",
|
| 10 |
"output_type": "stream",
|
| 11 |
"text": [
|
| 12 |
+
"/var/folders/b4/lwfgccm95kqd2skcwvrt2fr00000gn/T/ipykernel_36332/393461119.py:98: FutureWarning:\n",
|
| 13 |
"\n",
|
| 14 |
"Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n",
|
| 15 |
"\n"
|
|
|
|
| 30 |
" "
|
| 31 |
],
|
| 32 |
"text/plain": [
|
| 33 |
+
"<IPython.lib.display.IFrame at 0x2ad7f45b0>"
|
| 34 |
]
|
| 35 |
},
|
| 36 |
"metadata": {},
|
|
|
|
| 75 |
"\n",
|
| 76 |
"server = app.server\n",
|
| 77 |
"\n",
|
| 78 |
+
"raw_wine_similarity_df = pd.read_csv('data/sogrape_wine.csv')\n",
|
| 79 |
"\n",
|
| 80 |
"wine_similarity_df = pd.read_csv('data/wine_similarity.csv')\n",
|
| 81 |
"wine_list = wine_similarity_df['NAME'].unique()\n",
|
|
|
|
| 134 |
" ),\n",
|
| 135 |
" html.Div(\n",
|
| 136 |
" [\n",
|
| 137 |
+
" html.P(children='Data Example', style={'textAlign':'left'}),\n",
|
| 138 |
+
" dash_table.DataTable(\n",
|
| 139 |
+
" data=raw_wine_similarity_df.to_dict('records'),\n",
|
| 140 |
+
" columns=[{'id': c, 'name': c} for c in raw_wine_similarity_df.columns]\n",
|
| 141 |
+
" )\n",
|
| 142 |
" ], className='six columns',\n",
|
| 143 |
" )\n",
|
| 144 |
" ], className='row'),\n",
|
app/data/sogrape_wine.csv
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
NAME,PROD,MAKER,TYPE,CASTA,Food Paring
|
| 2 |
+
Azevedo,Quinta de Azevedo,Diogo Sepúlveda,Verde,Loureiro;Alvarinho,Sea Food; Vegetarian; Snacks;
|
| 3 |
+
Gazela,Quinta de Azevedo,Diogo Sepúlveda,Verde,Loureiro;Pedernã;Trajadura,Sea Food; Vegetarian; Snacks;
|
| 4 |
+
Aura,Rueda,Olga Torno,Branco,Verdejo,Sea food; Fish;
|
| 5 |
+
Dedicado,Vinhas de Mendoza,Rogelio Rabino,Tinto,Merlot; Cabernet Sauvignon; Malbec,Beef; Lamb; Pork; Birds; Mushrooms; Blue Cheese;
|
| 6 |
+
Legado,Douro,Luís Sottomayor,Tinto,Grenache,Beef; Lamb; Birds; Pasta; Game Meat;
|
| 7 |
+
Offley,Douro,Luís Sottomayor,Porto Wine,,Desserts; Maturated Cheese; Blue cheese;
|
| 8 |
+
Quinta dos Carvalhais,Dão,Beatriz Cabral Almeida,Tinto,Touriga Nacional,Beef; Lamb; Pasta; Game Meat;
|
| 9 |
+
Série Ímpar,Alentejo,António Braga; Diogo Sepúlveda; Luís Cabral Almeida; Luís Sottomayor,Branco,Sercialinho,Sea Food; Fish; Snacks; Peixes Magros;
|
| 10 |
+
Antónia Adelaide Ferreira,Douro,Luís Sottomayor,Tinto,"Touriga Nacional, Touriga Franca, Tinta Roriz",Beef; Lamb; Pasta; Game Meat;
|
| 11 |
+
Casa Ferreirinha,Douro,Luís Sottomayor,Tinto,"Tempranillo, Touriga Nacional",Beef; Lamb; Pasta; Game Meat;
|
| 12 |
+
Finca Flichman,Barrancas; Tupungato;,Rogelio Rabino,Tinto,Malbec,Beef; Lamb; Pork;
|
| 13 |
+
Herdade do peso,Alentejo,Luís Cabral Almeida,Tinto,Alicante Bouschet,Beef; Lamb; Calf; Birds;
|
| 14 |
+
Marqués de Burgos,Douro,María Barúa,Tinto,Tempranillo,Beef; Lamb; Game Meat;
|
| 15 |
+
Porto Ferreira,Douro,Luís Sottomayor,Porto Wine,,Desserts; Maturated Cheese; Blue cheese;
|
| 16 |
+
Sandeman,Douro,Luís Sottomayor,Porto Wine,,Desserts; Maturated Cheese; Blue cheese;
|
| 17 |
+
Silk & Spice,Douro,Diogo Sepúlveda,Tinto,Touriga Nacional; Baga; Alicante Bouschet,Beef; Lamb; Pasta; Game Meat;
|
| 18 |
+
Chateau Los Boldos,Cachapoal Andes,Diego Vergara,Tinto,Cabernet Sauvignon,Beef; Lamb; Calf; Birds; Game Meat;
|
| 19 |
+
Framingham,Marlborough,Andrew Brown,Branco,Sauvignon Blanc,Sea Food; Vegetarian; Goat Cheese;
|
| 20 |
+
LAN,La Rioja,María Barúa,Tinto,Tempranillo,Beef; Lamb; Calf; Birds;
|
| 21 |
+
Mateus,Douro,Diogo Sepúlveda,Rosé,Baga; Rufete; Touriga Franca; Tinta Barroca,Marisco; Snacks; Carne Curada
|
| 22 |
+
Quinta da Romeira,Bucelas,Luís Cabral Almeida,Branco, Arinto de Bucelas,Pork; Sea Food; Pasta; Peixes Magros;
|
| 23 |
+
Santiago Ruiz,Rías Baixas,Luisa Freire,Branco,Albariño,Sea Food; Vegetarian; Pasta; Snacks; Peixes Magros;
|