Skip to main content

2 posts tagged with "python"

View All Tags

· 3 min read
Richard Haar

There are a huge amount of datasets available online, you can find many on https://dataportals.org/ including data for the city of New York. They provide a dataset containing details on over 1.8 million crashes.

Plotting the data#

Now each crash contains a Latitude and Longitude value for where the collision occurred. And with 1.8 million collisions, it should be possible to map New York roads using this data.

· 12 min read
Richard Haar

Multivariable linear regression is all about taking in a set of data points (x0, x1, …,xn, y) and to be able to predict y values for some other data points (x0',x1',…,xn'). I'm giving an example here on how to do so in Python as well as computing the coefficient of determination (R2) to see how well the predictor variables model y.

All the following code is available with an MIT licence here.