Most articles are about Data Visualization and Data Science in Python (and a few in, Julia). Occasionally I stray into other areas of science and technology. Many articles have downloadable code and some have demonstrator web sites.
You can download program code from my Github page.
If you would like to know when I publish new articles, please consider signing up for Medium email alerts — see the notice at the end of this article.
I am no GitHub expert. I don’t need to be. I don’t need to share code across development teams or to have multiple versions of code that will eventually be merged into a single product or do any of the other wonderful things you can do with GitHub.
What I want is to have a copy of the little projects I create that I can share with others and to be able to easily access my code from different computers and/or locations. And a combination of VSCode and GitHub does this simply and easily.
Using GitHub also means that I…
Many years ago I used to write things on paper. With a pen. In a book. How things have changed.
But, you know what? My written daybook was my memory, the reminder of thoughts that I had forgotten about, a source of inspiration. It was the place that I regularly recorded what I’d been doing, what I’d been thinking and who said what, where and when.
My daybook was a bound, A4-sized, hardback notebook. It wasn’t a diary, it wasn’t a journal either but each day meant starting a new page with the date at the top and then maybe…
The first time that I used VSCode to open a Jupyter notebook was a complete accident.
I use VSCode for writing standalone Python scripts and Flask apps but I’ve always used the standard browser interface for running Jupyter notebooks. Frankly, it never occurred to me to do anything else.
But one day I was browsing through my file manager, looking for a particular notebook that I’d somehow managed to lose in the maze of project folders that comprises my D: drive. I eventually found it and for some reason — default behaviour, I suppose — I double clicked on it…
The World Bank gathers an enormous amount of information about the world and the countries we live in. And that data is free to access from an API or, perhaps a little easier from the WBGAPI Python library.
It’s quite possible to browse for information but there is so much of it that it is probably a good idea to have a reasonable idea of what you are looking for before you start programming.
We are going to take a quick look at what information is available, how we can access it and what we can do with the WBGAPI…
A Scatter plot is a great way of exploring relationships or patterns in data. But adding a regression line can make those patterns stand out and it is one thing that is not built into the Pandas plot API.
You can use a stats library like Statsmodels, or even Numpy, to create a regression model from your data and include this in your plot. But, if all you need is a visual guide to relationships in your data, Seaborn can do this for you, easily.
Seaborn is a statistical plotting library that can read Pandas dataframes (as well as other…
Visualization is key to data communication. Whether you are trying to get something across to your boss, your client or your peers, a well-constructed chart or graph can often make your point more clearly than a table of numbers.
There are an awful lot of charting libraries for Python but I am going to take a quick look at just 5 of my favorites.
Matplotlib is the grandaddy of Python visualization libraries and is the basis for all of the ones I consider. …
AJAX is a set of techniques to update the data on a web page without refreshing the whole page by requesting data from a server in the background.
await to see how implement it by building a weather forecast web page where we can change the data using a dropdown menu but without refreshing the page. We’ll use a Python Flask app to actually download the data.
Plotly and Flask are a great combination. The Plotly people obviously think so, because they have created Dash which is a combination of the two apps into a single product.
Python has, at long last, got itself a switch statement. Hooray!
But it’s not your common or garden switch statement as you would find in C or Java — of course not, this is Python. Python 3.10 implements Structural Pattern Matching which can be as simple as a switch statement but can also be rather more.
I covered the basics of Structural Pattern Matching here — this article goes into the topic a bit further, looking at capturing matched patterns (getting the value of a match that could be more than one value) and adding conditions to patterns.