set data for drilldown option in highmaps 
        id must be input and corresponding to drilldown arguments in data series
422326
def add_drilldown_data_set(self, data, series_type, id, **kwargs):
        
        self.drilldown_data_set_count += 1
        if self.drilldown_flag == False:
            self.drilldown_flag = True
        
        kwargs.update({'id':id})
        series_data = Series(data, series_type=series_type, **kwargs)
        series_data.__options__().update(SeriesOptions(series_type=series_type, **kwargs).__options__())
        self.drilldown_data_temp.append(series_data)
845843
def _init_data_map(self):
        

        if self._data_map is None:
            self._data_map = {'_root': None}
            self._data_map.update({}.fromkeys(self._metadata_props))
1336434
function (object) {
            object.id = object.id || this.generateId();
            this.data.push(object);
            this.mapValues[object.id] = {};
            this.eachMap(function (map, mapName) {
                this.addObjectToMap(mapName, object);
            });
            return this;
        }
825302
function pongTableSetData( divId, data, dataDocSubPath ) {
  log( "Pong-Table",  'set data hook: '+divId+ " "+dataDocSubPath );
  if ( dataDocSubPath != null ) {
    poTbl[ divId ].pongTableData = getSubData( data, tblDef.dataDocSubPath );	
  } else {
    //log( "Pong-Table", "set: "+JSON.stringify( data )  )
    poTbl[ divId ].pongTableData = data;		
  }
  tblCells( divId ); 
  
  pongTableResize( divId );
  
  if ( poTbl[ divId ].setData ) {
    if ( poTbl[ divId ].setData.setData ) {
      var setDta =  poTbl[ divId ].setData.setData
      for ( var i = 0; i < setDta.length; i++ ) {
        //alert( setDta[i].resId )
        setModuleData( setDta[i].resId+'Content', poTbl[ divId ].pongTableData, null );
      }
    }
  }
}
1339950
public void fillSimpleMeta(HashMap<String, Object> fm) {
    fm.put("DatasetName", _datasetName);
    fm.put("NRow", (double)_fr.numRows());
    fm.put("NCol", (double)_fr.numCols());
    fm.put("LogNRow", Math.log((double)fm.get("NRow")));
    fm.put("LogNCol", Math.log((double)fm.get("NCol")));
    fm.put("NACount", _fr.naCount());
    fm.put("NAFraction", _fr.naFraction());
    fm.put("NumberNumericFeat", (double)numberOfNumericFeatures());
    fm.put("NumberCatFeat", (double) numberOfCategoricalFeatures());
    fm.put("RatioNumericToCatFeat", Double.isInfinite((double) fm.get("NumberCatFeat"))     ? SQLNAN : (double) fm.get("NumberNumericFeat") / (double) fm.get("NumberCatFeat"));
    fm.put("RatioCatToNumericFeat", Double.isInfinite((double) fm.get("NumberNumericFeat")) ? SQLNAN : (double) fm.get("NumberCatFeat")     / (double) fm.get("NumberNumericFeat"));
    fm.put("DatasetRatio", (double) _fr.numCols() / (double) _fr.numRows());
    fm.put("LogDatasetRatio", Math.log((double) fm.get("DatasetRatio")));
    fm.put("InverseDatasetRatio", (double)_fr.numRows() / (double) _fr.numCols() );
    fm.put("LogInverseDatasetRatio", Math.log((double)fm.get("InverseDatasetRatio")));
    fm.put("Classification", _isClassification?1:0);
    fm.put("FeatWithNAs", (double)na_FeatureCount());
    fm.put("RowsWithNAs",(double)rowsWithNa());
    fm.put("NClass",(double)nClass());
    _statsSkewness = populateStats(StatsType.Skewness, _statsSkewness, fm);
    _statsKurtosis = populateStats(StatsType.Kurtosis, _statsKurtosis, fm);
    _statsCardinality = populateStats(StatsType.Cardinality, _statsCardinality, fm);
  }
