Skip to content

Latest commit

 

History

History
 
 

penguin-classification

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Penguin classification

This is an example Observable Framework project that uses logistic regression (performed in a Python data loader) to classify penguins by species, based on body mass measurements. Charts highlights and explore which penguins are misclassified. Learn more about the penguins dataset.

View the live project.

Data loader

The Python data loader predictions.csv.py reads in the penguins.csv file, then performs logistic regression using scikit-learn's LogisticRegression function.

Charts

All charts are drawn with Observable Plot.

Reuse this example

Copy the contents of the penguins-classification directory into a new Observable Framework project. Then, run the following set up steps (as needed) get started:

  • If needed, install python3
  • Create and activate a virtual environment
    • $ python3 -m venv .venv
    • $ source .venv/bin/activate
  • Pip install modules from requirements.txt
    • $ pip install -r requirements.txt
  • Run and preview the page
    • $ yarn
    • $ yarn dev
  • Make changes to the page (index.md) or data loader and save to see instant updates in the live preview

Learn more about deploying with Github actions for Python 3.6 & requirements.txt.