Tag: how to
-
GeoPandas – a detailed example
Dear World, Please send me more geographical data to plot so I can keep on using GeoPandas… Love from Sho’t Left I can’t believe how much fun this library is! So my goal was to find a way to map assessment ratings by region, showing the overall result for the region, as well as the…
-
Which districts are my cities located in?
GeoPandas gets more and more exciting as the day wears on :). I’ve just discovered how ridiculously easy it is to take a set of cities and relate them to their corresponding districts, states or provinces and then plot the outcomes. Fanfare for… the marvellous GeoPandas spatial join! Here’s a quick how-to guide to setting…
-
Multivariate regression
So: with linear regression (aka simple linear regression) we have one feature which we are using to predict a dependent value (for example number of rooms as a predictor of house price). With multivariate regression (aka multiple linear regression) we simply have multiple features which could be used to predict that dependent value (for example…
-
Polynomial regression
Polynomial regression is a considered a special case of linear regression where higher order powers (x2, x3, etc.) of an independent variable are included. It’s appropriate where your data may best be fitted to some sort of curve rather than a simple straight line. The polynomial module of numpy is easily used to explore fitting the best…
-
Co-variance, Correlation & Linear Regression
Typically we have 2 sets of values and we want to find out if these 2 sets of values are related, and if so how, and by how much? Could height be indicative of weight? Could hours of practice be related to how many errors are made in a mathematical test paper? Co-variance is a…
-
Yes I can API!
I have a “real” assignment (for work as opposed to study) to do some data visualizations using maps. It’s been a journey of over a week to get to the place where I’m ready to start, and the journey has had some educational detours along the way that I thought I’d share. Naturally, because I’m…
-
3Blue1Brown – thank you!
This resource was just recommended via Coursera Mathematics for Machine Learning: Linear Algebra, and all I can say is WOW! Animated math: it’s slick, it’s professional, it’s cute, it makes you smile – and it makes it all seem so obvious :). I can heartily recommend you take the time if you need help on Linear Algebra. In…
-
Polar bar chart challenge
A big thanks to ujubee.com for challenging me to create a polar bar chart last week – I hadn’t done one of these before, but the matplotlib polar_bar_demo documentation was most excellent – and you can see from the test sample below that the results are very pretty! If you’re interested in a bit more…
-
Conditional probability refresher
Probability is always… A number between 1 (certain) and 0 (impossible): The probability experiment This is process that can be repeated and in which the outcome will be uncertain, for example rolling a dice, tossing a coin, or selecting a card from a pack. The sample space This is the set of all possible outcomes…
-
Snippets
Small things that drove me nuts – and how they were resolved… an ever-expanding list, no doubt 🙂 Issue Solution Source plt.savefig() saves an empty picture or a cut-off picture plt.savefig() should be placed BEFORE plt.show() to prevent this happening Stackoverflow solution Pandas prints pie chart labels and a legend which is redundant To lose…
