{"cells":[
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "#imports\n\nlibrary(ggplot2) # Data visualization\nlibrary(readr) # CSV file I/O, e.g. the read_csv function\nlibrary(plyr) #for data management\n"
 },
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "#load in dataset along with its merges\n\ntrainFrame = read_csv(\"../input/train.csv\")\n\n#then perform merges\n#clientFrame = read_csv(\"../input/cliente_tabla.csv\")\n#trainFrame = join(clientFrame,trainFrame,by = \"Cliente_ID\",type = \"right\")\n#print(trainFrame[1,])\n#productFrame = read_csv(\"../input/producto_tabla.csv\")\n#trainFrame = join(productFrame,trainFrame,by = \"Producto_ID\",type = \"right\")\n#townStateFrame = read_csv(\"../input/town_state.csv\")\n#trainFrame = join(townStateFrame,trainFrame,by = \"Agencia_ID\",type = \"right\")"
 },
 {
  "cell_type": "code",
  "execution_count": null,
  "metadata": {
   "collapsed": false
  },
  "outputs": [],
  "source": "#get size of the trainFrame\n\nprint(paste0(\"Number of Observations: \",dim(trainFrame)[1]))\nprint(paste0(\"Number of Unique Products: \",length(unique(trainFrame$Producto_ID))))"
 },
 {
  "cell_type": "markdown",
  "metadata": {},
  "source": "Given the large number of observations, in order to most reasonably explore the data, we should\nconsider only a smaller subset of the data. We will consider about 20 products"
 }
],"metadata":{"kernelspec":{"display_name":"R","language":"R","name":"ir"}}, "nbformat": 4, "nbformat_minor": 0}