chore(i18n,learn): processed translations (#54077)

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
freeCodeCamp's Camper Bot
2024-03-25 22:01:40 +05:30
committed by GitHub
parent c742a22ac2
commit cc87f4455d
5432 changed files with 242595 additions and 14943 deletions

View File

@@ -18,7 +18,7 @@ Stiamo ancora sviluppando la parte didattica interattiva del curriculum di Pytho
# --instructions--
In questo progetto visualizzerai e farai calcoli relativi ai dati di esami medici usando matplotlib, seaborn, e pandas. I valori dellinsieme di dati sono stati raccolti durante una serie di esami medici.
In this project, you will visualize and make calculations from medical examination data using `matplotlib`, `seaborn`, and `pandas`. I valori dellinsieme di dati sono stati raccolti durante una serie di esami medici.
## Descrizione dei dati
@@ -43,23 +43,49 @@ Nome del file: medical_examination.csv
## Compiti
Crea un grafico simile a `examples/Figure_1.png`, dove vengono mostrati i conteggi di buoni e cattivi risultati per le variabili `cholesterol`, `gluc`, `alco`, `active` e `smoke` per pazienti con cardio=1 e cardio=0 in differenti pannelli.
Create a chart similar to `examples/Figure_1.png`, where we show the counts of good and bad outcomes for the `cholesterol`, `gluc`, `alco`, `active`, and `smoke` variables for patients with `cardio=1` and `cardio=0` in different panels.
Utilizza i dati per completare le seguenti attività in `medical_data_visualizer.py`:
- Aggiungi una colonna `overweight` (sovrappeso) ai dati. Per determinare se una persona è in sovrappeso, calcola prima il suo BMI dividendo il peso in chilogrammi per il quadrato della sua altezza in metri. Se questo valore è > 25 allora la persona è in sovrappeso. Usa il valore 0 per NON sovrappeso e 1 per sovrappeso.
- Normalizza i dati ponendo 0 sempre bene e 1 sempre male. Se il valore di `cholesterol` o `gluc` è 1, metti il valore 0. Se il valore è superiore a 1, metti il valore 1.
- Converti i dati in formato esteso e crea un grafico che mostri il valore del conteggio delle caratteristiche categoriche usando il `catplot()` di seaborn. Il set di dati dovrebbe essere suddiviso in base a 'Cardio' in modo che ci sia un grafico per ogni valore di `cardio`. Il grafico dovrebbe apparire come `examples/Figure_1.png`.
- Aggiungi una colonna `overweight` (sovrappeso) ai dati. Per determinare se una persona è in sovrappeso, calcola prima il suo BMI dividendo il peso in chilogrammi per il quadrato della sua altezza in metri. Se questo valore è > 25 allora la persona è in sovrappeso. Use the value `0` for NOT overweight and the value `1` for overweight.
- Normalize the data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is `1`, make the value `0`. If the value is more than `1`, make the value `1`.
- Convert the data into long format and create a chart that shows the value counts of the categorical features using `seaborn`'s `catplot()`. The dataset should be split by `Cardio` so there is one chart for each `cardio` value. Il grafico dovrebbe apparire come `examples/Figure_1.png`.
- Pulisci i dati. Filtra i seguenti segmenti di pazienti che rappresentano dati errati:
- la pressione diastolica è superiore a quella sistolica (tieni i dati corretti con `(df['ap_lo'] <= df['ap_hi'])`)
- l'altezza è inferiore al 2.5° percentile (tieni i dati corretti con `(df['height'] >= df['height'].quantile(0.025))`)
- l'altezza è superiore al 97.5° percentile
- il peso è inferiore al 2.5° percentile
- il peso è superiore al 97.5° percentile
- Crea una matrice di correlazione usando l'insieme di dati. Traccia la matrice di correlazione usando la `heatmap()` di seaborn. Maschera il triangolo superiore. Il grafico dovrebbe apparire come in `examples/Figure_2.png`.
- Crea una matrice di correlazione usando l'insieme di dati. Plot the correlation matrix using `seaborn`'s `heatmap()`. Maschera il triangolo superiore. Il grafico dovrebbe apparire come in `examples/Figure_2.png`.
Ogni volta che una variabile è impostata su `None`, assicurati di impostarla al codice corretto.
Unit tests are written for you under `test_module.py`.
## Instructions
By each number in the `medical_data_visualizer.py` file, add the code from the associated instruction number below.
1. Import the data from `medical_examination.csv` and assign it to the `df` variable
2. Create the `overweight` column in the `df` variable
3. Normalize data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is 1, set the value to `0`. If the value is more than `1`, set the value to `1`.
4. Draw the Categorical Plot in the `draw_cat_plot` function
5. Create a DataFrame for the cat plot using `pd.melt` with values from `cholesterol`, `gluc`, `smoke`, `alco`, `active`, and `overweight` in the `df_cat` variable.
6. Group and reformat the data in `df_cat` to split it by `cardio`. Show the counts of each feature. You will have to rename one of the columns for the `catplot` to work correctly.
7. Convert the data into `long` format and create a chart that shows the value counts of the categorical features using the following method provided by the seaborn library import : `sns.catplot()`
8. Get the figure for the output and store it in the `fig` variable
9. Do not modify the next two lines
10. Draw the Heat Map in the `draw_heat_map` function
11. Clean the data in the `df_heat` variable by filtering out the following patient segments that represent incorrect data:
- height is less than the 2.5th percentile (Keep the correct data with `(df['height'] >= df['height'].quantile(0.025))`)
- height is more than the 97.5th percentile
- weight is less than the 2.5th percentile
- weight is more than the 97.5th percentile
12. Calculate the correlation matrix and store it in the `corr` variable
13. Generate a mask for the upper triangle and store it in the `mask` variable
14. Set up the `matplotlib` figure
15. Plot the correlation matrix using the method provided by the `seaborn` library import: `sns.heatmap()`
16. Do not modify the next two lines
## Sviluppo
Write your code in `medical_data_visualizer.py`. For development, you can use `main.py` to test your code.