<commit_before>var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var db = mongoose.connection;
var assert = require('assert');
var food_trucks = require('./food_trucks_data_2015-10-16T23:33:01.747Z');
// var breweries = require('./BREWERY_DATA.JSON');
// var distilleries = require ('./DISTILLERY_DATA.JSON');

mongoose.connect('mongodb://localhost/boozeybites');
console.log('Connected to database.');
db.collection("foodtrucks").drop(function(err) {
  if (err) {
    console.log("Collection drop error: ", err);
  } else {
    console.log("foodtrucks collection dropped.");
  }
});

// db.collection("breweries").drop(function(err) {
//   if (err) {
//     console.log("Collection drop error: ", err);
//   } else {
//     console.log("breweries collection dropped.");
//   }
// });

// db.collection("distilleries").drop(function(err) {
//   if (err) {
//     console.log("Collection drop error: ", err);
//   } else {
//     console.log("distilleries collection dropped.");
//   }
// });

var scheduleSchema = new Schema({
  address: String,
  geometry: { // GeoJSON
    type: { type: String, default: "Point" },
    coordinates: {
      lat: Number,
      lng: Number
    }
  },
  open: String,
  close: String
});

var opencloseSchema = new Schema({
  open: String,
  close: String
});

var foodtruckSchema = new Schema({
  establishment: String,
  name: String,
  cuisine: String,
  payment: String,
  description: String,
  schedule: {
    monday: [scheduleSchema],
    tuesday: [scheduleSchema],
    wednesday: [scheduleSchema],
    thursday: [scheduleSchema],
    friday: [scheduleSchema],
    saturday: [scheduleSchema],
    sunday: [scheduleSchema]
  },
  contact: {
    facebook: String,
    twitter_link: String,
    twitter_id: String,
    twitter_screen_name: String,
    twitter_name: String,
    website: String
  }
 });

 var brewerySchema = new Schema({
   name: String,
   address: String,
   geometry: { // GeoJSON
     type: { type: String, default: "Point" },
     coordinates: {
       lat: Number,
       lng: Number
     }
   },
   schedule: {
     monday: [opencloseSchema],
     tuesday: [opencloseSchema],
     wednesday: [opencloseSchema],
     thursday: [opencloseSchema],
     friday: [opencloseSchema],
     saturday: [opencloseSchema],
     sunday: [opencloseSchema]
   },
    website: String
  });

  var distillerySchema = new Schema({
    name: String,
    address: String,
    geometry: { // GeoJSON
      type: { type: String, default: "Point" },
      coordinates: {
        lat: Number,
        lng: Number
      }
    },
    schedule: {
      monday: [opencloseSchema],
      tuesday: [opencloseSchema],
      wednesday: [opencloseSchema],
      thursday: [opencloseSchema],
      friday: [opencloseSchema],
      saturday: [opencloseSchema],
      sunday: [opencloseSchema]
    },
     website: String
   });<commit_msg>Changed coordinates to array of numbers. [lng, lat]<commit_after>var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var db = mongoose.connection;
var assert = require('assert');
var food_trucks = require('./food_trucks_data_2015-10-16T23:33:01.747Z');
// var breweries = require('./BREWERY_DATA.JSON');
// var distilleries = require ('./DISTILLERY_DATA.JSON');

mongoose.connect('mongodb://localhost/boozeybites');
console.log('Connected to database.');
db.collection("foodtrucks").drop(function(err) {
  if (err) {
    console.log("Collection drop error: ", err);
  } else {
    console.log("foodtrucks collection dropped.");
  }
});

// db.collection("breweries").drop(function(err) {
//   if (err) {
//     console.log("Collection drop error: ", err);
//   } else {
//     console.log("breweries collection dropped.");
//   }
// });

// db.collection("distilleries").drop(function(err) {
//   if (err) {
//     console.log("Collection drop error: ", err);
//   } else {
//     console.log("distilleries collection dropped.");
//   }
// });

var scheduleSchema = new Schema({
  address: String,
  geometry: { // GeoJSON
    type: { type: String, default: "Point" },
    coordinates: [Number]
  },
  open: String,
  close: String
});

var opencloseSchema = new Schema({
  open: String,
  close: String
});

var foodtruckSchema = new Schema({
  establishment: String,
  name: String,
  cuisine: String,
  payment: String,
  description: String,
  schedule: {
    monday: [scheduleSchema],
    tuesday: [scheduleSchema],
    wednesday: [scheduleSchema],
    thursday: [scheduleSchema],
    friday: [scheduleSchema],
    saturday: [scheduleSchema],
    sunday: [scheduleSchema]
  },
  contact: {
    facebook: String,
    twitter_link: String,
    twitter_id: String,
    twitter_screen_name: String,
    twitter_name: String,
    website: String
  }
 });

 var brewerySchema = new Schema({
   name: String,
   address: String,
   geometry: { // GeoJSON
     type: { type: String, default: "Point" },
     coordinates: [Number]
   },
   schedule: {
     monday: [opencloseSchema],
     tuesday: [opencloseSchema],
     wednesday: [opencloseSchema],
     thursday: [opencloseSchema],
     friday: [opencloseSchema],
     saturday: [opencloseSchema],
     sunday: [opencloseSchema]
   },
    website: String
  });

  var distillerySchema = new Schema({
    name: String,
    address: String,
    geometry: { // GeoJSON
      type: { type: String, default: "Point" },
      coordinates: [Number]
    },
    schedule: {
      monday: [opencloseSchema],
      tuesday: [opencloseSchema],
      wednesday: [opencloseSchema],
      thursday: [opencloseSchema],
      friday: [opencloseSchema],
      saturday: [opencloseSchema],
      sunday: [opencloseSchema]
    },
     website: String
   });
{'fraction_non_alphanumeric': 0.1508537229361028, 'fraction_numerical': 0.005984861820102095, 'mean_word_length': 3.1444201312910285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1573862', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1796, 'n_words': 408}