A row of boxes which can store objects. Accessed by specifying the number of the box you want.
my_lst = [1,2,3,5]
x = my_lst[3]
my_lst.append(7)
y = my_lst[4]
Arrays are fixed-length and store values of a given type.
int[] values = new int[10];
Index to access data stored within the array.
int x = values[4];
Array has fixed length upon creation which cannot be changed.
int l = values.length;
Structure of mutable length that can hold any object (data blob) of declared type.
ArrayList<int> v = new ArrayList<int>();
Method | Action |
---|---|
v.add(obj) | Add obj to the back of the ArrayList |
v.remove(i) | Remove the object at index i, shifting tail left |
v.get(i) | Get the object at index i |
v.set(i, obj) | Set the object at index i to obj |
size() | Return the size of the ArrayList |
ArrayLists are flexible and allow for us to create arrays whose length we don't know ahead of time.
Unfortunately, due to restrictions in Java*, there is a minor performance penalty for accessing them.
*if you're interested, you can look for information on type erasure and generics in Java
Processing offers us specialized versions of ArrayList that only work with a particular type, but do not pay these overheads.
FloatList, IntList, StringList
(These turn out not to be that important for what we're about to do, so I'm mostly putting them here for completeness).
Like ordered collections, but there is no order. ¯\_(ツ)_/¯
You can't ask for a specific element of the collection. You can ask for an arbitrary element or to iterate over it.
Python
s = set([1,2,3,4])
for elem in s:
print(elem)
Java
HashSet<String> set = new HashSet<>();
set.add("Apple");
set.add("Banana");
set.remove("Apple");
System.out.println(set);
Instead of storing things in order, we give each object we want to store a "key", a small piece of data associated with it.
Later, when we want to get the whole object, we can look it up by the key.
999-11-2968
{
"name": "John Doe",
"age": 30,
"email": "johndoe@example.com",
"address": {
"street": "123 Main Street",
"city": "Cityville",
"state": "State",
"postalCode": "12345"
},
"phoneNumbers": [
"+1 555-123-4567",
"+1 555-987-6543"
],
"hobbies": ["Reading", "Hiking", "Cooking"]
}
Key
Value
Dictionary where key is a String
and value is of the specified type.
FloatDict
IntDict
StringDict
Method | Action |
---|---|
d.set("key", value) | Adds the key-value pair to the dict |
d.get("key") | Retrieves the value assigned to key |
d.hasKey("key") | Returns a boolean--whether "key" is in the dictionary or not |
A more flexible key-value store than a Processing dictionary: keys and values can be of any (fixed) type.
import java.util.HashMap;
// Create a new HashMap
HashMap<Integer, Float> map = new HashMap<>();
// Add key-value pairs to the HashMap
map.put(1000, 3.5f);
map.put(2274, 2.8f);
map.put(3896, 4.2f);
// Get the value associated with a key
float value = map.get(2274);
// Check if a key is present in the HashMap
boolean containsKey = map.containsKey(1);
Docs at https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/HashMap.html
import java.util.HashMap;
// Create a new HashMap
HashMap<String, Float> particle1 = new HashMap<>();
particle1.put("x", 0.0);
particle1.put("vx", 0.0);
particle1.put("ax", 1.0);
Particle particle1 = new Particle();
particle1.x = 0.0;
particle1.vx = 0.0;
particle1.ax = 1.0;
When should we create a class for our data versus store data in HashMaps
/Dictionaries
?
Data is stored in files like OBJ, SVG, etc.
We need some way to turn this data into something that can be represented in-memory in the programming language.
Examples:
Input data is stored in files as a single linear stream of data.
It needs to be parsed to be turned into a thing with structure.
Scene(
rotate(90,
translate(2,2, Circle()),
Square(),
),
translate(3,2, Circle()),
)
Before parse
Scene(rotate(90,translate(2,2, Circle()),Square(),),translate(3,2, Circle()),)
After Parse
Scene
Rotate 90
Translate 3,2
Translate 2,2
Circle
Square
Circle
Specific document formats provide a consistent style of storage between programs. This aids parsing both for machines and humans (human parsing often referred to as "reading").
Processing provides support for reading/writing of three document types:
-159.3963,21.97066,"Starbucks: Lihue","Kukui Grove Shoppping Center 3-2600 Kaumualii Hwy; Lihue, HI 96766"
-158.0274,21.34273,"Starbucks: Honolulu","91-1401 Fort Weaver Rd, Ewa Beach; Honolulu, HI 96706; (808) 685- 4594"
-158.012,21.46285,"Starbucks: Mililani","95-221 Kipapa Drive; Mililani, HI 96789; (808) 625- 5401"
-158.0061,21.40369,"Starbucks: Waipahu","94-799 Lumiaina St; Waipahu, HI 96797"
-157.9313,21.37066,"Starbucks: Aiea","4561 Salt Lake Blvd; Aiea, HI"
-157.9148,21.33524,"Starbucks: Honolulu","550 Paiea Street Airport Trade Center; Honolulu, HI 96819"
-157.8615,21.30846,"Starbucks: Honolulu","1000 Bishop Street #104; Honolulu, HI 96813; (808) 599- 4833"
-157.8609,21.30759,"Starbucks: Honolulu","220 South King Street; Honolulu, HI 96813"
-157.8471,21.29308,"Starbucks: Honolulu","Ala Moana Center 1450 Ala Moana Blvd Sears & Macys; Honolulu, HI 96814"
-157.8326,21.27913,"Starbucks: Honolulu","2169 Kalia Road Waikiki; Honolulu, HI 96815"
-157.8294,21.27954,"Starbucks: Honolulu","2222 Kalakaua Avenue; Honolulu, HI 96815"
-157.827,21.28014,"Starbucks: Honolulu","2255 Kuhio Avenue, Suite S-1; Honolulu, HI 96815"
-157.7876,21.27852,"Starbucks: Honolulu","4211 Waialae Avenue; Honolulu, HI 96816; (808) 737- 0283"
-157.7855,21.40587,"Starbucks: Honolulu","45-480 Kaneohe Bay Drive A1E; Honolulu, HI 96744; (808) 234- 6900"
-157.7403,21.39357,"Starbucks: Kailua","539 Kailua Road; Kailua, HI 96734; (808) 263- 9548"
-157.713,21.28201,"Starbucks: Honolulu","6700 Kalanianaole Highway; Honolulu, HI 96825"
-156.6818,20.8832,"Starbucks: Lahaina","1221 Honoapiilani Highway Space A-1; Lahaina, HI 96761"
-156.4742,20.88891,"Starbucks: Kahului","275 West Kaahuman Ave Suite 1200 Space # F-5; Kahului, HI 96732"
-156.4556,20.88118,"Starbucks: Kahului","270 Dairy Road; Kahului, HI 96732; (808) 871- 7884"
-156.4536,20.73723,"Starbucks: Kihei","1819 S. Kihei Rd. Unit D-112; Kihei, HI 96738"
-155.9889,19.64723,"Starbucks: Kailua-Kona","75-1015 Henry St.; Kailua-Kona, HI 96740"
-151.5312,59.64204,"Starbucks: Homer","90 Sterling Hwy; Homer, AK 99603"
-151.0418,60.49444,"Starbucks: Soldotna","44428 Sterling Hwy S; Soldotna, AK 99669"
-149.9093,61.13995,"Starbucks: Anchorage","2000 W Dimond Blvd; Anchorage, AK 99515-1400; (907) 267- 6700"
-149.9055,61.19534,"Starbucks: Anchorage","1650 W Northern Lights Blvd; Anchorage, AK 99503; (907) 339- 0500"
-149.8936,61.21759,"Starbucks: Anchorage","601 West 5th Avenue; Anchorage, AK 99501; (907) 277- 2477"
-149.8643,61.19525,"Starbucks: Anchorage","1000 E Northern Lights Blvd; Anchorage, AK 99508-4283; (907) 264- 9600"
-149.8638,61.14473,"Starbucks: Anchorage","1005 E Dimond Blvd; Anchorage, AK 99515; (907) 344- 4160"
-149.8446,61.13806,"Starbucks: Anchorage","1725 Abbott Rd; Anchorage, AK 99507; (907) 339- 2800"
-149.838,61.13751,"Starbucks: Anchorage","2300 Abbott Road; Anchorage, AK 99507; (907) 365- 2000"
-149.8359,61.18082,"Starbucks: Anchorage","2421 East Tudor Road Suite 8; Anchorage, AK 99507; (907) 561- 1644"
-149.7365,61.19533,"Starbucks: Anchorage","7731 E Northern Lights Blvd; Anchorage, AK 99504; (907) 331- 1700"
-149.5708,61.32361,"Starbucks: Eagle River","11409 Business Blvd; Eagle River, AK 99577; (907) 696- 6400"
-149.5525,61.34592,"Starbucks: Eagle River","13401 Old Glenn Hwy; Eagle River, AK 99577"
-149.1183,61.60094,"Starbucks: Palmer","650 N Cobb St; Palmer, AK 99645; (907) 761- 4200"
-147.8223,64.83696,"Starbucks: Fairbanks","3755 Airport Way; Fairbanks, AK 99709-4610; (907) 474- 1403"
-147.7044,64.85064,"Starbucks: Fairbanks","30 College Rd; Fairbanks, AK 99701; (907) 374- 4100"
-147.6901,64.85222,"Starbucks: Fairbanks","930 Old Steese Hwy A; Fairbanks, AK 99701; (907) 459- 4629"
-131.6808,55.35173,"Starbucks: Ketchikan","2417 Tongass Ave; Ketchikan, AK 99901; (907) 228- 1900"
-124.29016,42.05413,"Starbucks: Brookings","325 5th St; Brookings, OR 97415; (541) 469- 1610"
-124.1678,40.80166,"Starbucks: Eureka","326 5th Street; Eureka, CA 95501; (707) 445- 2685"
-124.1475,40.79906,"Starbucks: Eureka","1117 Myrtle Avenue A; Eureka, CA 95501; (707) 445- 2672"
-124.1443,40.80484,"Starbucks: Eureka","2525 4th St; Eureka, CA 95501"
-124.101,40.94024,"Starbucks: McKinleyville","1924 Central Ave.; McKinleyville, CA 95519; (707) 840- 0253"
-124.0531,44.63727,"Starbucks: Newport","122 N. Coast Highway; Newport, OR 97365; (541) 265- 8610"
-124.0521,44.65194,"Starbucks: Newport","150 NE 20th St; Newport, OR 97365; (541) 265- 4581"
-124.0212,44.94205,"Starbucks: Lincoln City","3350 N E HWY 101; Lincoln City, OR 97367; (541) 994- 3365"
-123.9282,46.13409,"Starbucks: Warrenton","695 Highway 101; Warrenton, OR 97146"
-123.8185,46.97266,"Starbucks: Aberdeen","221 W Heron St; Aberdeen, WA 98520; (360) 533- 1955"
-123.8073,46.19201,"Starbucks: Astoria","3250 Lief Erikson Drive; Astoria, OR 97103"
-123.8033,46.9778,"Starbucks: Aberdeen","1202 E. Wishkah St.; Aberdeen, WA 98520; (360) 532- 0349"
-123.4353,48.11716,"Starbucks: Port Angeles","110 E 3rd St; Port Angeles, WA 98362; (360) 457- 0788"
-123.3691,43.23858,"Starbucks: Roseburg","3013 NW Stewart Pkwy; Roseburg, OR 97470; (541) 672- 8294"
-123.3502,43.22848,"Starbucks: Roseburg","1539 NE Stephens; Roseburg, OR 97470; (541) 957- 2540"
-123.3133,44.92958,"Starbucks: Dallas","138 W Ellendale Ave; Dallas, OR 97338; (503) 831- 6000"
-123.3117,44.55088,"Starbucks: Corvallis","5270 SW Philomath Blvd; Corvallis, OR 97333; (541) 738- 2100"
-123.3096,44.92975,"Starbucks: Dallas","244 E Ellendale Ave 1; Dallas, OR 97338; (503) 623- 5231"
-123.2763,44.58989,"Starbucks: Corvallis","2305 NW Kings Blvd; Corvallis, OR 97330; (541) 758-4069"
-123.2752,44.57515,"Starbucks: Corvallis","777 Kings Blvd; Corvallis, OR 97330-5620; (541) 754- 5559"
-123.2629,44.5637,"Starbucks: Corvallis","425 Southwest Madison Avenue; Corvallis, OR 97333; (541) 753- 5318"
-123.2578,44.58364,"Starbucks: Corvallis","1705 NW 9th Street Suite B; Corvallis, OR 97330; (541) 738- 1172"
-123.2518,44.5888,"Starbucks: Corvallis","590 NE Circle Blvd; Corvallis, OR 97330"
-123.2067,39.14441,"Starbucks: Ukiah","653 S State St; Ukiah, CA 94582; (707) 467- 2700"
-123.2008,39.15095,"Starbucks: Ukiah","504 E. Perkins; Ukiah, CA 95482; (707) 462- 3847"
-123.1981,39.15154,"Starbucks: Ukiah","704 E. Perkins Street; Ukiah, CA 94582; (707) 463- 2615"
-123.179,44.07006,"Starbucks: Eugene","4740 Royal Ave; Eugene, OR 97402; (541) 688- 6497"
-123.1733,45.22856,"Starbucks: McMinnville","2490 N Hwy 99; McMinnville, OR 97225; (503) 435- 3120"
-123.1423,44.04821,"Starbucks: Eugene","3333 W 11th Ave; Eugene, OR 97402; (541) 484- 4223"
-123.118,44.04059,"Starbucks: Eugene","1675 W. 18th & Chambers; Eugene, OR 97402; (541) 485- 7027"
-123.103,44.0691,"Starbucks: Eugene","1079A Valley River Way; Eugene, OR 97401; (541) 683- 7474"
-123.0999,44.05219,"Starbucks: Eugene","472 West 7th Avenue Suite 1; Eugene, OR 97401; (541) 684- 0984"
-123.0979,44.09435,"Starbucks: Eugene","3003 N Delta Hwy 301; Eugene, OR 97408; (541) 338- 0233"
-123.0952,45.52007,"Starbucks: Forest Grove","2836 Pacific Ave; Forest Grove, OR 97116; (503) 359- 8700"
-123.0903,44.04033,"Starbucks: Eugene","145 East 18th St; Eugene, OR 97401; (541) 485- 3664"
-123.0897,44.04991,"Starbucks: Eugene","901 Pearl Street; Eugene, OR 97401; (541) 338- 7951"
-123.0896,44.04025,"Starbucks: Eugene","205 E. 18th Street; Eugene, OR 97401; (541) 465- 9813"
-123.0811,44.62893,"Starbucks: Albany","1990 14th Ave SE; Albany, OR 97321; (541) 812- 2380"
-123.0785,44.04556,"Starbucks: Eugene","801 E. 13th Avenue; Eugene, OR 97403; (541) 338-4100"
-123.0785,44.0709,"Starbucks: Eugene","65 Oakway Center; Eugene, OR 97401; (541) 345-9272"
-123.0757,44.63245,"Starbucks: Albany","2532 Santiam Hwy; Albany, OR 97321; (541) 812- 2221"
-123.0731,44.06603,"Starbucks: Eugene","311 Coburg Rd; Eugene, OR 97401-6109"
-123.0625,44.9385,"Starbucks: Salem","1455 Edgewater St NW; Salem, OR 97304"
-123.0486,45.52002,"Starbucks: Cornelias","1882 East Baseline Street; Cornelias, OR 97113; (503) 357- 6858"
-123.043,44.90662,"Starbucks: Salem","3405 Commercial St NE s-100; Salem, OR 97302; (503) 391-7193"
-123.0424,44.90576,"Starbucks: Salem","3450 Commercial St SE; Salem, OR 97302-4682"
-123.0383,44.94117,"Starbucks: Salem","399 Court Street NE; Salem, OR 97308; (503) 375-2156"
-123.0314,44.96436,"Starbucks: Salem","2505 Liberty St. NE 100; Salem, OR 97303; (503) 566- 6885"
-123.031,44.88303,"Starbucks: Salem","5660 Commercial St SE; Salem, OR 97302"
-123.0195,44.9918,"Starbucks: Keizer","6450 NE Keizer Station Blvd; Keizer, OR 97303"
-122.9898,45.52261,"Starbucks: Hillsboro","102 E. Main St.; Hillsboro, OR 97123; (503) 846- 9299"
-122.9834,44.94441,"Starbucks: Salem","1134 Lancaster Drive NE; Salem, OR 97301; (503) 375- 3606"
-122.9832,44.94187,"Starbucks: Salem","831 Lancaster Dr NE #103; Salem, OR 97301; (503) 763- 2807"
-122.9809,46.72892,"Starbucks: Centralia","1161 Harrison Ave.; Centralia, WA 98531; (360) 807- 8801"
-122.9782,46.67444,"Starbucks: Chehalis","1531 NW Louisiana Ave; Chehalis, WA 98532; (360) 740- 9140"
-122.9661,46.14793,"Starbucks: Longview","3184 Ocean Beach Hwy; Longview, WA 98632; (360) 636- 1010"
-122.9591,46.14731,"Starbucks: Longview","2930 Ocean Beach Hwy; Longview, WA 98632; (360) 575- 6240"
-122.9553,45.52896,"Starbucks: Hillsboro","888 NE 25th Ave; Hillsboro, OR 97124; (503) 681- 8927"
-122.9461,47.04709,"Starbucks: Olympia","3215 Harrison Ave; Olympia, WA 98502"
-122.9369,47.03371,"Starbucks: Olympia","1313 Cooper Point Road; Olympia, WA 98502; (360) 352-8515"
-122.9365,45.51987,"Starbucks: Hillsboro","7500 W. Baseline; Hillsboro, OR 97123; (503) 591- 7557"
-122.9364,46.1367,"Starbucks: Longview","1227 15th Ave; Longview, WA 98632; (360) 575- 6600"
-122.9322,40.727,"Starbucks: Weaverville","1301 Main Street; Weaverville, CA 96093"
-122.9291,47.04193,"Starbucks: Olympia","625 Black Lake Boulevard Suite 165; Olympia, WA 98502; (360) 754- 0121"
-122.9165,45.53413,"Starbucks: Hillsboro","6221 NE Cornell Rd; Hillsboro, OR 97124; (503) 640- 0740"
-122.916,46.99979,"Starbucks: Tumwater","5312 Little Rock Road SW; Tumwater, WA 98512; (360) 352- 4340"
-122.9092,46.99991,"Starbucks: Tumwater","555 Trosper Rd SW; Tumwater, WA 98501"
-122.9058,45.4978,"Starbucks: Tualatin","6495 SE Tualatin Valley Hwy; Tualatin, OR 97123; (503) 848- 4550"
-122.903,45.55019,"Starbucks: Hillsboro","22075 NW Imbrie Dr.; Hillsboro, OR 97229; (503) 747- 1100"
-122.903,46.13916,"Starbucks: Kelso","411 Three Rivers Drive; Kelso, WA 98626"
-122.8988,47.01853,"Starbucks: Tumwater","520 Cleveland; Tumwater, WA 98501"
-122.88264,45.15287,"Starbucks: Woodburn","111 Arney Road NE A; Woodburn, OR 97071; (503) 981- 1758"
-122.87837,42.34523,"Starbucks - Inside Rogue Valley Mall","1600 North Riverside Avenue; Medford, OR 97501"
surname,percent,cumulative percent,rank
SMITH,1.006,1.006,1
JOHNSON,0.810,1.816,2
WILLIAMS,0.699,2.515,3
JONES,0.621,3.136,4
BROWN,0.621,3.757,5
DAVIS,0.480,4.237,6
MILLER,0.424,4.660,7
WILSON,0.339,5.000,8
MOORE,0.312,5.312,9
TAYLOR,0.311,5.623,10
ANDERSON,0.311,5.934,11
THOMAS,0.311,6.245,12
JACKSON,0.310,6.554,13
WHITE,0.279,6.834,14
HARRIS,0.275,7.109,15
MARTIN,0.273,7.382,16
THOMPSON,0.269,7.651,17
GARCIA,0.254,7.905,18
MARTINEZ,0.234,8.140,19
ROBINSON,0.233,8.372,20
CLARK,0.231,8.603,21
RODRIGUEZ,0.229,8.832,22
LEWIS,0.226,9.058,23
LEE,0.220,9.278,24
WALKER,0.219,9.497,25
HALL,0.200,9.698,26
ALLEN,0.199,9.897,27
YOUNG,0.193,10.090,28
Data comes in rectangles!
–Rob Tibshirani
Table tbl = loadTable(filename, options);
Generates a Table
object.
Options are strings separated by commas.
Tables
Table
s are made of TableRow
s. We can get the number of rows/columns with getRowCount()
and getColumnCount()
.
We can get the i-th row with getRow(i)
or all rows with rows()
.
I highly recommend scanning the Table docs in Processing.
TableRow
sTableRow
s support several methods: getInt()
, getFloat()
, and getString()
.
These support two types of arguments:
getThing(int)
: gets the appropriate indexgetThing("name")
: gets the appropriate column name (based on the CSV header)
If the data to be retrieved does not exist, or if it's of the wrong type, you'll get an error.
for (TableRow r : t.rows()) {
String id = r.getString(“object”);
float x = r.getFloat(“x”);
float y = r.getFloat(“y”);
}
<element>
<item>First item</item>
<item>Second item</item>
</element>
Opening tag
Closing tag
Element
(always slash + opening tag)
The rules of XML only apply to the structuring of the content:
There are no predefined tags in XML. They can be called whatever you want!
Makes it very easy to write whatever data format you want...and can make it a pain to read in an arbitrary XML file.
loadXML(filename)
to read in a file as an XML tree
XML
object with all children objectsgetChildren(name)
to get an array of XML objects that are the children of the tag with name "name".getContent()
to return all content within the elementgetInt()
, getFloat()
, and getString()
to return attributes within an element.Table
, ArrayList
or a FloatList
.Please include your CSV with the submission.
CSV is great for when data is flat and uniform.
Scene(
rotate(90,
translate(2,2, Circle()),
Square(),
),
translate(3,2, Circle()),
)
A notation for attribute-value pairs. Designed to represent the JavaScript object model (hence the name).
Four basic types for data:
Two aggregate types of data:
{
"name": "Max",
"breed": "Labrador Retriever",
"age": 5,
"weight": 25.7,
"isFriendly": true,
}
[
"a",
true,
3,
4,
false,
]
{
key1: value1,
key2: value2,
...
}
[
value1,
value2,
...
]
JSON Object
{key: value}
JSON Array
[value1, value2, ...]
{
"name": "Max",
"breed": "Labrador Retriever",
"age": 5,
"weight": 25.7,
"isFriendly": true,
"owner": {
"name": "John Smith",
"email": "johnsmith@example.com"
},
"vaccinations": [
"Rabies",
"Distemper",
"Parvovirus"
]
}
[
{
"name": "Max",
"breed": "Labrador Retriever",
"age": 5,
"weight": 25.7,
"isFriendly": true
},
{
"name": "Charlie",
"breed": "German Shepherd",
"age": 4,
"weight": 30.2,
"isFriendly": false
}
]
Scene(
rotate(90,
translate(2,2, Circle()),
Square(),
),
translate(3,2, Circle()),
)
[
"rotate": {
"degrees": 90,
"elements":[
{
"translate":{
"pos": [2, 2],
"elements": [
{"shape": "circle"}
],
}
},
{"shape": "square"}
]
},
"translate": {
"pos": [3, 2],
"elements": [
{"shape": "circle"}
]
}
]
{ "city" : "AGAWAM", "loc" : [ -72.622739, 42.070206 ], "pop" : 15338, "state" : "MA", "_id" : "01001" }
{ "city" : "CUSHMAN", "loc" : [ -72.51564999999999, 42.377017 ], "pop" : 36963, "state" : "MA", "_id" : "01002" }
{ "city" : "BARRE", "loc" : [ -72.10835400000001, 42.409698 ], "pop" : 4546, "state" : "MA", "_id" : "01005" }
{ "city" : "BELCHERTOWN", "loc" : [ -72.41095300000001, 42.275103 ], "pop" : 10579, "state" : "MA", "_id" : "01007" }
{ "city" : "BLANDFORD", "loc" : [ -72.936114, 42.182949 ], "pop" : 1240, "state" : "MA", "_id" : "01008" }
{ "city" : "BRIMFIELD", "loc" : [ -72.188455, 42.116543 ], "pop" : 3706, "state" : "MA", "_id" : "01010" }
{ "city" : "CHESTER", "loc" : [ -72.988761, 42.279421 ], "pop" : 1688, "state" : "MA", "_id" : "01011" }
{ "city" : "CHESTERFIELD", "loc" : [ -72.833309, 42.38167 ], "pop" : 177, "state" : "MA", "_id" : "01012" }
{ "city" : "CHICOPEE", "loc" : [ -72.607962, 42.162046 ], "pop" : 23396, "state" : "MA", "_id" : "01013" }
{ "city" : "CHICOPEE", "loc" : [ -72.576142, 42.176443 ], "pop" : 31495, "state" : "MA", "_id" : "01020" }
{ "city" : "WESTOVER AFB", "loc" : [ -72.558657, 42.196672 ], "pop" : 1764, "state" : "MA", "_id" : "01022" }
{ "city" : "CUMMINGTON", "loc" : [ -72.905767, 42.435296 ], "pop" : 1484, "state" : "MA", "_id" : "01026" }
{ "city" : "MOUNT TOM", "loc" : [ -72.67992099999999, 42.264319 ], "pop" : 16864, "state" : "MA", "_id" : "01027" }
{ "city" : "EAST LONGMEADOW", "loc" : [ -72.505565, 42.067203 ], "pop" : 13367, "state" : "MA", "_id" : "01028" }
{ "city" : "FEEDING HILLS", "loc" : [ -72.675077, 42.07182 ], "pop" : 11985, "state" : "MA", "_id" : "01030" }
{ "city" : "GILBERTVILLE", "loc" : [ -72.19858499999999, 42.332194 ], "pop" : 2385, "state" : "MA", "_id" : "01031" }
{ "city" : "GOSHEN", "loc" : [ -72.844092, 42.466234 ], "pop" : 122, "state" : "MA", "_id" : "01032" }
{ "city" : "GRANBY", "loc" : [ -72.52000099999999, 42.255704 ], "pop" : 5526, "state" : "MA", "_id" : "01033" }
{ "city" : "TOLLAND", "loc" : [ -72.908793, 42.070234 ], "pop" : 1652, "state" : "MA", "_id" : "01034" }
{ "city" : "HADLEY", "loc" : [ -72.571499, 42.36062 ], "pop" : 4231, "state" : "MA", "_id" : "01035" }
{ "city" : "HAMPDEN", "loc" : [ -72.43182299999999, 42.064756 ], "pop" : 4709, "state" : "MA", "_id" : "01036" }
{ "city" : "HATFIELD", "loc" : [ -72.61673500000001, 42.38439 ], "pop" : 3184, "state" : "MA", "_id" : "01038" }
{ "city" : "HAYDENVILLE", "loc" : [ -72.70317799999999, 42.381799 ], "pop" : 1387, "state" : "MA", "_id" : "01039" }
{ "city" : "HOLYOKE", "loc" : [ -72.626193, 42.202007 ], "pop" : 43704, "state" : "MA", "_id" : "01040" }
{ "city" : "HUNTINGTON", "loc" : [ -72.873341, 42.265301 ], "pop" : 2084, "state" : "MA", "_id" : "01050" }
{ "city" : "LEEDS", "loc" : [ -72.70340299999999, 42.354292 ], "pop" : 1350, "state" : "MA", "_id" : "01053" }
{ "city" : "LEVERETT", "loc" : [ -72.499334, 42.46823 ], "pop" : 1748, "state" : "MA", "_id" : "01054" }
{ "city" : "LUDLOW", "loc" : [ -72.471012, 42.172823 ], "pop" : 18820, "state" : "MA", "_id" : "01056" }
{ "city" : "MONSON", "loc" : [ -72.31963399999999, 42.101017 ], "pop" : 8194, "state" : "MA", "_id" : "01057" }
{ "city" : "FLORENCE", "loc" : [ -72.654245, 42.324662 ], "pop" : 27939, "state" : "MA", "_id" : "01060" }
{ "city" : "OAKHAM", "loc" : [ -72.051265, 42.348033 ], "pop" : 1503, "state" : "MA", "_id" : "01068" }
{ "city" : "PALMER", "loc" : [ -72.328785, 42.176233 ], "pop" : 9778, "state" : "MA", "_id" : "01069" }
{ "city" : "PLAINFIELD", "loc" : [ -72.918289, 42.514393 ], "pop" : 571, "state" : "MA", "_id" : "01070" }
{ "city" : "RUSSELL", "loc" : [ -72.840343, 42.147063 ], "pop" : 608, "state" : "MA", "_id" : "01071" }
{ "city" : "SHUTESBURY", "loc" : [ -72.421342, 42.481968 ], "pop" : 1533, "state" : "MA", "_id" : "01072" }
{ "city" : "SOUTHAMPTON", "loc" : [ -72.719381, 42.224697 ], "pop" : 4478, "state" : "MA", "_id" : "01073" }
{ "city" : "SOUTH HADLEY", "loc" : [ -72.581137, 42.237537 ], "pop" : 16699, "state" : "MA", "_id" : "01075" }
{ "city" : "SOUTHWICK", "loc" : [ -72.770588, 42.051099 ], "pop" : 7667, "state" : "MA", "_id" : "01077" }
{ "city" : "THREE RIVERS", "loc" : [ -72.362352, 42.181894 ], "pop" : 2425, "state" : "MA", "_id" : "01080" }
{ "city" : "WALES", "loc" : [ -72.20459200000001, 42.062734 ], "pop" : 1732, "state" : "MA", "_id" : "01081" }
{ "city" : "WARE", "loc" : [ -72.258285, 42.261831 ], "pop" : 9808, "state" : "MA", "_id" : "01082" }
{ "city" : "MONTGOMERY", "loc" : [ -72.754318, 42.129484 ], "pop" : 40117, "state" : "MA", "_id" : "01085" }
{ "city" : "WEST SPRINGFIELD", "loc" : [ -72.641109, 42.115066 ], "pop" : 27537, "state" : "MA", "_id" : "01089" }
{ "city" : "WEST WARREN", "loc" : [ -72.203639, 42.20734 ], "pop" : 4441, "state" : "MA", "_id" : "01092" }
{ "city" : "WILBRAHAM", "loc" : [ -72.446415, 42.124506 ], "pop" : 12635, "state" : "MA", "_id" : "01095" }
{ "city" : "WILLIAMSBURG", "loc" : [ -72.77798900000001, 42.408522 ], "pop" : 2295, "state" : "MA", "_id" : "01096" }
{ "city" : "WORTHINGTON", "loc" : [ -72.931427, 42.384293 ], "pop" : 877, "state" : "MA", "_id" : "01098" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.588735, 42.1029 ], "pop" : 2323, "state" : "MA", "_id" : "01103" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.577769, 42.128848 ], "pop" : 22115, "state" : "MA", "_id" : "01104" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.578312, 42.099931 ], "pop" : 14970, "state" : "MA", "_id" : "01105" }
{ "city" : "LONGMEADOW", "loc" : [ -72.5676, 42.050658 ], "pop" : 15688, "state" : "MA", "_id" : "01106" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.606544, 42.117907 ], "pop" : 12739, "state" : "MA", "_id" : "01107" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.558432, 42.085314 ], "pop" : 25519, "state" : "MA", "_id" : "01108" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.554349, 42.114455 ], "pop" : 32635, "state" : "MA", "_id" : "01109" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.527445, 42.092937 ], "pop" : 14618, "state" : "MA", "_id" : "01118" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.51211000000001, 42.12473 ], "pop" : 13040, "state" : "MA", "_id" : "01119" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.48890299999999, 42.094397 ], "pop" : 3272, "state" : "MA", "_id" : "01128" }
{ "city" : "SPRINGFIELD", "loc" : [ -72.487622, 42.122263 ], "pop" : 6831, "state" : "MA", "_id" : "01129" }
{ "city" : "INDIAN ORCHARD", "loc" : [ -72.505048, 42.153225 ], "pop" : 8702, "state" : "MA", "_id" : "01151" }
{ "city" : "PITTSFIELD", "loc" : [ -73.24708800000001, 42.453086 ], "pop" : 50655, "state" : "MA", "_id" : "01201" }
{ "city" : "ADAMS", "loc" : [ -73.117225, 42.622319 ], "pop" : 9901, "state" : "MA", "_id" : "01220" }
{ "city" : "ASHLEY FALLS", "loc" : [ -73.320195, 42.059552 ], "pop" : 561, "state" : "MA", "_id" : "01222" }
{ "city" : "BECKET", "loc" : [ -73.12032499999999, 42.359363 ], "pop" : 1070, "state" : "MA", "_id" : "01223" }
{ "city" : "CHESHIRE", "loc" : [ -73.15796400000001, 42.561059 ], "pop" : 3094, "state" : "MA", "_id" : "01225" }
{ "city" : "DALTON", "loc" : [ -73.160259, 42.475046 ], "pop" : 7357, "state" : "MA", "_id" : "01226" }
{ "city" : "GREAT BARRINGTON", "loc" : [ -73.36065000000001, 42.195922 ], "pop" : 10603, "state" : "MA", "_id" : "01230" }
{ "city" : "PERU", "loc" : [ -73.092433, 42.434604 ], "pop" : 2559, "state" : "MA", "_id" : "01235" }
{ "city" : "HOUSATONIC", "loc" : [ -73.374544, 42.265296 ], "pop" : 802, "state" : "MA", "_id" : "01236" }
{ "city" : "HANCOCK", "loc" : [ -73.24873700000001, 42.541961 ], "pop" : 2328, "state" : "MA", "_id" : "01237" }
{ "city" : "LEE", "loc" : [ -73.231696, 42.298994 ], "pop" : 6916, "state" : "MA", "_id" : "01238" }
{ "city" : "LENOX", "loc" : [ -73.271322, 42.364241 ], "pop" : 5001, "state" : "MA", "_id" : "01240" }
{ "city" : "MIDDLEFIELD", "loc" : [ -73.006226, 42.34795 ], "pop" : 384, "state" : "MA", "_id" : "01243" }
{ "city" : "WEST OTIS", "loc" : [ -73.213452, 42.187847 ], "pop" : 329, "state" : "MA", "_id" : "01245" }
{ "city" : "CLARKSBURG", "loc" : [ -73.10999, 42.69865 ], "pop" : 19054, "state" : "MA", "_id" : "01247" }
{ "city" : "OTIS", "loc" : [ -73.082093, 42.18988 ], "pop" : 1060, "state" : "MA", "_id" : "01253" }
{ "city" : "RICHMOND", "loc" : [ -73.364457, 42.378398 ], "pop" : 1134, "state" : "MA", "_id" : "01254" }
{ "city" : "SANDISFIELD", "loc" : [ -73.116285, 42.109429 ], "pop" : 651, "state" : "MA", "_id" : "01255" }
{ "city" : "SAVOY", "loc" : [ -73.023281, 42.576964 ], "pop" : 632, "state" : "MA", "_id" : "01256" }
{ "city" : "SHEFFIELD", "loc" : [ -73.361091, 42.100102 ], "pop" : 1839, "state" : "MA", "_id" : "01257" }
{ "city" : "SOUTH EGREMONT", "loc" : [ -73.456575, 42.101153 ], "pop" : 135, "state" : "MA", "_id" : "01258" }
{ "city" : "SOUTHFIELD", "loc" : [ -73.26093299999999, 42.078014 ], "pop" : 622, "state" : "MA", "_id" : "01259" }
{ "city" : "STOCKBRIDGE", "loc" : [ -73.32226300000001, 42.30104 ], "pop" : 2200, "state" : "MA", "_id" : "01262" }
{ "city" : "WEST STOCKBRIDGE", "loc" : [ -73.38251, 42.334752 ], "pop" : 1173, "state" : "MA", "_id" : "01266" }
{ "city" : "WILLIAMSTOWN", "loc" : [ -73.20363999999999, 42.708883 ], "pop" : 8220, "state" : "MA", "_id" : "01267" }
{ "city" : "WINDSOR", "loc" : [ -73.04661, 42.509494 ], "pop" : 770, "state" : "MA", "_id" : "01270" }
{ "city" : "LEYDEN", "loc" : [ -72.60184700000001, 42.601222 ], "pop" : 18968, "state" : "MA", "_id" : "01301" }
{ "city" : "ASHFIELD", "loc" : [ -72.810998, 42.523207 ], "pop" : 1535, "state" : "MA", "_id" : "01330" }
{ "city" : "NEW SALEM", "loc" : [ -72.21464400000001, 42.592065 ], "pop" : 14077, "state" : "MA", "_id" : "01331" }
{ "city" : "LEYDEN", "loc" : [ -72.563439, 42.683784 ], "pop" : 2426, "state" : "MA", "_id" : "01337" }
{ "city" : "BUCKLAND", "loc" : [ -72.764124, 42.615174 ], "pop" : 16, "state" : "MA", "_id" : "01338" }
{ "city" : "HAWLEY", "loc" : [ -72.880162, 42.621802 ], "pop" : 1325, "state" : "MA", "_id" : "01339" }
{ "city" : "COLRAIN", "loc" : [ -72.726508, 42.67905 ], "pop" : 2050, "state" : "MA", "_id" : "01340" }
{ "city" : "CONWAY", "loc" : [ -72.702473, 42.513832 ], "pop" : 1524, "state" : "MA", "_id" : "01341" }
{ "city" : "DEERFIELD", "loc" : [ -72.60723400000001, 42.54063
{ "_id" : { "$oid" : "52cdef7c4bab8bd675297d8a" }, "name" : "Wetpaint", "permalink" : "abc2", "crunchbase_url" : "http://www.crunchbase.com/company/wetpaint", "homepage_url" : "http://wetpaint-inc.com", "blog_url" : "http://digitalquarters.net/", "blog_feed_url" : "http://digitalquarters.net/feed/", "twitter_username" : "BachelrWetpaint", "category_code" : "web", "number_of_employees" : 47, "founded_year" : 2005, "founded_month" : 10, "founded_day" : 17, "deadpooled_year" : 1, "tag_list" : "wiki, seattle, elowitz, media-industry, media-platform, social-distribution-system", "alias_list" : "", "email_address" : "info@wetpaint.com", "phone_number" : "206.859.6300", "description" : "Technology Platform Company", "created_at" : { "$date" : 1180075887000 }, "updated_at" : "Sun Dec 08 07:15:44 UTC 2013", "overview" : "<p>Wetpaint is a technology platform company that uses its proprietary state-of-the-art technology and expertise in social media to build and monetize audiences for digital publishers. Wetpaint’s own online property, Wetpaint Entertainment, an entertainment news site that attracts more than 12 million unique visitors monthly and has over 2 million Facebook fans, is a proof point to the company’s success in building and engaging audiences. Media companies can license Wetpaint’s platform which includes a dynamic playbook tailored to their individual needs and comprehensive training. Founded by Internet pioneer Ben Elowitz, and with offices in New York and Seattle, Wetpaint is backed by Accel Partners, the investors behind Facebook.</p>", "image" : { "available_sizes" : [ [ [ 150, 75 ], "assets/images/resized/0000/3604/3604v14-max-150x150.jpg" ], [ [ 250, 125 ], "assets/images/resized/0000/3604/3604v14-max-250x250.jpg" ], [ [ 450, 225 ], "assets/images/resized/0000/3604/3604v14-max-450x450.jpg" ] ] }, "products" : [ { "name" : "Wikison Wetpaint", "permalink" : "wetpaint-wiki" }, { "name" : "Wetpaint Social Distribution System", "permalink" : "wetpaint-social-distribution-system" } ], "relationships" : [ { "is_past" : false, "title" : "Co-Founder and VP, Social and Audience Development", "person" : { "first_name" : "Michael", "last_name" : "Howell", "permalink" : "michael-howell" } }, { "is_past" : false, "title" : "Co-Founder/CEO/Board of Directors", "person" : { "first_name" : "Ben", "last_name" : "Elowitz", "permalink" : "ben-elowitz" } }, { "is_past" : false, "title" : "COO/Board of Directors", "person" : { "first_name" : "Rob", "last_name" : "Grady", "permalink" : "rob-grady" } }, { "is_past" : false, "title" : "SVP, Strategy and Business Development", "person" : { "first_name" : "Chris", "last_name" : "Kollas", "permalink" : "chris-kollas" } }, { "is_past" : false, "title" : "Board", "person" : { "first_name" : "Theresia", "last_name" : "Ranzetta", "permalink" : "theresia-ranzetta" } }, { "is_past" : false, "title" : "Board Member", "person" : { "first_name" : "Gus", "last_name" : "Tai", "permalink" : "gus-tai" } }, { "is_past" : false, "title" : "Board", "person" : { "first_name" : "Len", "last_name" : "Jordan", "permalink" : "len-jordan" } }, { "is_past" : false, "title" : "Head of Technology and Product", "person" : { "first_name" : "Alex", "last_name" : "Weinstein", "permalink" : "alex-weinstein" } }, { "is_past" : true, "title" : "CFO", "person" : { "first_name" : "Bert", "last_name" : "Hogue", "permalink" : "bert-hogue" } }, { "is_past" : true, "title" : "CFO/ CRO", "person" : { "first_name" : "Brian", "last_name" : "Watkins", "permalink" : "brian-watkins" } }, { "is_past" : true, "title" : "Senior Vice President, Marketing", "person" : { "first_name" : "Rob", "last_name" : "Grady", "permalink" : "rob-grady" } }, { "is_past" : true, "title" : "VP, Technology and Product", "person" : { "first_name" : "Werner", "last_name" : "Koepf", "permalink" : "werner-koepf" } }, { "is_past" : true, "title" : "VP Marketing", "person" : { "first_name" : "Kevin", "last_name" : "Flaherty", "permalink" : "kevin-flaherty" } }, { "is_past" : true, "title" : "VP User Experience", "person" : { "first_name" : "Alex", "last_name" : "Berg", "permalink" : "alex-berg" } }, { "is_past" : true, "title" : "VP Engineering", "person" : { "first_name" : "Steve", "last_name" : "McQuade", "permalink" : "steve-mcquade" } }, { "is_past" : true, "title" : "Executive Editor", "person" : { "first_name" : "Susan", "last_name" : "Mulcahy", "permalink" : "susan-mulcahy" } }, { "is_past" : true, "title" : "VP Business Development", "person" : { "first_name" : "Chris", "last_name" : "Kollas", "permalink" : "chris-kollas" } } ], "competitions" : [ { "competitor" : { "name" : "Wikia", "permalink" : "wikia" } }, { "competitor" : { "name" : "JotSpot", "permalink" : "jotspot" } }, { "competitor" : { "name" : "Socialtext", "permalink" : "socialtext" } }, { "competitor" : { "name" : "Ning by Glam Media", "permalink" : "ning" } }, { "competitor" : { "name" : "Soceeo", "permalink" : "soceeo" } }, { "competitor" : { "name" : "Yola", "permalink" : "yola" } }, { "competitor" : { "name" : "SocialGO", "permalink" : "socialgo" } }, { "competitor" : { "name" : "IslamNor", "permalink" : "islamnor" } } ], "providerships" : [], "total_money_raised" : "$39.8M", "funding_rounds" : [ { "id" : 888, "round_code" : "a", "source_url" : "http://seattlepi.nwsource.com/business/246734_wiki02.html", "source_description" : "", "raised_amount" : 5250000, "raised_currency_code" : "USD", "funded_year" : 2005, "funded_month" : 10, "funded_day" : 1, "investments" : [ { "company" : null, "financial_org" : { "name" : "Frazier Technology Ventures", "permalink" : "frazier-technology-ventures" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Trinity Ventures", "permalink" : "trinity-ventures" }, "person" : null } ] }, { "id" : 889, "round_code" : "b", "source_url" : "http://pulse2.com/2007/01/09/wiki-builder-website-wetpaint-welcomes-95m-funding/", "source_description" : "", "raised_amount" : 9500000, "raised_currency_code" : "USD", "funded_year" : 2007, "funded_month" : 1, "funded_day" : 1, "investments" : [ { "company" : null, "financial_org" : { "name" : "Accel Partners", "permalink" : "accel-partners" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Frazier Technology Ventures", "permalink" : "frazier-technology-ventures" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Trinity Ventures", "permalink" : "trinity-ventures" }, "person" : null } ] }, { "id" : 2312, "round_code" : "c", "source_url" : "http://www.accel.com/news/news_one_up.php?news_id=185", "source_description" : "Accel", "raised_amount" : 25000000, "raised_currency_code" : "USD", "funded_year" : 2008, "funded_month" : 5, "funded_day" : 19, "investments" : [ { "company" : null, "financial_org" : { "name" : "DAG Ventures", "permalink" : "dag-ventures" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Accel Partners", "permalink" : "accel-partners" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Trinity Ventures", "permalink" : "trinity-ventures" }, "person" : null }, { "company" : null, "financial_org" : { "name" : "Frazier Technology Ventures", "permalink" : "frazier-technology-ventures" }, "person" : null } ] } ], "investments" : [], "acquisition" : { "price_amount" : 30000000, "price_currency_code" : "USD", "term_code" : "cash_and_stock", "source_url" : "http://allthingsd.com/20131216/viggle-tries-to-bulk-up-its-social-tv-business-by-buying-wetpaint/?mod=atdtweet", "source_description" : " Viggle Tries to Bulk Up Its Social TV Business by Buying Wetpaint", "acquired_year" : 2013, "acquired_month" : 12, "acquired_day" : 16, "acquiring_company" : { "name" : "Viggle", "permalink" : "viggle" } }, "acquisitions" : [], "offices" : [ { "description" : "", "address1" : "710 - 2nd Avenue", "address2" : "Suite 1100", "zip_code" : "98104", "city" : "Seattle", "state_code" : "WA", "country_code" : "USA", "latitude" : 47.603122, "longitude" : -122.333253 }, { "description" : "", "address1" : "270 Lafayette Street", "address2" : "Suite 505", "zip_code" : "10012", "city" : "New York", "state_code" : "NY", "country_code" : "USA", "latitude" : 40.7237306, "longitude" : -73.9964312 } ], "milestones" : [ { "id" : 5869, "description" : "Wetpaint named in Lead411's Hottest Seattle Companies list", "stoned_year" : 2010, "stoned_month" : 6, "stoned_day" : 8, "source_url" : "http://www.lead411.com/seattle-companies.html", "source_text" : null, "source_description" : "LEAD411 LAUNCHES \"HOTTEST SEATTLE COMPANIES\" AWARDS", "stoneable_type" : "Company", "stoned_value" : null, "stoned_value_type" : null, "stoned_acquirer" : null, "stoneable" : { "name" : "Wetpaint", "permalink" : "wetpaint" } }, { "id" : 8702, "description" : "Site-Builder Wetpaint Makes One For Itself, Using the Demand Media Playbook", "stoned_year" : 2010, "stoned_month" : 9, "stoned_day" : 6, "source_url" : "http://mediamemo.allthingsd.com/20100906/site-builder-wetpaint-makes-one-for-itself-using-the-demand-media-playbook/", "source_text" : null, "source_description" : "All Things D", "stoneable_type" : "Company", "stoned_value" : null, "stoned_value_type" : null, "stoned_acquirer" : null, "stoneable" : { "name" : "Wetpaint", "permalink" : "wetpaint" } } ], "video_embeds" : [], "screenshots" : [ { "available_sizes" : [ [ [ 150, 86 ], "assets/images/resized/0016/0929/160929v2-max-150x150.png" ], [ [ 250, 143 ], "assets/images/resized/0016/0929/160929v2-max-250x250.png" ], [ [ 450, 258 ], "assets/images/resized/0016/0929/160929v2-max-450x450.png" ] ], "attribution" : null } ], "external_links" : [ { "external_url" : "http://www.geekwire.com/2011/rewind-ben-elowitz-wetpaint-ceo-building-type-media-company", "title" : "GeekWire interview: Rewind - Ben Elowitz, Wetpaint CEO, on building a new type of media company" }, { "external_url" : "http://techcrunch.com/2012/06/17/search-and-social-how-two-will-soon-become-one/", "title" : "Guest post by CEO Ben Elowitz in TechCrunch" }, { "external_url" : "http://allthingsd.com/20120516/what-to-expect-when-facebook-is-expecting-five-predictions-for-facebooks-first-public-year/", "title" : "Guest post by CEO Ben Elowitz in AllThingsD" }, { "external_url" : "http://adage.com/article/digitalnext/facebook-biggest-player-advertising-s-540-billion-world/235708/", "title" : "Guest post by CEO Ben Elowitz in AdAge" }, { "external_url" : "http://www.businessinsider.com/facebook-captures-14-percent-of-our-online-attention-but-only-4-percent-of-ad-spending-online-2012-6", "title" : "Guest post by CEO Ben Elowitz in Business Insider" }, { "external_url" : "http://allfacebook.com/wetpaint-media-data_b75963", "title" : "AllFacebook coverage of Wetpaint" }, { "external_url" : "http://adage.com/article/digital/celeb-site-wetpaint-shows-media-profit-facebook/237828/", "title" : "Profile of Wetpaint in Ad Age" }, { "external_url" : "http://allthingsd.com/20121018/how-to-boost-your-facebook-traffic-tips-and-tricks-from-wetpaint/", "title" : "Interview with Wetpaint CEO Ben Elowitz in All Things D" }, { "external_url" : "http://www.xconomy.com/seattle/2012/10/19/wetpaint-starts-licensing-its-facebook-based-media-distribution-tech/", "title" : "Profile of Wetpaint in Xconomy" } ], "partners" : [] }
{ "_id" : { "$oid" : "52cdef7c4bab8bd675297d8b" }, "name" : "AdventNet", "permalink" : "abc3", "crunchbase_url" : "http://www.crunchbase.com/company/adventnet", "homepage_url" : "http://adventnet.com", "blog_url" : "", "blog_feed_url" : "", "twitter_username" : "manageengine", "category_code" : "enterprise", "number_of_employees" : 600, "founded_year" : 1996, "deadpooled_year" : 2, "tag_list" : "", "alias_list" : "Zoho ManageEngine ", "email_address" : "pr@adventnet.com", "phone_number" : "925-924-9500", "description" : "Server Management Software", "created_at" : { "$date" : 1180121062000 }, "updated_at" : "Wed Oct 31 18:26:09 UTC 2012", "overview" : "<p>AdventNet is now <a href=\"/company/zoho-manageengine\" title=\"Zoho ManageEngine\" rel=\"nofollow\">Zoho ManageEngine</a>.</p>\n\n<p>Founded in 1996, AdventNet has served a diverse range of enterprise IT, networking and telecom customers.</p>\n\n<p>AdventNet supplies server and network management software.</p>", "image" : { "available_sizes" : [ [ [ 150, 55 ], "assets/images/resized/0001/9732/19732v1-max-150x150.png" ], [ [ 150, 55 ], "assets/images/resized/0001/9732/19732v1-max-250x250.png" ], [ [ 150, 55 ], "assets/images/resized/0001/9732/19732v1-max-450x450.png" ] ] }, "products" : [], "relationships" : [ { "is_past" : true, "title" : "CEO and Co-Founder", "person" : { "first_name" : "Sridhar", "last_name" : "Vembu", "permalink" : "sridhar-vembu" } }, { "is_past" : true, "title" : "VP of Business Dev", "person" : { "first_name" : "Neil", "last_name" : "Butani", "permalink" : "neil-butani" } }, { "is_past" : true, "title" : "Usabiliy Engineer", "person" : { "first_name" : "Bharath", "last_name" : "Balasubramanian", "permalink" : "bharath-balasibramanian" } }, { "is_past" : true, "title" : "Director of Engineering", "person" : { "first_name" : "Rajendran", "last_name" : "Dandapani", "permalink" : "rajendran-dandapani" } }, { "is_past" : true, "title" : "Market Analyst", "person" : { "first_name" : "Aravind", "last_name" : "Natarajan", "permalink" : "aravind-natarajan" } }, { "is_past" : true, "title" : "Director of Product Management", "person" : { "first_name" : "Hyther", "last_name" : "Nizam", "permalink" : "hyther-nizam" } }, { "is_past" : true, "title" : "Western Regional OEM Sales Manager", "person" : { "first_name" : "Ian", "last_name" : "Wenig", "permalink" : "ian-wenig" } } ], "competitions" : [], "providerships" : [ { "title" : "DHFH", "is_past" : true, "provider" : { "name" : "A Small Orange", "permalink" : "a-small-orange" } } ], "total_money_raised" : "$0", "funding_rounds" : [], "investments" : [], "acquisition" : null, "acquisitions" : [], "offices" : [ { "description" : "Headquarters", "address1" : "4900 Hopyard Rd.", "address2" : "Suite 310", "zip_code" : "94588", "city" : "Pleasanton", "state_code" : "CA", "country_code" : "USA", "latitude" : 37.692934, "longitude" : -121.904945 } ], "milestones" : [], "video_embeds" : [], "screenshots" : [ { "available_sizes" : [ [ [ 150, 94 ], "assets/images/resized/0004/3400/43400v1-max-150x150.png" ], [ [ 250, 156 ], "assets/images/resized/0004/3400/43400v1-max-250x250.png" ], [ [ 450, 282 ], "assets/images/resized/0004/3400/43400v1-max-450x450.png" ] ], "attribution" : null } ], "external_links" : [], "partners" : [] }
{ "_id" : { "$oid" : "52cdef7c4bab8bd675297d8c" }, "name" : "Zoho", "permalink" : "abc4", "crunchbase_url" : "http://www.crunchbase.com/company/zoho", "homepage_url" : "http://zoho.com", "blog_url" : "http://blogs.zoho.com/", "blog_feed_url" : "http://blogs.zoho.com/feed", "twitter_username" : "zoho", "category_code" : "software", "number_of_employees" : 1600, "founded_year" : 2005, "founded_month" : 9, "founded_day" : 15, "deadpooled_year" : 3, "tag_list" : "zoho, officesuite, spreadsheet, writer, projects, sheet, crm, show, creator, wiki, planner, suite, notebook, chat, meeting, mail", "alias_list" : "", "email_address" : "info@zohocorp.com", "phone_number" : "1-888-204-3539", "description" : "Online Business Apps Suite", "created_at" : "Fri May 25 19:30:28 UTC 2007", "updated_at" : "Wed Oct 30 00:07:05 UTC 2013", "overview" : "<p>Zoho offers a suite of Business, Collaboration & Productivity applications. Apps include CRM, Customer Support, Office Suite, Email Hosting, Project Management, Accounting, App Creator among many others. </p>\n\n<p>Zoho’s parent company is Zoho Corp (previously AdventNet), “a software company started in 1996 focusing on building quality and affordable software for businesses.” </p>\n\n<p>Zoho’s main competitors are <a href=\"/company/google\" title=\"Google\" rel=\"nofollow\">Google</a> Docs & Spreadsheets, Salesforce as well as <a href=\"/company/microsoft\" title=\"Microsoft\" rel=\"nofollow\">Microsoft</a> Office.</p>", "image" : { "available_sizes" : [ [ [ 150, 55 ], "assets/images/resized/0000/3946/3946v12-max-150x150.png" ], [ [ 250, 92 ], "assets/images/resized/0000/3946/3946v12-max-250x250.png" ], [ [ 435, 161 ], "assets/images/resized/0000/3946/3946v12-max-450x450.png" ] ] }, "products" : [ { "name" : "Zoho Office Suite", "permalink" : "zoho-office-suite" }, { "name" : "Zoho CRM", "permalink" : "zoho-crm" }, { "name" : "Zoho Assist", "permalink" : "zoho-assist" } ], "relationships" : [ { "is_past" : false, "title" : "CEO and Founder", "person" : { "first_name" : "Sridhar", "last_name" : "Vembu", "permalink" : "sridhar-vembu" } }, { "is_past" : false, "title" : "VP Product Managment", "person" : { "first_name" : "Hyther", "last_name" : "Nizam", "permalink" : "hyther-nizam" } }, { "is_past" : false, "title" : "VP Marketing", "person" : { "first_name" : "Rodrigo", "last_name" : "Vaca", "permalink" : "rodrigo-vaca" } }, { "is_past" : false, "title" : "Evangelist", "person" : { "first_name" : "Raju", "last_name" : "Vegesna", "permalink" : "raju-vegesna" } }, { "is_past" : false, "title" : "Director of Product Managment", "person" : { "first_name" : "Gibu", "last_name" : "Mathew", "permalink" : "gibu-mathew" } }, { "is_past" : false, "title" : "VP Opration", "person" : { "first_name" : "Neil", "last_name" : "Butani", "permalink" : "neil-butani" } }, { "is_past" : false, "title" : "Director Of Engineering", "person" : { "first_name" : "Rajendran", "last_name" : "Dandapani", "permalink" : "rajendran-dandapani" } }, { "is_past" : false, "title" : "President", "person" : { "first_name" : "Raj", "last_name" : "Sabhlok", "permalink" : "raj-sabhlok" } }, { "is_past" : false, "title" : "GM Marketing", "person" : { "first_name" : "Mouttou", "last_name" : "Sidambaram", "permalink" : "mouttou-sidambaram" } }, { "is_past" : false, "title" :
Need to know whether top-level entity is an Array or Object.
loadJSONArray(filename)
to get a JSONArray
object.loadJSONObject(filename)
to get a JSONObject
object.To access Arrays, use getJSONObject(index)
to get the object at the index.
Use getInt(attr)
, getFloat(attr)
, and getString(attr)
on a JSONObject
to get the value associated with that attr.
Similar functions setInt()
, setString()
, and setFloat()
exist on both JSONObject
s and JSONArray
s to set value. See Processing reference for details.
Image by <a href="https://www.freepik.com/free-vector/hand-drawn-animation-frames-element-collection_33591464.htm#query=sprite%20sheets&position=2&from_view=keyword&track=ais_user_b&uuid=b38232c4-587b-4b4b-8487-8e2ff397867b">Freepik</a>
Metadata for sprite sheets often stored as JSON or XML, with info like:
Image by <a href="https://www.freepik.com/free-vector/hand-drawn-animation-frames-element-collection_33591464.htm#query=sprite%20sheets&position=2&from_view=keyword&track=ais_user_b&uuid=b38232c4-587b-4b4b-8487-8e2ff397867b">Freepik</a>
[{ "filename": "catrun0000",
"frame":"x":370,"y":284,"w":36,"h":36},
"rotated":false,
"trimmed": false, "spriteSourceSize":{"x":0,"y":0,"w":36,"h":36}, "sourceSize":
{"w":36,"h":36} } ...
Will not be 100% accurate, but good enough for a broad-phase collision check.
The AABB should be the smallest axis-aligned box enclosing the shape.
Suppose we have points \( (x_1, y_1), (x_2,y_2), \dots \) in our shape. What should the xMin and xMax of the AABB be?
Box 1 centered at \((x_1, y_1, z_1\)) with axial sizes of \(h_1\), \(w_1\), \(d_1\).
Boxes are not colliding if any of the following are true
Box 2 centered at \((x_2, y_2, z_2\)) with axial sizes of \(h_2\), \(w_2\), \(d_2\).
So boxes are colliding if all of the following are true
If your hitbox is a circle, you'll get hit in circle, which may be a frustrating player experience.
No, we can segment the shape into smaller bounding volumes.
The old Lecture 18 had some information in it, along with the materials you need to make a simple sprite animation yourself.
Slides available on Canvas under Class Slides > cs324e-18-old
Hands-On materials (with sprite sources) available under Hands-On Materials > sprites-inclass.zip
Processing website has examples of sprites and image animation: https://processing.org/examples#topics-animation
If you prefer videos, there do exist YouTube tutorials on the subject, e.g https://www.youtube.com/watch?v=oiWmBVIu350.