Created
May 29, 2014 22:11
-
-
Save willettk/abe053d46dea687e66b1 to your computer and use it in GitHub Desktop.
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
# Get the average classification counts for each group of subjects in Galaxy Zoo | |
db.galaxy_zoo_subjects.aggregate([{$group : {_id : "$metadata.survey", nClass : {$avg : "$classification_count"}}}]) | |
# Export data from MongoDB to a CSV file from the shell command line | |
mongoexport --db ouroboros --collection galaxy_zoo_subjects --csv --fields classification_count --query '{"metadata.survey":"ukidss"}' --out ukidss_nclass.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment