Skip to content
Ben Alex Keen
  • Home
  • About
  • Blog
Menu Close
  • Home
  • About
  • Blog

Author: Ben Keen

This author has written 74 articles
  1. Home>
  2. Ben Keen>
  3. Page 7

Line Charts in Matplotlib

  • Post author:Ben Keen
  • Post published:6th May 2017
  • Post category:Python

Line Charts in MatplotlibWe start by importing matplotlib and display all visuals inline In [1]: import matplotlib.pyplot as plt %matplotlib inline We'll use the ggplot style in this example for aesthetics…

Continue ReadingLine Charts in Matplotlib

Mapping Categorical Data in pandas

  • Post author:Ben Keen
  • Post published:6th May 2017
  • Post category:Uncategorised

Mapping Categorical Data in pandasIn python, unlike R, there is no option to represent categorical data as factors. Factors in R are stored as vectors of integer values and can…

Continue ReadingMapping Categorical Data in pandas

Correlation in Python

  • Post author:Ben Keen
  • Post published:1st May 2017
  • Post category:Python

Correlation in PythonCorrelation values range between -1 and 1. There are two key components of a correlation value: magnitude - The larger the magnitude (closer to 1 or -1), the…

Continue ReadingCorrelation in Python

Interacting with the Twitter API using Python

  • Post author:Ben Keen
  • Post published:27th April 2017
  • Post category:Python

Interacting with the Twitter API using pythonTwitter has a RESTful API to retrieve Tweets for certain queries for use in your applications. This post will show how we can authorise…

Continue ReadingInteracting with the Twitter API using Python

Implementing Djikstra’s Shortest Path Algorithm with Python

  • Post author:Ben Keen
  • Post published:11th January 2017
  • Post category:Python

Djikstra's algorithm is a path-finding algorithm, like those used in routing and navigation. We will be using it to find the shortest path between two nodes in a graph. It…

Continue ReadingImplementing Djikstra’s Shortest Path Algorithm with Python

Linear Algebra using numpy – Vectors

  • Post author:Ben Keen
  • Post published:2nd November 2016
  • Post category:Python

Linear Algebra using numpy - Vectors In this post we explore some common linear algebra functions and their application in pure python and numpy Python lists are not vectors, they…

Continue ReadingLinear Algebra using numpy – Vectors

Resampling time series data with pandas

  • Post author:Ben Keen
  • Post published:23rd May 2016
  • Post category:Python

Resampling time series data with pandasIn this post, we'll be going through an example of resampling time series data using pandas. We're going to be tracking a self-driving car at…

Continue ReadingResampling time series data with pandas

Linear Programming with Python and PuLP

  • Post author:Ben Keen
  • Post published:1st April 2016
  • Post category:Python

Introduction to Linear Programming with Python and PuLP Linear Programming, also sometimes called linear optimisation, involves maximising or minimising a linear objective function, subject to a set of linear inequality…

Continue ReadingLinear Programming with Python and PuLP

Linear Programming with Python and PuLP – Part 6

  • Post author:Ben Keen
  • Post published:1st April 2016
  • Post category:Python

Introduction to Linear Programming with Python - Part 6Mocking conditional statements using binary constraints In part 5, I mentioned that in some cases it is possible to construct conditional statements…

Continue ReadingLinear Programming with Python and PuLP – Part 6

Linear Programming with Python and PuLP – Part 5

  • Post author:Ben Keen
  • Post published:1st April 2016
  • Post category:Python

Introduction to Linear Programming with Python - Part 5Using PuLP with pandas and binary constraints to solve a scheduling problem In this example, we'll be solving a scheduling problem. We…

Continue ReadingLinear Programming with Python and PuLP – Part 5
  • Go to the previous page
  • 1
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • Go to the next page
© Ben Alex Keen