/Alan-Jones-article-code

Code from articles that I have written

Primary LanguageJupyter Notebook

Alan Jones

Code from my articles on Medium

Below is a list of some of the articles/tutorials that I have written (mostly on Medium) and example code to go with them.

You can see the whole list of articles in my Medium profile.


Web Visualization with Plotly and Flask

[Sample code and the list of articles is here]

Why use Dash when Plotly plus Flask is easy and more flexible? In the first of two articles I compare a simple Dash app with a similar one constructed from Flask and HTML. I conclude that my version is (from an admittedly biased point of view) easier and more flexible than Dash.

A third article uses the techniques used above to create a stock tracking app.


Sentiment Analysis of Tweets

[Article][Code]

This is an article on Medium that looks at sentiment analysis using the Python VADER library


Visualizing Twitter Statistics with Python and Pandas

[Article][Code]

This is an article on Medium that looks at producing stats from the Twitter API


Jupyter and Markdown

[Article] [Code]

Whether you are sharing your Jupyter Notebooks with friends and colleagues or publishing them more widely, they will be better appreciated if they are well laid out and formatted - Medium article.


Python Pandas and SQLite

[Article] [Code]

Using SQLite to store your Pandas dataframes gives you a persistent store and a way of easily selecting and filtering your data


5 Visualization Libraries for Python

[Article] [Code]

Matplotlib, Pandas, Seaborn, Plotnine and MplFinance all have their strengths — let’s get a feel for each of them


Topical Plots: Global Warming Heatmaps

Which chart will get the message across best

[Article] [Notebook]

One degree Celsius doesn't seem very much. Sitting in the sun on lazy summer afternoon, the difference between 25 and 26 degrees is hardly noticable. But the Earth is a big place, so the amount of energy required to heat it up by one degree is massive. Which is why, as global temperatures rise, we tend to see more extreme weather events, driven by that increased energy in the atmosphere.

But how do we communicate the changes in temperatures that are occuring in an effective way. 

First we need some data and then we can look at how it could be represented graphically. I describe the data and then suggest some plots - line plots, scatter plots and heatmaps - that might be suitable.


A Multi-page Interactive Dashboard with Streamlit and Plotly

Beautiful interactive multipage dashboards are made easy with Streamlit

[Article] [Code]

The great thing about Streamlit is, not only is it beautiful, but it’s simple, too.


Rational UI Design with Streamlit

An MVC approach

[Article] [Code]

From one point of view Streamlit is a retrograde step in web development because it lets you mix up the logic of your app with the way it is presented. But from another it is very much simplifying web design.


An Interactive CO2 Emissions Dashboard with Plotly and Streamlit

With Plotly charts and Streamlit's flexible input, layout and theming options, you can build a great interactive data visualization app from live data

[Article] [Code]

Streamlit doesn't have the most comprehensive set of user interface components but they are easy to use and with a bit of imagination can be combined to good effect. We are going to look at the way we can use theming and the various interactive input and layout options in Streamlit, alongside Plotly charts, to produce an attractive and, hopefully informative, web app.


SQL, Pandas or Both - Analysing the UK Electoral System

[Article] [Code]

Pandas is great for analysing and plotting data but should you store your data in a database and select it with SQL. Let's take a look at some common operations using Pandas and SQL and see how they compare


How to Share your Jupyter Notebook with Mercury or Voilà

[Article] [Code]

Putting your Jupyter notebook on the web is reasonably easy with either Mercury or Voilà but which is easier - here's a brief comparison of the two technologies


Mean, Median and Mode: What Are They and When Should You Use Them

[Article] [Code]

You probably remember Mean, Median and Mode from high school stats classes but they are often misused. We look at how you should use them - with Python and Pandas examples.


If you have found this content useful, please consider this...

Buy Me a Coffee at ko-fi.com

Please note that all the software in this repo is written for educational purposes and should not be considered suitable for production code