<commit_before># -*- coding: utf-8 -*-
"""
Created on Thu Feb 26 14:29:29 2015

@author: awoiz_000

Exploring spatial data
"""

import pandas as pd
from pandas.tools.plotting import scatter_matrix
import pysal
import numpy as np
import sys


def get_data_as_frame(filepath, columns):
    open_dbf = pysal.open(filepath)
    X = []
    for col in columns:
        X.append(open_dbf.by_col(col))
    array = np.array(X)
    open_dbf.close()
    return pd.DataFrame(data=array.T, columns=columns)

print"Running..."
in_data = sys.argv[1] #This is the path to the .dbf file. 
cols = ["MEANDISTFR","MEANHomeIn", "MEANHomVal","MEANTrvlGr", "COUNT"]
frame = get_data_as_frame(in_data, cols)
print"making plot..."
scatter_matrix(frame, figsize=(15,15), diagonal="kde")<commit_msg>put code under if main statement<commit_after># -*- coding: utf-8 -*-
"""
Created on Thu Feb 26 14:29:29 2015

@author: awoiz_000

Exploring spatial data
"""

import pandas as pd
from pandas.tools.plotting import scatter_matrix
import pysal
import numpy as np
import sys


def get_data_as_frame(filepath, columns):
    open_dbf = pysal.open(filepath)
    X = []
    for col in columns:
        X.append(open_dbf.by_col(col))
    array = np.array(X)
    open_dbf.close()
    return pd.DataFrame(data=array.T, columns=columns)


if __name__ == "__main__":
    print"Running..."
    in_data = sys.argv[1] #This is the path to the .dbf file. 
    cols = ["MEANDISTFR","MEANHomeIn", "MEANHomVal","MEANTrvlGr", "COUNT"]
    frame = get_data_as_frame(in_data, cols)
    print"making plot..."
    scatter_matrix(frame, figsize=(15,15), diagonal="kde")
{'fraction_non_alphanumeric': 0.13312693498452013, 'fraction_numerical': 0.026006191950464396, 'mean_word_length': 4.034267912772585, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3616759', 'n_tokens_mistral': 623, 'n_tokens_neox': 581, 'n_words': 149}