758202
private void addDrilldownOptionsArray(OptionsProcessorContext context) {
		JsonRenderer renderer = JsonRendererFactory.getInstance()
				.getRenderer();
		response.renderJavascript(
				MessageFormat.format("var {0};", JS_DRILLDOWN_ARRAY_NAME),
				JS_DRILLDOWN_ARRAY_NAME + "-init");
		response.renderOnDomReadyJavascript(MessageFormat.format("{0} = {1};",
				getDrilldownArrayName(component),
				renderer.toJson(context.getDrilldownOptions())));
	}
461708
public void setDataModel(final TableDataModel dataModel) {
		getOrCreateComponentModel().dataModel = dataModel;
		getOrCreateComponentModel().rowIndexMapping = null;

		if (dataModel instanceof BeanTableDataModel) {
			((BeanTableDataModel) dataModel).setBeanProvider(new DataTableBeanProvider(this));
			((BeanTableDataModel) dataModel).setBeanProperty(".");
		}

		if (dataModel instanceof ScrollableTableDataModel) {
			int startIndex = getCurrentPage() * getRowsPerPage();
			int endIndex = startIndex + getRowsPerPage() - 1;
			((ScrollableTableDataModel) dataModel).setCurrentRows(startIndex, endIndex);
		}

		// Flush the repeater's row contexts and scratch maps
		repeater.reset();
	}
1136131
function () {
		var chartOptions = this.chartOptions,
			options = this.options,
			xColumns = [],
			getValueCount = function (type) {
				return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
			},
			getPointArrayMap = function (type) {
				return Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap;
			},
			globalType = chartOptions && chartOptions.chart && chartOptions.chart.type,
			individualCounts = [],
			seriesBuilders = [],
			seriesIndex = 0,
			i;

		each((chartOptions && chartOptions.series) || [], function (series) {
			individualCounts.push(getValueCount(series.type || globalType));
		});

		// Collect the x-column indexes from seriesMapping
		each((options && options.seriesMapping) || [], function (mapping) {
			xColumns.push(mapping.x || 0);
		});

		// If there are no defined series with x-columns, use the first column as x column
		if (xColumns.length === 0) {
			xColumns.push(0);
		}

		// Loop all seriesMappings and constructs SeriesBuilders from
		// the mapping options.
		each((options && options.seriesMapping) || [], function (mapping) {
			var builder = new SeriesBuilder(),
				name,
				numberOfValueColumnsNeeded = individualCounts[seriesIndex] || getValueCount(globalType),
				seriesArr = (chartOptions && chartOptions.series) || [],
				series = seriesArr[seriesIndex] || {},
				pointArrayMap = getPointArrayMap(series.type || globalType) || ['y'];

			// Add an x reader from the x property or from an undefined column
			// if the property is not set. It will then be auto populated later.
			builder.addColumnReader(mapping.x, 'x');

			// Add all column mappings
			for (name in mapping) {
				if (mapping.hasOwnProperty(name) && name !== 'x') {
					builder.addColumnReader(mapping[name], name);
				}
			}

			// Add missing columns
			for (i = 0; i < numberOfValueColumnsNeeded; i++) {
				if (!builder.hasReader(pointArrayMap[i])) {
					//builder.addNextColumnReader(pointArrayMap[i]);
					// Create and add a column reader for the next free column index
					builder.addColumnReader(undefined, pointArrayMap[i]);
				}
			}

			seriesBuilders.push(builder);
			seriesIndex++;
		});

		var globalPointArrayMap = getPointArrayMap(globalType);
		if (globalPointArrayMap === undefined) {
			globalPointArrayMap = ['y'];
		}

		this.valueCount = {
			global: getValueCount(globalType),
			xColumns: xColumns,
			individual: individualCounts,
			seriesBuilders: seriesBuilders,
			globalPointArrayMap: globalPointArrayMap
		};
	}
