Menu

Tree [c7e2d7] master /
 History

HTTPS access


File Date Author Commit
 connexion 2020-10-11 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [18fb6c] Reorg packages and modules
 dbus 2025-08-07 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [d01272] Add more examples
 flask 2020-10-11 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [18fb6c] Reorg packages and modules
 json 2023-05-23 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [9cbf20] Add json.loads() example
 jupyter-csv 2025-08-29 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [9cea05] Add Jupyter CSV stats example
 pandas 2025-09-24 M. H. Neifer M. H. Neifer [2edb88] Changes to support parquet format
 regression-python 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 regression-r 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 snippets-python 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 snippets-r 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 .editorconfig 2023-05-21 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [d9f7de] Add EditorConfig file
 .gitignore 2025-09-24 M. H. Neifer M. H. Neifer [42c9f1] Ignore pyenv version file
 .markdownlint.json 2023-03-03 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [73b903] Disable MD007
 LICENSE 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 README.md 2025-10-03 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [c7e2d7] Add links to Learn X in Y minutes
 docker-run-python.sh 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples
 docker-run-r.sh 2025-09-20 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [043827] Add R examples

Read Me

Data Science Examples

Collection of Python and R code examples for my blog F7L8C9.

Licensed under the MIT License. See file LICENSE.

Python

Virtual Environments and Packages

Some examples need external libraries. Install these with pip.

  • pip install <package> to install package
  • pip install --upgrade <package> to upgrade installed package
  • pip list - to list packages in the current environment
  • pip list --outdated - to list outdated packages
  • pip show <package> - to get details about a package that is installed in the current environment
  • pip uninstall <package> to uninstall package

Create repeatable installations with the following commands.

pip freeze > requirements.txt
pip install -r requirements.txt

File requirements.txt should be checked into source control. See also Installing Python Modules.

Create virtual environments with the venv module.

python -m venv .venv

On Linux bash, activate environment with source .venv/bin/activate.

Or, alternatively with virtualenv.

virtualenv venv

Directory .venv/ should be ignored by source control.

See Pipenv for a more sophisticated virtualenv management tool.

See pyenv to set up and use several Python versions in parallel.

R

R Studio

Run R Studio in Docker with docker run -p 8787:8787 -e PASSWORD=mypwd rocker/rstudio. Choose a sensible password. Open localhost:8787 with your browser and log in with user/password: rstudio/mypwd.

Tasks

  • Create Python behave example
  • Write blog post about linear regression and plotting the results. See blog article
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.