{"id":20950097,"url":"https://github.com/fabianacampanari/iris-dataanalysis-seaborn-","last_synced_at":"2025-09-12T02:14:18.080Z","repository":{"id":260853945,"uuid":"882537385","full_name":"FabianaCampanari/Iris-DataAnalysis-Seaborn-","owner":"FabianaCampanari","description":"  🌸 The provided code snippet is a Python script that uses matplotlib to plot the numerical and exact derivatives of a function f4 over a range of values. The script generates a sequence of values x from -5 to 5, calculates the derivatives using two different methods, and then plots the results for comparison.","archived":false,"fork":false,"pushed_at":"2025-07-14T21:00:56.000Z","size":2016,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T21:16:35.748Z","etag":null,"topics":["iris-dataset","jupyter-notebook","machine-learning","matplotlib","numpy","pandas","pyplot","python-lambda","python3","scikit-learn","seaborn","seaborn-plots"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FabianaCampanari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"FabianaCampanari","Custom":"https://github.com/sponsors/FabianaCampanari/card"}},"created_at":"2024-11-03T03:27:02.000Z","updated_at":"2025-08-10T09:25:14.000Z","dependencies_parsed_at":"2024-11-03T04:20:16.463Z","dependency_job_id":"29ffc9e3-678f-4d76-afd6-bb1f7c32e0df","html_url":"https://github.com/FabianaCampanari/Iris-DataAnalysis-Seaborn-","commit_stats":null,"previous_names":["fabianacampanari/iris-dataanalysis-seaborn-"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FabianaCampanari/Iris-DataAnalysis-Seaborn-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianaCampanari%2FIris-DataAnalysis-Seaborn-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianaCampanari%2FIris-DataAnalysis-Seaborn-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianaCampanari%2FIris-DataAnalysis-Seaborn-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianaCampanari%2FIris-DataAnalysis-Seaborn-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabianaCampanari","download_url":"https://codeload.github.com/FabianaCampanari/Iris-DataAnalysis-Seaborn-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianaCampanari%2FIris-DataAnalysis-Seaborn-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274743052,"owners_count":25341132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iris-dataset","jupyter-notebook","machine-learning","matplotlib","numpy","pandas","pyplot","python-lambda","python3","scikit-learn","seaborn","seaborn-plots"],"created_at":"2024-11-19T00:45:39.005Z","updated_at":"2025-09-12T02:14:18.057Z","avatar_url":"https://github.com/FabianaCampanari.png","language":"Jupyter Notebook","funding_links":["https://github.com/sponsors/FabianaCampanari","https://github.com/sponsors/FabianaCampanari/card"],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\u003cbr\u003e\n\n\n\u003c!--Header --\u003e\n\n#  \u003cp align=\"center\"\u003e 🌸 Iris Data Analysis with Seaborn \n\nThis repository contains a Jupyter notebook for analyzing the famous Iris dataset using the Seaborn library. The goal is to demonstrate how to load, visualize, and analyze data with Seaborn and pandas.\n\n## Requirements\n\nMake sure you have the following libraries installed:\n\n- pandas\n- seaborn\n- matplotlib\n- numpy\n- scikitlearn\n\nYou can install these libraries using pip:\n\n```sh\npip install pandas  \npip install seaborn  \npip install matplotlib  \npip install numpy  \npip install scikit-learn\n```\n\n## Introduction\n\nThis Jupyter notebook contains various code blocks that perform different tasks for data analysis and visualization. Below, we explain each of the code blocks present in the Seaborniris.ipynb file.\n\n### Importing Libraries\n\nFirst, we import the necessary libraries for data analysis and visualization.\n\n```python\n# For working with DataFrames and data manipulation  \nimport pandas as pd\n\n# For statistical visualizations    \nimport seaborn as sns\n\n # For creating plots    \nimport matplotlib.pyplot as plt\n\n# For numerical operations \nimport numpy as np\n\n# To access datasets and tools from scikit-learn      \nfrom sklearn import datasets  \\\n```\n\n\u003cbr\u003e\n\n## Generating Data\n\nWe create a sequence of x values ranging from -5 to 5, with 100 equally spaced points.\n\n## Loading the Dataset\n\nWe load the Iris dataset using the load_iris function from Scikit-learn and convert it into a pandas DataFrame.\n\n```python\n\n# Load the Iris dataset\niris_data = load_iris()\n\n# Convert to DataFrame\niris = pd.DataFrame(data=iris_data.data, columns=iris_data.feature_names)\niris['target'] = iris_data.target\n```\n\n\u003cbr\u003e\n\n## Visualizing the Data\n\nWe visualize the data using the Seaborn library. First, we configure the style of the plots.\n\n```python\n# Configure the style of the plots\nsns.set(style=\"whitegrid\")\n```\n\nExemple:\n\n```python\nsns.pairplot(df, hue='target')\nplt.show()\n```\n\n\n \u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/479b6f82-0880-4f32-817f-f963131c5e65\"/\u003e\n\n\n\n\u003cbr\u003e\n\n## Pairplot\n\nWe visualize the distribution of the features with a pairplot.\n\nWe visualize the data using the Seaborn library. First, we configure the style of the plots.\n\n```python\nsns.pairplot(iris, hue='target')\nplt.show()\n```\n\n\n\u003cbr\u003e\n\n## Boxplot\n\nWe create a boxplot of the sepal length by species.\n\n\n```python\nplt.figure(figsize=(10, 6))\nsns.boxplot(x='target', y='sepal length (cm)', data=iris, color='b')\nplt.title('Boxplot of Sepal Length by Species')\nplt.xlabel('Species')\nplt.ylabel('Sepal Length (cm)')\nplt.show()\n```\n\n\u003cbr\u003e\n\n## Exploratory Data Analysis\n\nWe perform exploratory data analysis to better understand the features and the distribution of the classes.\n\nDescriptive Statistics\n\n```python\n# Descriptive statistics\nprint(iris.describe())\n ```\n\n## Class Countv\n\n```python\n# Count of each class\nprint(iris['target'].value_counts())\n````\n\n\u003cbr\u003e\n\n\n## Generating Data\n\nWe create a sequence of x values ranging from -5 to 5, with 100 equally spaced points.\n\n```python\nx = np.linspace(-5, 5, 100)\n```\n\n\u003cbr\u003e\n\n## Calculating Derivatives\n\nWe calculate the derivatives of a function f4 at each point in x using two different approaches: a function derivada and a function f4_prime_exato. The results are stored in the lists y2 and _y3, respectively.\n\n\n```python\ny2 = []\ny3 = []\nfor xx in x:\n  y2.append(derivada(f4, xx))\n  y3.append(f4_prime_exato(xx))\n```\n\n\u003cbr\u003e\n\n## Plotting the Results\n\nWe use the matplotlib library to plot the results of the calculated derivatives. The solid line (-) represents the values calculated by the derivada function, while the dashed line (--) represents the values calculated by the f4_prime_exato function.\n\n\n```python\nplt.plot(x, y2, '-', x, y3, '--')\nplt.show()\n```\n\n\u003cbr\u003e\n\n##Running the Notebook\n\nTo run the notebook, you can use Jupyter Notebook or JupyterLab. Execute the following command to start Jupyter Notebook:\n\n```python\njupyter notebook\n```\n\nOpen the Seaborniris   .ipynb file and run the cells to see the results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianacampanari%2Firis-dataanalysis-seaborn-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabianacampanari%2Firis-dataanalysis-seaborn-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianacampanari%2Firis-dataanalysis-seaborn-/lists"}