Open GordanBuckingham opened 7 years ago
can we get correct link please?
I think you want http://s3.amazonaws.com/open_data/opendata_projects000.gz
Note you will need to use gunzip
rather than unzip
and rename opendata_projects000
to opendata_projects.csv
@greg0pearce Thanks
I am getting this error when using mongoimport -d donorschoose -c projects --type csv --file Downloads/opendata_projects.csv --headerline
2017-09-18T19:25:17.175-0400 Failed: fields cannot be identical: '' and '' 2017-09-18T19:25:17.175-0400 imported 0 documents
The new file does not seem to contain header values. Simply copy/paste this as the first line in the csv file:
"_projectid","_teacher_acctid","_schoolid","school_ncesid","school_latitude","school_longitude","school_city","school_state","school_zip","school_metro","school_district","school_county","school_charter","school_magnet","school_year_round","school_nlns","school_kipp","school_charter_ready_promise","teacher_prefix","teacher_teach_for_america", "teacher_ny_teaching_fellow","primary_focus_subject","primary_focus_area","secondary_focus_subject","secondary_focus_area","resource_type","poverty_level","grade_level","vendor_shipping_charges","sales_tax","payment_processing_charges","fulfillment_labor_materials","total_price_excluding_optional_support","total_price_including_optional_support","students_reached","total_donations","num_donors","eligible_double_your_impact_match","eligible_almost_home_match","funding_status","date_posted","date_completed","date_thank_you_packet_mailed","date_expiration"
On linux, simply use this command;
sed -i '1s/^/"_projectid","_teacher_acctid","_schoolid","school_ncesid","school_latitude","school_longitude","school_city","school_state","school_zip","school_metro","school_district","school_county","school_charter","school_magnet","school_year_round","school_nlns","school_kipp","school_charter_ready_promise","teacher_prefix","teacher_teach_for_america", "teacher_ny_teaching_fellow","primary_focus_subject","primary_focus_area","secondary_focus_subject","secondary_focus_area","resource_type","poverty_level","grade_level","vendor_shipping_charges","sales_tax","payment_processing_charges","fulfillment_labor_materials","total_price_excluding_optional_support","total_price_including_optional_support","students_reached","total_donations","num_donors","eligible_double_your_impact_match","eligible_almost_home_match","funding_status","date_posted","date_completed","date_thank_you_packet_mailed","date_expiration"\n/' opendata_projects.csv
https://s3.amazonaws.com/open_data/csv/opendata_projects.zip is not currently pointing to the data