283743
function Datamap( options ) {

    if ( typeof d3 === 'undefined' || typeof topojson === 'undefined' ) {
      throw new Error('Include d3.js (v3.0.3 or greater) and topojson on this page before creating a new map');
   }

    //set options for global use
    this.options = defaults(options, defaultOptions);
    this.options.geographyConfig = defaults(options.geographyConfig, defaultOptions.geographyConfig);
    this.options.bubblesConfig = defaults(options.bubblesConfig, defaultOptions.bubblesConfig);
    this.options.arcConfig = defaults(options.arcConfig, defaultOptions.arcConfig);

    //add the SVG container
    if ( d3.select( this.options.element ).select('svg').length > 0 ) {
      addContainer.call(this, this.options.element, this.options.height, this.options.width );
    }

    /* Add core plugins to this instance */
    this.addPlugin('bubbles', handleBubbles);
    this.addPlugin('legend', addLegend);
    this.addPlugin('arc', handleArcs);
    this.addPlugin('labels', handleLabels);

    //append style block with basic hoverover styles
    if ( ! this.options.disableDefaultStyles ) {
      addStyleBlock();
    }

    return this.draw();
  }
297353
def _insert_data(self, name, value, timestamp, interval, config, pipe, ttl_batch=None):
    ''''''
    # Calculate the TTL and abort if inserting into the past
    expire, ttl = config['expire'], config['ttl'](timestamp)
    if expire and not ttl:
      return

    i_bucket, r_bucket, i_key, r_key = self._calc_keys(config, name, timestamp)

    if config['coarse']:
      self._type_insert(pipe, i_key, value)
    else:
      # Add the resolution bucket to the interval. This allows us to easily
      # discover the resolution intervals within the larger interval, and
      # if there is a cap on the number of steps, it will go out of scope
      # along with the rest of the data
      pipe.sadd(i_key, r_bucket)
      self._type_insert(pipe, r_key, value)

    if expire:
      ttl_args = (i_key, ttl)
      if ttl_batch is not None:
        ttl_batch.add(ttl_args)
      else:
        pipe.expire(*ttl_args)
      if not config['coarse']:
        ttl_args = (r_key, ttl)
        if ttl_batch is not None:
          ttl_batch.add(ttl_args)
        else:
          pipe.expire(*ttl_args)
256584
def _prepdata(self):
        """"""
        
        # if missing, compute and add bbox
        if not self._data.get("bbox"):
            self.update_bbox()

        # if missing, set crs to default crs (WGS84), see http://geojson.org/geojson-spec.html
        if not self._data.get("crs"):
            self._data["crs"] = {"type":"name",
                               "properties":{"name":"urn:ogc:def:crs:OGC:2:84"}}
397831
public void setDataType(Series.DataType dataType) {

    if (dataType != null && this.dataType != null && this.dataType != dataType) {
      throw new IllegalArgumentException(
          "Different Axes (e.g. Date, Number, String) cannot be mixed on the same chart!!");
    }
    this.dataType = dataType;
  }
550843
function (options, callback) {
			var sampleImageCategories = ['abstract', 'animals', 'business', 'cats', 'city', 'food', 'nature', 'technics', 'transport'];
			var numItems = 200;

			// build dataSource based with options
			var resp = {
				count: numItems,
				items: [],
				pages: (Math.ceil(numItems / (options.pageSize || 30))),
				page: options.pageIndex
			};

			// get start and end limits for JSON
			var i, l;
			i = options.pageIndex * (options.pageSize || 30);
			l = i + (options.pageSize || 30);
			resp.start = i + 1;
			resp.end = l;

			// add sample items to datasource
			for (i; i < l; i++) {
				resp.items.push({
					name: ('Thumbnail ' + (i + 1)),
					src: 'http://lorempixel.com/65/65/' + sampleImageCategories[Math.floor(Math.random() * 9)] + '/?_=' + i
				});
			}

			// call and simulate latency
			setTimeout(function () {
				callback(resp);
			}, loadDelays[Math.floor(Math.random() * 4)]);
		}
1125385
def insertDataset(self, dataset):
        
        try:
            models.Dataset.create(
                id=dataset.getId(),
                name=dataset.getLocalId(),
                description=dataset.getDescription(),
                attributes=json.dumps(dataset.getAttributes()))
        except Exception:
            raise exceptions.DuplicateNameException(
                dataset.getLocalId())
631991
@Override public void setID(Integer val)
   {
      ProjectFile parent = getParentFile();
      Integer previous = getID();
      if (previous != null)
      {
         parent.getResources().unmapID(previous);
      }
      parent.getResources().mapID(val, this);

      set(ResourceField.ID, val);
   }
