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. Most articles have downloadable code and some have demonstrator web sites.
Subscribe to my free, occasional, newsletter here for updates and new articles.
You can download program code from my Github page.
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.
Python 3.10 has implemented the switch statement — sort of. The switch statement in other languages such as C or Java does a simple value match on a variable and executes code depending on that value.
It can be used as a simple switch statement but is capable of much more.
That might be good enough for C but this is Python, and Python 3.10 implements a much more powerful and flexible construct called Structural Pattern Matching. It can be used as a simple switch statement but is capable of much more.
Let’s take the simple switch case. Below is…
You could choose a language by going to the Stackoverflow survey website, find the highest paid language and learn that.
It’s a strategy. But not necessarily a good one.
For interest, here are the salaries reported by the Stackoverflow Developer’s Survey, 2020.
Sentiment Analysis is not an exact science. Natuaral language is full of strange expressions, words that mean more than one thing, idioms, sarcasm and any number of things that make the extraction of meaning difficult. Look at the these two sentences.
“I know why I keep making the same mistakes — I don’t think!”
“Sentiment Analysis is accurate in all circumstances — I don’t think!”
In the first sentence the phrase “I don’t think” explains the first part of the sentence but in the second it is sarcastic and negates the meaning of the preceding part of the sentence. …
If you want to publish a novel or a textbook, you can do this through commercial outlets like Amazon’s KDP, Barnes and Noble Press or Rakuten Kobo. But this is not really an appropriate route for smaller documents or articles.
So, what if you want to reward your patrons with extra downloadable content, or make a short compilation of previous work for your faithful followers, or even sell short-form content from your website or online store? …
It may seem as if I have something against Dash. Honestly, I haven’t; it’s a fine product, comes with a lot of support from Plotly and does what it is intended to do, well.
But, as I attempted to demonstrate in a previous article, there is no need to write HTML in Python (as Dash requires you to do) when you can write it in HTML! …