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
source 'https://rubygems.org' | |
gem 'rails', '3.2.13' | |
ruby '1.9.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
# for Heroku deployment - as described in Ap A of ELLS book | |
group :development, :test do |
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
require 'json' | |
require 'csv' | |
require 'time' | |
file_path = '/path/to/2013ColoradoFloods.json' | |
#Open the CSV | |
CSV.open("/path/to/where/you/want/csv/geo_tagged_for_TM.csv", "w") do |csv| | |
csv << ["Lon", "Lat", "Date", "SortDate", "User", "Text"] |
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
## This first one can only read shapefiles | |
require 'rgeo-shapefile' | |
puts "This is a test of reading a shapefile" | |
shape = RGeo::Shapefile::Reader.open('../lab3/data/interestAreas.shp') | |
shape.each do |record| | |
puts record.geometry.area | |
end | |
puts shape.open? | |
shape.close | |
puts shape.open? |
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
#http://stackoverflow.com/questions/19271622/rails-ruby-mechanize-how-to-get-a-page-after-redirection | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'mechanize' | |
require 'csv' | |
class MoodleScraper | |
attr_writer :base |
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
require 'json' | |
require 'csv' | |
require 'time' | |
file_in = '/Users/jenningsanderson/Documents/Boulder_Floods/2013ColoradoFloods.json' | |
file_out = "/Users/jenningsanderson/Dropbox/SocialComputing/GroupMiniProject-GeoCoded/geo_tagged_counts.csv" | |
def get_geo_users(in_file) | |
screen_names = [] | |
ticker=0 |
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
require 'json' | |
require 'csv' | |
require 'time' | |
file_in = '/Users/jenningsanderson/Documents/Boulder_Floods/2013ColoradoFloods.json' | |
file_out = "/Users/jenningsanderson/Dropbox/SocialComputing/GroupMiniProject-GeoCoded/geo_tagged_counts_ignoreRTs.csv" | |
def get_geo_users(in_file) | |
screen_names = [] | |
ticker=0 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer