Squashed 'projects/bad-nlp/name-database/' content from commit 46d2e01a
git-subtree-dir: projects/bad-nlp/name-database git-subtree-split: 46d2e01a4953b8f54e8625c9111cf5b372d80b49
This commit is contained in:
20
tasks/importers/census2000.rake
Normal file
20
tasks/importers/census2000.rake
Normal file
@@ -0,0 +1,20 @@
|
||||
desc "imports the census 2000 data files and merged the data with the existing data files"
|
||||
task "import:census2000" => "import:census2000:run"
|
||||
|
||||
namespace "import:census2000" do
|
||||
task :run => :db do
|
||||
|
||||
|
||||
open("sources/census-2000/app_c.csv", 'r') do |file|
|
||||
|
||||
file.gets #skip the header
|
||||
file.each do |line|
|
||||
fields = line.split(",")
|
||||
name = fields.first
|
||||
@db.family_names.get name
|
||||
end
|
||||
end
|
||||
|
||||
@db.write
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user