This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data Source: http://vincentarelbundock.github.io/Rdatasets/csv/cluster/votes.repub.csv | |
var data = { | |
'Alabama':{'X1968': '14', 'X1856': 'NA', 'X1876': '40.02', 'X1872': '53.19', 'X1912': '8.26', 'X1916': '21.97', 'X1964': '69.5', 'X1976': '43.48', 'X1896': '28.13', 'X1972': '72.4', 'X1892': '3.95', 'X1932': '14.15', 'X1956': '39.39', 'X1936': '12.82', 'X1952': '35.02', 'X1868': '51.44', 'X1860': 'NA', 'X1864': 'NA', 'X1904': '20.65', 'X1900': '34.67', 'X1908': '24.38', 'X1928': '48.49', 'X1884': '38.44', 'X1940': '14.34', 'X1960': '41.75', 'X1880': '36.98', 'X1944': '18.2', 'X1920': '30.98', 'X1948': '19.04', 'X1924': '27.01', 'X1888': '32.28'} | |
, | |
'Alaska': {'X1968': '45.3', 'X1856': 'NA', 'X1876': 'NA', 'X1872': 'NA', 'X1912': 'NA', 'X1916': 'NA', 'X1964': '34.1', 'X1976': '62.91', 'X1896': 'NA', 'X1972': '58.1', 'X1892': 'NA', 'X1932': 'NA', 'X1956': 'NA', 'X1936': 'NA', 'X1952': 'NA', 'X1868': 'NA', 'X1860': 'NA', 'X1864': 'NA', 'X1904': 'NA', 'X1900': 'NA', 'X1908': 'NA', 'X1928': 'NA', 'X1884': 'NA', ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddRelationshipTable < ActiveRecord::Migration | |
def change | |
create_table :relationships do |t| | |
t.integer :follower_id | |
t.integer :followed_id | |
end | |
end | |
end |