Tags » Data Visualization

Data Analysis & Visualization with Python (Preparation Phase)

Hi, i am in my personal project, that is Data Analysis & Visualization with Python.
These below information was my notes for project’s preparation.

Source: “Python for Data Analysis”, by Wes McKinney, O’Reilly Publisher… 159 more words

Data Analytics

Friday Finds | June 23

Delicious is shutting down

Back in the day, Del.icio.us was quite the ‘big thing’. After being sold several times and woefully degraded it is finally being put out to pasture. 168 more words

Learning

Linear regression example

Final code:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('Droid control - wind speed.csv')
print df.head()
print df.describe()
print df.info()

plt.figure(1)
plt.scatter(df['Wind speed'], df['Control metrics'], color = 'red')
plt.title('Control action / wind speed')
plt.xlabel('Wind speed (km/h)')
plt.ylabel('Control metrics')
plt.savefig('Windspeed.jpg')

X = df.iloc[:, :-1].values
y = df.iloc[:, 1].values

X_squares = X[:,0] ** 2
X_times_Y = X[:,0] * y
N = len(X)

# b = ((∑X^2)(∑Y) – (∑X)(∑XY)) / (N(∑X^2) – (∑X)^2)

b1 = X_squares.sum() * y.sum() # (∑X^2)(∑Y)
b2 = X.sum() * X_times_Y.sum() # (∑X)(∑XY)
b3 = N * X_squares.sum() # N(∑X^2)
b4 = X.sum() ** 2 # (∑X)^2

b = (b1 - b2) / (b3 - b4)

# m = (N(∑XY) – (∑X)(∑Y)) / (N(∑X^2) – (∑X)^2)

m1 = N * X_times_Y.sum() # (∑X^2)(∑Y)
m2 = X.sum() * y.sum() # (∑X)(∑XY)
m3 = N * X_squares.sum() # N(∑X^2)
m4 = X.sum() ** 2 # (∑X)^2

m = (m1 - m2) / (m3 - m4)

manual_linear_regression = []
for el in X:
    f_of_X = b + m * el
    manual_linear_regression = np.append(manual_linear_regression, f_of_X)

lin_equation = 'Y = {} + {}X'.format(b, m)

plt.figure(2)
plt.scatter(df['Wind speed'], df['Control metrics'], color = 'red', label = 'Original data')
plt.scatter(df['Wind speed'], manual_linear_regression, color = 'blue', label = lin_equation)
plt.title('Control action / wind speed')
plt.xlabel('Wind speed (km/h)')
plt.ylabel('Control metrics')
plt.legend(loc = 'upper left')
plt.savefig('Windspeed-linreg.jpg')
… 1,379 more words

Graphing Political Proximity

Among the topics I am highly interested in are network representations of political and social structures. Examples below illustrate some of my recent work in this field. 778 more words

Web-scraping

Web Mapping

Having some “fun” with JS Bin, Leaflet, Mapbox, CartoDB, D3 using Boko Haram Data

Below are two links to two JS bin webmaps I put together. 146 more words

Boko Haram

How to jazz up your reports by adding a background image in Microsoft Power BI

Sometimes, a report needs a little extra style to get the message across. This tutorial shows you how to add a background image to your Power BI reports. 42 more words

Business Intelligence