primopy

Packages

Programs that use the packages people work with: solvers, web apps, physics, data and machine learning. primopy's Python comes with several hundred packages built for the browser, numpy, pandas, matplotlib, scipy and scikit-learn among them, and installs any other package written in pure Python from PyPI when you ask for it. Each card opens its project in primopy with the packages it needs. Press Run, then change something and run it again.

Data and plots

Read a table, sum it up and draw it, still or live.

Left, the hours of daylight over the year in Oslo, Zurich, Cairo and Singapore; right, a map of daylight from pole to pole with white contour lines at 3, 6, 9, 15, 18 and 21 hoursmatplotlib

How long is the day?

One formula for the hours of daylight, drawn twice with matplotlib: the year in four cities, with a shaded area and an arrow to the longest day, and the whole Earth as a map of colours with contour lines.

▶Open in primopy
A chart of 2025 month by month: blue bars of rain and a red line of the average temperaturepandas

A year of weather

pandas reads a CSV of daily weather, groups the days by month, and matplotlib draws temperature and rain.

▶Open in primopy
polars

Fifty years of hurricanes

polars filters, groups and sums up the Atlantic storms since 1975, one method after the other: hurricanes per decade, and the five that blew hardest.

▶Open in primopy
Three panels, Biscoe, Dream and Torgersen, of body mass against flipper length, the points and fitted lines coloured by speciesplotnine

Longer flippers, heavier penguins

The Palmer penguins in layers, with ggplot2's grammar in Python: points, a fitted line for each species and a panel for each island.

▶Open in primopy
A bubble chart of life expectancy against income per person, one bubble per country, coloured by continentplotly

Income and life expectancy

The Gapminder data as a live plotly chart: press play and watch 55 years go by, hover over a country.

▶Open in primopy
A 3D surface of the Maunga Whau volcano, coloured from blue-green in the valleys to brown at the topplotly

A volcano in 3D

The heights of Maunga Whau, a volcano in Auckland, as a live plotly surface: drag to turn it, hover to read a height.

▶Open in primopy
Measured temperatures of a cup of tea as dots, the fitted cooling curve through them and a dotted line where it reaches 55 °Cscipy

When is the tea cool enough?

scipy fits Newton's law of cooling to measurements and integrates it to predict the moment.

▶Open in primopy