573418
function setData(data) {
    let output = [];

    // Clone so that we have our own reference
    data = JSON.parse(JSON.stringify(data));
    
    // Calculate the total height that the scrollbar should be based on the root nodes
    // and all of the items that have been expanded so far.
    let totalHeight = 0;
    forEachExpansion(_(this).expansions, (expansion) => {
        totalHeight += expansion.children;
    });

    updateViewDimensions.call(this, totalHeight);

    // Apply the offsets to the items which is used to keep track of expansions.
    // By ensuring the data has the offset applied to them, we can calculate from
    // here exactly which items are above us and which ones are below us when we 
    // look at the position of the virtual scrollbar.
    for (let i = 0; i < data.length; i++) {
        for (let j = 0; j < data[i].items.length; j++) {
            let item = data[i].items[j];
            item.original = JSON.parse(JSON.stringify(item));
            item.offset = _(this).request[i].offset + j;
            item.parent = data[i].parent;
        }
    }

    // The response from the server should be in a heirarchical structure.
    // This means that we can iterate over this array, and the further we are in the array
    // the deeper the level we're in. 
    //
    // Eg. [null, 1, 1, 2, 3, 3]
    data.forEach((response) => {
        let index = output.findIndex((obj) => {
            return obj.id === response.parent;
        });

        if (index > -1) {
            // If the parent exists, we insert the items directly below it.
            output = output.slice(0, index + 1)
                        .concat(response.items)
                        .concat(output.slice(index + 1));
        } else {
            // If the parent doesn't exist, we prepend. We prepend because of this scenario:
            //
            //       Item 1.1.1
            //    Item 1.2
            //    Item 1.3
            //    Item 1.4
            // Item 2
            // Item 3
            // 
            // In this scenario, we've expanded Item 1, but because it doesn't exist in the output
            // we can only assume it's directly above us. We've also expanded Item 1.1, and again
            // because it's parent isn't visible, and because we know the data is in a heirarchical 
            // structure, we can prepend it.
            output = response.items.concat(output);
        }
    });


    if (_(this).items.length === 0 || _(this).diffMode === 'hard') {
        // Wipe out all of the current items since we don't need them anymore.
        // Easier code wise to just re-instantiate everything and doesn't impact performance.
        while (_(this).items.length) {
            _(this).items.pop().el.remove();
        }


        // Once we've figured out the output, start rendering them
        output.forEach((data) => {
            let item = createItem.call(this, data);
            _(this).view.content.appendChild(item.el);
            _(this).items.push(item);
        });
    } else if (_(this).diffMode === 'soft') {
        // First check what's common, and run updates.
        // We'll also discover what isn't common and therefore track them for removal.
        let removals = [];
        let updated = [];
        _(this).items.forEach((item, index) => {
            let found = false;
            for (let i = 0; i < output.length; i++) {
                if (output[i].id === item.id) {
                    renderItem.call(this, item.el, output[i], true);
                    updated.push(i);
                    found = true;
                    break;
                }
            } 

            if (!found) {
                removals.push(index);
            }
        });

        // Lock the scroll events and track scroll position.
        // When we're adding and removing items, they can adjust
        // the scroll position. So after we made the updates we
        // need to restore the scroll position.
        let oldScrollTop = _(this).view.scrollbar.scrollTop;
        _(this).scrollLocked = true;

        // Remove the items.
        for (let i = removals.length - 1; i >= 0; i--) {
            let index = removals[i];
            _(this).items[index].el.remove();
            _(this).items.splice(index, 1);
        }

        // Insert all of the new items.
        for (let i = 0; i < output.length; i++) {
            if (updated.indexOf(i) === -1) {
                let item = createItem.call(this, output[i]);
                 _(this).view.content.insertBefore(item.el, _(this).view.content.children[i]);
                 _(this).items.splice(i, 0, item);
            }
        }

        // TODO: This can cause a weird slow scrolling bug in Chrome when scrolling up.
        // Was triggered by console.log, could be a latency issue.
        _(this).view.scrollbar.scrollTop = oldScrollTop;
        _(this).scrollLocked = false;
    }
}
1217277
def specify_data_set(self, x_input, y_input):
        
        self.x = x_input
        self.y = y_input