Skip to content

Instantly share code, notes, and snippets.

@k-izzo
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k-izzo/ee917ad2e9369b753593 to your computer and use it in GitHub Desktop.
Save k-izzo/ee917ad2e9369b753593 to your computer and use it in GitHub Desktop.
redmoon dreams (working version)
X name age landmark memory intersection imageurl caption directurl lat lng
0 Gus 8 In 2008 I met Dylan for the first time. California and 56th street 41.7918663 -87.6937368
1 Clarence 9 I skidded and twisted my knee. Western and 45th street 41.8120617 -87.6845245
2 Inez 9 I had strawberry ice cream with my cousin and my dad. Pulaski and 47th street 41.8078781 -87.723653
3 Jorge 9 I remember when my dad fell in the snow. Kedzie and 59th street 41.7862429 -87.70332069999999
4 Franklin 8 On September 23rd, 2011 my baby sister was born. Homan and 55th street 41.7934419 -87.7084421
5 Jillian 8 My first house. Avers and Wrightwood 41.9281939 -87.7231978
6 Kevin 9 Love buried in the backyard. Western and Palmer 41.9216635 -87.6874861
7 Kelly 9 Skinner Park I played on the swings and slide. Adams and Racine 41.8790489 -87.657063
8 NA Racine and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo1-28_zps894b65b1.jpg.html?filters[user]=139727381&filters[recent]=1&sort=1&o=4 I changed my mind! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-28_zps894b65b1.jpg 41.8790489 -87.657063
9 NA Washington and Randolph http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo2-26_zpsadafa67c.jpg.html?filters[user]=139727381&filters[recent]=1&sort=1&o=2 It was as shiny as a Las Vegas sign! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-26_zpsadafa67c.jpg 41.8841263 -87.6635103
12 Devin 9 Billy Goat Tavern I eat there and play games. Madison and Ogden 41.8814626 -87.66607549999999
13 NA Wacker and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo3-14_zpsdbe25e07.jpg.html?filters[user]=139727381&filters[recent]=1&sort=1&o=3 It was tallest in the world from 1973-1998! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-14_zpsdbe25e07.jpg 41.8793492 -87.6367124
14 Melania 9 Willis Tower I like to fly. Jackson and Franklin 41.8780983 -87.6352347
15 NA Sangamon and Hubbard http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/TrainStop124_zps6bf4b1ab.jpg.html?sort=3&o=19 http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/TrainStop124_zps6bf4b1ab.jpg 41.8900405 -87.6510964
16 Donovan 9 Green Line "L" Stop Lots of people go on my train. Lake and Kedzie 41.8843472 -87.706221
17 NA Wacker and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/GreenWillis124_zpsc4ece41a.jpg.html?sort=3&o=17 It is super tall and super black as the night! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/GreenWillis124_zpsc4ece41a.jpg 41.8793492 -87.6367124
18 Ari NA Willis Tower It is as black as a cat. Wacker and Adams 41.8793492 -87.6367124
19 NA Michigan and Monroe http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/Skyline124_zps955b1ec0.jpg.html?sort=3&o=8 http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/Skyline124_zps955b1ec0.jpg 41.88081469999999 -87.6244748
20 Hannah 9 The Cone Its my favorite place to go and they have the biggest gum balls on the block. Aberdeen and Madison 41.88162 -87.6543433
21 NA Aberdeen and Monroe http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/TheCone124_zps405d8a5c.jpg.html?sort=3&o=21 They make ice cream from scratch! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/TheCone124_zps405d8a5c.jpg 41.880357 -87.65464999999999
31 Rocco 9 Smith Park I pretend I am in war. Grand and Campbell 41.89135110000001 -87.6891833
32 NA Rockwell and Huron http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/Tank124_zps3da8c4fb.jpg.html?sort=3&o=10 I am a king of the world! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/Tank124_zps3da8c4fb.jpg 41.8938789 -87.69169989999999
33 NA Cloud Gate Its a mirror big and round. Michigan and Monroe http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/TheBean124_zpsa3100131.jpg.html?sort=3&o=9 The artist who made it is going to see what he did! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/TheBean124_zpsa3100131.jpg 41.88081469999999 -87.6244748
34 NA Skydeck I feel small like a car. Wacker and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo2-27_zps33ce1889.jpg.html?filters[user]=139727381&filters[recent]=1&sort=1&o=1 I go on it and see a lot of things! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-27_zps33ce1889.jpg 41.8793492 -87.6367124
35 Aryan 9 Union Station I like tours, pizza, coffee, chocolate. Jackson and Canal 41.8780274 -87.63960019999999
36 NA Adams and Canal http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/UnionStation_zps6277593d.jpg.html?sort=3&o=12 The noise of the trains! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/UnionStation_zps6277593d.jpg 41.8793044 -87.63960689999999
37 Jakui 9 The Cone The candy. Aberdeen and Madison 41.88162 -87.6543433
38 NA Aberdeen and Morgan http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/ConeBlue_zps0bd27d6b.jpg.html?sort=3&o=14 A lot of people come here when its hot and sunny. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/ConeBlue_zps0bd27d6b.jpg 41.7041107 -87.6500351
39 NA Wacker and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo1-30_zpsd9a38a75.jpg.html?sort=3&o=13 http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-30_zpsd9a38a75.jpg 41.8793492 -87.6367124
40 NA Madison and Damen http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/211UnitedCenter_zps2893a6cd.jpg.html?sort=3&o=27 "Madhouse on Madison"! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/211UnitedCenter_zps2893a6cd.jpg 41.881326 -87.6766188
50 Sophia NA Peoria and Monroe http://s1375.photobucket.com/user/RedmoonSchools/media/photo2-30_zpsc4b4ec8d.jpg.html?filters[user]=139727381&filters[recent]=1&sort=1&o=12 3 Gallons of water per minute! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/photo2-30_zpsc4b4ec8d.jpg 41.880429 -87.64966369999999
51 Heaven 9 Throop and Adams http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/211Young_zps6e64c962.jpg.html?sort=3&o=12 I get to be free! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/211Young_zps6e64c962.jpg 41.87900550000001 -87.6594735
52 Camri 9 Mary Bartelme Park I go there a lot with my dog, play, and in the summer with my family for picnics. Peoria and Adams 41.8791729 -87.6496185
53 Curtis 9 Michael Jordan Statue It makes me think. Madison and Damen 41.881326 -87.6766188
55 Asia 9 Chicago Talent Development Charter High School It makes me think about the people who work hard to build the school. Jackson and Oakley 41.8775772 -87.6838638
56 NA Adams and Oakley http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo2-29_zps20936f52.jpg.html?sort=3&o=2 A lot of people stay in and not a lot come out! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-29_zps20936f52.jpg 41.8781136 -87.6297982
57 Jaylen 9 John Hancock Center I went to the top with my Mom. Michigan and Delaware 41.8992094 -87.62420139999999
58 Jaheim 9 Chicago Fire Academy I remember that my Great Great Great Grandma was in the Chicago Fire. Clinton and Taylor 41.869746 -87.6407893
59 NA Clinton and DeKoven http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo4-16_zps819cd2d6.jpg.html?sort=3&o=0 This new building looks cool! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-16_zps819cd2d6.jpg 41.8690231 -87.6407445
60 Aaron 9 Chicago Chinatown It has many stores, markets, bakeries, and gift shops Canal and 29th 41.8417864 -87.638234
68 Darian 9 Palmisano Park fishing stand Halsted and Archer 41.847222 -87.6464606
69 NA Halsted and Lumber http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-34_zpsd91ceac0.jpg I try to catch a fish. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-34_zpsd91ceac0.jpg 41.8502892 -87.6464252
70 Lola 9 Gompers Park I remember how many things are in this park. But really, how many things are in this park!? Lawrence, Elston, and Kenneth 41.8781136 -87.6297982
71 Markayla 9 West Humbolt Park I broke my world record of eating 6 whole subways. Kedzie and North 41.8883333 -87.7069444
72 NA Division and Hoyne http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-19_zps7296ffbe.jpg People can't get food so they go to restaurants. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-19_zps7296ffbe.jpg 41.9031333 -87.6796761
73 NA Damen and Grace http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-22_zps55ba10a6.jpg What happens here is what happens at a regular firehouse. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-22_zps55ba10a6.jpg 41.9505032 -87.6786568
74 Lawrence 9 Avalon Park Library This is where I get books. 82nd and Stony Island 41.7460043 -87.5858298
75 NA 82nd and Stony Island http://s1375.photobucket.com/user/RedmoonSchools/media/Skinner%20West/photo5-17_zps7317173e.jpg.html?sort=3&o=0 I get all kinds of books there. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo5-17_zps7317173e.jpg 41.7460043 -87.5858298
76 Isabella 9 Our Lady of Pompeii Church It was made for the destruction of Pompeii. Lexington and Racine 41.8722416 -87.65686699999999
77 NA Polk and Racine http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-35_zpse3932d44.jpg People go here to praise. It is a commnity. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-35_zpse3932d44.jpg 41.8717851 -87.65688720000001
79 NA Lexington and Racine http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-33_zpsd666cf65.jpg It is big and stands over us. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-33_zpsd666cf65.jpg 41.8722416 -87.65686699999999
80 Lucien 9 Rush Butterfly Hospital Its important because it adds decoration to the city and has a good blue that goes with the white. It helps people to get operations to heal them. Congress and Ashland 41.875182 -87.6667006
81 NA Harrison and Ashland http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-20_zpsdc5c1487.jpg It looks modern! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-20_zpsdc5c1487.jpg 41.874239 -87.66667849999999
82 Cornell 9 The Chicago Defender It is a normal newspaper company but it has everything. Trust me I've read it! 45th St. and King Drive 41.8130068 -87.61642169999999
83 NA 45th and King Drive http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/218Defender_zpsc810dd5d.jpg The Soul of Bronzeville http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/218Defender_zpsc810dd5d.jpg 41.8130068 -87.61642169999999
84 James 9 The Illinois Centennial Monument Built to remember World Wars I, II, and the Korean War. Kedzie and Logan 41.8883333 -87.7069444
85 Alec 9 Andersonville Water Tower When they took it down because of weather. The sky went empty. Foster and Clark 41.9761812 -87.6684023
86 NA Foster and Clark http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/218Andersonville_zpsee08aa5f.jpg Hey look where's the Andersonville Water Tower!? http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/218Andersonville_zpsee08aa5f.jpg 41.9761812 -87.6684023
88 Lauren 9 US Cellular Field I used to ride my bike near it when my Mom was practicing how to drive. 35th and Wentworth 41.8308763 -87.6315238
89 NA 36th and Wentworth http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-36_zps87744a37.jpg A beautiful place to play and have fun! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-36_zps87744a37.jpg 41.8290638 -87.63146739999999
99 NA Madison and Central Park http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-38_zps05627fb8.jpg If you come here be prepared to be amazed! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-38_zps05627fb8.jpg 41.880854 -87.7158843
100 Wendy 9 White Sox Championship Monument I hear firecrackers at night, smell hot dogs, and see people racing to watch game. 35th and Wentworth 41.8308763 -87.6315238
101 NA 37th and Wentworth http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo5-19_zps7e7edacd.jpg Momentus! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo5-19_zps7e7edacd.jpg 41.8272784 -87.6313921
102 Stepheny 9 Garfield Park. I can hear ducks splashing, see people playing baseball, taste the delicious treats, and feel the green grass. Jackson and Pulaski 41.8770912 -87.7255423
103 NA Central Park and Washington http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-38_zps05627fb8.jpg I could live there! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-38_zps05627fb8.jpg 41.8815447 -87.7158394
104 Tru 9 50th and Indiana Intersection I hear people talking about the NBA playoffs and how Paul George dropped 37. 50th and Indiana 41.8038459 -87.62107859999999
105 NA 51st and indiana http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-36_zpse58f93d9.jpg It smells and tastes like steak. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo2-36_zpse58f93d9.jpg 41.80209 -87.618487
106 Carter 9 Mary Bartelme Park It feels like I am in a cold, blue cool pool. Monroe and Sangamon 41.8804179 -87.6508305
107 NA Monroe and Morgan http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-22_zpsc34282a5.jpg Its so hot outside I could be fried! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-22_zpsc34282a5.jpg 41.8803951 -87.65199340000001
108 Turner 9 Kedzie/Canal Bridge I would always pass this bridge when I went to preschool. Kedzie and Canal 41.8781136 -87.6297982
117 Jolie 9 US Cellular Field I'm munching on popcorn, my Mom is eating a Polish, my sisters are chatting, and my Dad & Grandparents are talking. 35th and Wentworth 41.8308763 -87.6315238
118 Lucas 9 St. Andrew Church I can hear people talking or praying inside. People can pray to god, talk to god, and learn information about god. Paulina and Addison 41.9469492 -87.671296
119 Saul 9 Michael Jordan Statue I remember seeing videos of the "best" man, I was inspired. Madison and Damen 41.881326 -87.6766188
120 NA Madison and Wood http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo-222_zps0f898b4e.jpg The Bull has Charged! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo-222_zps0f898b4e.jpg 41.8813817 -87.6717382
121 Azalea 9 The Givens Castle It was a gift for Mrs. Givens so she wouldn't miss Ireland when she moved to Chicago. 103rd and Longwood 41.7065557 -87.6706942
122 NA 100th and Longwood http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-24_zpsd8df11ef.jpg Excellance is key! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-24_zpsd8df11ef.jpg 41.7120347 -87.6688837
123 Tyler 9 The New Park I played football, tag, monsters. Adams and Sangamon 41.8791528 -87.65077959999999
124 NA Adams and Peoria http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-28_zps9309d2e6.jpg The play mounds. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-28_zps9309d2e6.jpg 41.8791729 -87.6496185
125 Autumn 9 US Cellular Field half time 35th and Wentworth 41.8308763 -87.6315238
126 Sarah 9 Princeton Fountain My friend and I made a squirrel out of twigs, leaves, and acorns. Princeton and 24th 41.8491085 -87.63471009999999
127 NA Princeton and 25th http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-43_zpse214256b.jpg It is a very special place in my heart. http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-43_zpse214256b.jpg 41.84639 -87.63462559999999
136 NA Polk and May http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-40_zps3354b6e3.jpg I see big murals on the wall! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-40_zps3354b6e3.jpg 41.8718014 -87.6553284
137 Alice 9 William McKinley Statue I see the statue everytime my parents drive to sell a house or to see my cousins. Western and Archer 41.8259353 -87.6849015
138 Journi 9 Museum of Science and Industry I remember me, my cousin, and my Mom went and saw all of the museum. 57th and Lake Shore Drive 41.79242180000001 -87.58018779999999
139 NA 58th and Lake Shore Drive http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-28_zps03792b03.jpg Science is light! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo3-28_zps03792b03.jpg 41.8033479 -87.5816686
140 Cosette 9 Harrison Park Swimming and gymnastics lessons Harrison and 18th 41.85790799999999 -87.669147
141 NA Harrison and 17th http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-27_zpsd1a425bb.jpg Candy after a long day! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo4-27_zpsd1a425bb.jpg 41.8781136 -87.6297982
142 Breea 9 Amundsen Park I watch basketball games after school Bloomingdale and Merrimac 41.9128388 -87.7811491
143 Edward 9 US Cellular Field It was the first new major sport facility in Chicago since 1929. 37th and Wentworth 41.8272784 -87.6313921
144 Jude 9 Soldier Field I went on my Dad's birthday and the Bears were losing 21-27. Three minutes left. then 45 seconds, and the Bears got a touchdown to win! Lake Shore Drive and Walton 41.9000772 -87.6192636
145 NA Lake Shore Drive and Deleware http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-42_zps05c380c1.jpg Beware! http://i1375.photobucket.com/albums/ag451/RedmoonSchools/Skinner%20West/photo1-42_zps05c380c1.jpg 41.8992824 -87.61873589999999
153 Bryce 9 United Center My Grandad got us front row seats to a basketball game. Madison and Damen 41.881326 -87.6766188
154 Joshua 10 Empty Lot When I see my neigborhood I'm as happy as can be. The trees the forests always surround me. I love my friends and my family. We play, we rock every and all day to the night. We got to go to sleep. We wake up and again and again. This morning, I'm as happy as can be. Jackson and Kilbourn 41.8769344 -87.7377893
155 Jaylin 10 Central Library I remember when I was in the house so I had to be creative. So I can clean the house in 15 minutes. So I got a stick and pushed the broom and I got finished. Wilcox and Pulaski 41.8788582 -87.72560039999999
156 Travanti 8 Garfield Park My neighborhood is sometimes nice because there's no gun shots. Sometimes they shoot and snatch kids. Central Park and Monroe 41.87954269999999 -87.7158595
157 Cordell 7 The Parking Lot They be smoking. They be shooting. I smell hotdog. I smell chicken. I play the xbox 360. The game I be playing is 2014 basketball. Washington and Mayfield 41.88214560000001 -87.7718325
158 Jamesha 8 Popeye's Chicken My neighborhood is smelly and loud and has a lot of food and they be shooting. Washington and Western 41.8830097 -87.6863925
159 Janaya 8 Garfield Park People be smoking, shooting, snatching kids, stealing bbq hotdogs, and sleeping. Central Park and Schrader Dr. 41.8842089 -87.716492
160 Zorianna 7 Central Library I hear gunshots. I eat mac n cheese. I sleep in my bed. Wilcox and Pulaski 41.8788582 -87.72560039999999
161 Kameron 8 The Corner Store My neighborhood is nice. I feel good in my community. I hear sounds. I smell BBQ and hamburgers. I taste food. Adams and Pulaski 41.8779706 -87.7255607
162 Howaun 7 The Corner Store I see smoking and drinking. I play games. I play ball out south. Adams and Pulaski 41.8779706 -87.7255607
<!DOCTYPE html>
<meta charset="utf-8">
<head><link rel='stylesheet' type='text/css' href='style.css'></head>
<body>
<div id='head'></div>
<div id='container'>
<span id='left'></span>
<span id='right'></span>
</div>
<script src='http://d3js.org/d3.v3.js'></script>
<script src='http://d3js.org/topojson.v1.min.js'></script>
<script src="tabletop.js"></script>
<script src='script.js'></script>
var scale = 0.70,
w = 1400 * scale,
h = 900 * scale,
data = []
map_portion = 0.55
margin = w * .015;
d3.select('#head')
.style({
'margin-left': -1 * w / 2 + 'px',
width: w + 'px',
height: (150 * scale) + 'px'
});
var star_d = 'M150,180l11,41l41,-11l-30,30l30,30l-41,-11l-11,41l-11,-41l-41,11l30,-30l-30,-30l41,11z';
var head_groups = d3.select('#head')
.append('svg')
.attr({width: w, height: h})
.selectAll('.star_group')
.data(d3.range(4))
.enter()
.append('g')
.classed('star_group', true)
.attr('transform', function (d) { return 'translate(' + [260 + d*100, -70] + ')scale(' + 0.5 + ')'; });
d3.selectAll('.star_group')
.append('path')
.classed('star', true)
.attr('d', star_d)
d3.select('#container')
.style({
'margin-top': (150 * scale) + 'px',
'margin-left': -1 * w / 2 + 'px',
width: w + 'px',
height: h + 'px'
});
d3.select('#left')
.style({
width: (1 - map_portion) * 100 + '%',
height: h + 'px'
});
d3.select('#right')
.style({
width: map_portion * 100 + '%',
height: h + 'px'
});
var zoom = function () {
map_area.attr('transform', 'translate(' + d3.event.translate +')scale(' + d3.event.scale + ')');
};
var content_area = d3.select('#left')
.append('svg')
.attr({
id: 'svg_left',
width: w * (1 - map_portion),
height: h
})
.append('g')
.attr('transform', 'translate(' + [margin, margin] + ')')
content_area.append('rect')
.attr({
id: 'content_rect',
x: 0,
y: 0,
width: w * (1 - map_portion) - 1.5 * margin,
height: h - 2 * margin
})
var map_svg = d3.select('#right')
.append('svg')
.attr({
id: 'svg_right',
width: w * map_portion,
height: h
})
map_svg.append('rect')
.attr({
id: 'map_rect',
x: margin / 2,
y: margin,
width: w * map_portion - 1.5 * margin,
height: h - 2 * margin
})
map_area = map_svg.append('g')
// .attr('transform', 'scale(' + scale + ')')
.attr('transform', 'translate(' + [margin / 2, margin] + ')')
.call(d3.behavior.zoom()
.scaleExtent([1, 10])
.on('zoom', zoom)
);
var projection = d3.geo.albers()
.translate([(w * map_portion - 1.5 * margin) / 2, (h - 2 * margin) / 2])
.scale(87000)
.rotate([87.685, 0])
.center([0, 41.833])
var path = d3.geo.path()
.projection(projection);
var render_map = function () {
d3.json('wards.json', function(wards_topo) {
d3.csv('dreams3_coded_clean.csv', function (dreams) {
dreams.forEach(function (dream) {
dream.loc = [+dream.lng, +dream.lat];
if (dream.directurl) {
var img = new Image();
img.src = dream.directurl;
img.onload = function () { dream.img_ratio = img.width / img.height; };
}
});
console.log(dreams);
var wards_geo = topojson.feature(wards_topo, wards_topo.objects.wards).features;
map_area.selectAll('path')
.data(wards_geo)
.enter()
.append('path')
.attr('id', function (d, i) { return i; })
.attr('d', path);
map_area.selectAll('.marker')
.data(dreams)
.enter()
.append('circle')
.attr({
class: function (d) { return d.imageurl.length > 0 ? 'lm' : 'mem'; },
cx: function (d) { return projection(d.loc)[0]; },
cy: function (d) { return projection(d.loc)[1]; },
r: 3.5
});
var zoom_groups = map_svg.selectAll('.zoom_group')
.data(d3.range(2))
.enter()
.append('g')
.classed('zoom_group', true)
.attr({
id: function (d) { return 'zg' + d; },
transform: function (d) { return 'translate(' + [(w * map_portion) - (1.5 * margin) - margin - 35, 2 * margin + d * 35] + ')'; }
});
zoom_groups.append('rect')
.attr({
x: 0,
y: 0,
width: 30,
height: 30,
fill: 'white'
});
d3.select('#zg0').append('line')
.attr({
x1: 30 / 2,
y1: 8,
x2: 30 / 2,
y2: 30 - 8
})
zoom_groups.append('line')
.attr({
x1: 8,
y1: 30 / 2,
x2: 30 - 8,
y2: 30 / 2
})
d3.select('#zg0')
.on('click', function (d) {
console.log(d);
map_area.attr('transform', 'scale(1.5)');
});
d3.select('#zg1')
.on('click', function (d) {
console.log(d);
map_area.attr('transform', 'scale(1)');
});
d3.selectAll('.lm')
.on('mouseenter', lm_actions.enter)
.on('mouseleave', lm_actions.leave);
d3.selectAll('.mem')
.on('mouseenter', mem_actions.enter)
.on('mouseleave', mem_actions.leave);
});
});
};
var lm_actions = {
enter: function () {
var selection = d3.select(this);
active_dream = selection.data()[0],
content_group = content_area.append('g').attr('id', 'content_group')
char_limit = 40,
text_lines = 1 + Math.floor(active_dream.caption.length / char_limit)
start_char = 0;
selection.attr('r', 7);
content_group.append('image')
.attr({
id: 'large_img',
'xlink:href': active_dream.directurl,
width: w * (1 - map_portion) - 1.5 * margin,
height: Math.min((w * (1 - map_portion) - 1.5 * margin) / active_dream.img_ratio, h - 8 * margin)
});
d3.range(text_lines).forEach(function (d, i) {
content_group.append('text')
.text('"' + active_dream.caption.slice(start_char, start_char + char_limit) + '"')
.attr({
id: 'large_cap',
x: (w * (1 - map_portion) - 1.5 * margin) / 2,
y: Math.min((w * (1 - map_portion) - 1.5 * margin) / active_dream.img_ratio, h - 8 * margin) + 2 * margin + (i * 2 * margin),
'text-anchor': 'middle'
});
start_char += char_limit;
});
content_group.append('text')
.text('-' + active_dream.name + ' (' + active_dream.age + ')')
.attr({
id: 'small_cap',
x: (w * (1 - map_portion) - 1.5 * margin) / 2,
y: Math.min((w * (1 - map_portion) - 1.5 * margin) / active_dream.img_ratio, h - 8 * margin) + 4 * margin + (text_lines - 1) * 2 * margin,
'text-anchor': 'middle'
});
},
leave: function () {
d3.select('#content_group').remove();
d3.select(this).attr('r', 3.5);
}
};
var mem_actions = {
enter: function () {
var selection = d3.select(this);
active_dream = selection.data()[0],
content_group = content_area.append('g').attr('id', 'content_group'),
char_limit = 40,
text_lines = 1 + Math.floor(active_dream.memory.length / char_limit)
start_char = 0;
selection.attr('r', 7);
d3.range(text_lines).forEach(function (d, i) {
content_group.append('text')
.text('"' + active_dream.memory.slice(start_char, start_char + char_limit) + '"')
.attr({
id: 'large_cap',
x: (w * (1 - map_portion) - 1.5 * margin) / 2,
y: (h - 2 * margin) / 2 + i * 2 * margin,
'text-anchor': 'middle'
});
start_char += char_limit;
});
content_group.append('text')
.text('-' + active_dream.name + ' (' + active_dream.age + ')')
.attr({
id: 'small_cap',
x: (w * (1 - map_portion) - 1.5 * margin) / 2,
y: (h - 2 * margin) / 2 + 2 * margin + (text_lines - 1) * 2 * margin,
'text-anchor': 'middle'
});
},
leave: function () {
d3.select('#content_group').remove();
d3.select(this).attr('r', 3.5);
}
};
render_map();
body {
background-color: lightgray;
}
#head, #container {
position: absolute;
left: 50%;
}
#left, #right {
background-color: white;
}
#svg_right {
background-color: white;
}
#map_rect {
fill: rgb(200,218,233);
opacity: 0.6;
}
#content_rect {
fill: white;
}
path {
stroke: white;
stroke-opacity: 1;
fill: #bdbdbd;
stroke-width: 0.3px;
}
span {
float: left;
}
.star {
fill: red;
opacity: 0.5;
}
.mem, .lm {
opacity: 0.4;
}
.mem {
fill: red;
}
.lm {
fill: blue;
}
text {
font-family: Helvetica;
stroke: none;
font-size: 18px;
font-style: italic;
pointer-events: none;
fill: rgb(36,36,37);
}
#large_cap {
font-size: 20px;
font-style: italic;
opacity: 0.65;
}
#small_cap {
font-size: 18px;
font-style: italic;
opacity: 0.8;
}
.hidden {
opacity: 0;
}
line {
stroke: #bdbdbd;
stroke-width: 3;
}
(function(global) {
"use strict";
var inNodeJS = false;
if (typeof module !== 'undefined' && module.exports) {
inNodeJS = true;
var request = require('request');
}
var supportsCORS = false;
var inLegacyIE = false;
try {
var testXHR = new XMLHttpRequest();
if (typeof testXHR.withCredentials !== 'undefined') {
supportsCORS = true;
} else {
if ("XDomainRequest" in window) {
supportsCORS = true;
inLegacyIE = true;
}
}
} catch (e) { }
// Create a simple indexOf function for support
// of older browsers. Uses native indexOf if
// available. Code similar to underscores.
// By making a separate function, instead of adding
// to the prototype, we will not break bad for loops
// in older browsers
var indexOfProto = Array.prototype.indexOf;
var ttIndexOf = function(array, item) {
var i = 0, l = array.length;
if (indexOfProto && array.indexOf === indexOfProto) return array.indexOf(item);
for (; i < l; i++) if (array[i] === item) return i;
return -1;
};
/*
Initialize with Tabletop.init( { key: '0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc' } )
OR!
Initialize with Tabletop.init( { key: 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc&output=html&widget=true' } )
OR!
Initialize with Tabletop.init('0AjAPaAU9MeLFdHUxTlJiVVRYNGRJQnRmSnQwTlpoUXc')
*/
var Tabletop = function(options) {
// Make sure Tabletop is being used as a constructor no matter what.
if(!this || !(this instanceof Tabletop)) {
return new Tabletop(options);
}
if(typeof(options) === 'string') {
options = { key : options };
}
this.callback = options.callback;
this.wanted = options.wanted || [];
this.key = options.key;
this.simpleSheet = !!options.simpleSheet;
this.parseNumbers = !!options.parseNumbers;
this.wait = !!options.wait;
this.reverse = !!options.reverse;
this.postProcess = options.postProcess;
this.debug = !!options.debug;
this.query = options.query || '';
this.orderby = options.orderby;
this.endpoint = options.endpoint || "https://spreadsheets.google.com";
this.singleton = !!options.singleton;
this.simple_url = !!options.simple_url;
this.callbackContext = options.callbackContext;
if(typeof(options.proxy) !== 'undefined') {
// Remove trailing slash, it will break the app
this.endpoint = options.proxy.replace(/\/$/,'');
this.simple_url = true;
this.singleton = true;
// Let's only use CORS (straight JSON request) when
// fetching straight from Google
supportsCORS = false
}
this.parameterize = options.parameterize || false;
if(this.singleton) {
if(typeof(Tabletop.singleton) !== 'undefined') {
this.log("WARNING! Tabletop singleton already defined");
}
Tabletop.singleton = this;
}
/* Be friendly about what you accept */
if(/key=/.test(this.key)) {
this.log("You passed an old Google Docs url as the key! Attempting to parse.");
this.key = this.key.match("key=(.*?)&")[1];
}
if(/pubhtml/.test(this.key)) {
this.log("You passed a new Google Spreadsheets url as the key! Attempting to parse.");
this.key = this.key.match("d\\/(.*?)\\/pubhtml")[1];
}
if(!this.key) {
this.log("You need to pass Tabletop a key!");
return;
}
this.log("Initializing with key " + this.key);
this.models = {};
this.model_names = [];
this.base_json_path = "/feeds/worksheets/" + this.key + "/public/basic?alt=";
if (inNodeJS || supportsCORS) {
this.base_json_path += 'json';
} else {
this.base_json_path += 'json-in-script';
}
if(!this.wait) {
this.fetch();
}
};
// A global storage for callbacks.
Tabletop.callbacks = {};
// Backwards compatibility.
Tabletop.init = function(options) {
return new Tabletop(options);
};
Tabletop.sheets = function() {
this.log("Times have changed! You'll want to use var tabletop = Tabletop.init(...); tabletop.sheets(...); instead of Tabletop.sheets(...)");
};
Tabletop.prototype = {
fetch: function(callback) {
if(typeof(callback) !== "undefined") {
this.callback = callback;
}
this.requestData(this.base_json_path, this.loadSheets);
},
/*
This will call the environment appropriate request method.
In browser it will use JSON-P, in node it will use request()
*/
requestData: function(path, callback) {
if (inNodeJS) {
this.serverSideFetch(path, callback);
} else {
//CORS only works in IE8/9 across the same protocol
//You must have your server on HTTPS to talk to Google, or it'll fall back on injection
var protocol = this.endpoint.split("//").shift() || "http";
if (supportsCORS && (!inLegacyIE || protocol === location.protocol)) {
this.xhrFetch(path, callback);
} else {
this.injectScript(path, callback);
}
}
},
/*
Use Cross-Origin XMLHttpRequest to get the data in browsers that support it.
*/
xhrFetch: function(path, callback) {
//support IE8's separate cross-domain object
var xhr = inLegacyIE ? new XDomainRequest() : new XMLHttpRequest();
xhr.open("GET", this.endpoint + path);
var self = this;
xhr.onload = function() {
try {
var json = JSON.parse(xhr.responseText);
} catch (e) {
console.error(e);
}
callback.call(self, json);
};
xhr.send();
},
/*
Insert the URL into the page as a script tag. Once it's loaded the spreadsheet data
it triggers the callback. This helps you avoid cross-domain errors
http://code.google.com/apis/gdata/samples/spreadsheet_sample.html
Let's be plain-Jane and not use jQuery or anything.
*/
injectScript: function(path, callback) {
var script = document.createElement('script');
var callbackName;
if(this.singleton) {
if(callback === this.loadSheets) {
callbackName = 'Tabletop.singleton.loadSheets';
} else if (callback === this.loadSheet) {
callbackName = 'Tabletop.singleton.loadSheet';
}
} else {
var self = this;
callbackName = 'tt' + (+new Date()) + (Math.floor(Math.random()*100000));
// Create a temp callback which will get removed once it has executed,
// this allows multiple instances of Tabletop to coexist.
Tabletop.callbacks[ callbackName ] = function () {
var args = Array.prototype.slice.call( arguments, 0 );
callback.apply(self, args);
script.parentNode.removeChild(script);
delete Tabletop.callbacks[callbackName];
};
callbackName = 'Tabletop.callbacks.' + callbackName;
}
var url = path + "&callback=" + callbackName;
if(this.simple_url) {
// We've gone down a rabbit hole of passing injectScript the path, so let's
// just pull the sheet_id out of the path like the least efficient worker bees
if(path.indexOf("/list/") !== -1) {
script.src = this.endpoint + "/" + this.key + "-" + path.split("/")[4];
} else {
script.src = this.endpoint + "/" + this.key;
}
} else {
script.src = this.endpoint + url;
}
if (this.parameterize) {
script.src = this.parameterize + encodeURIComponent(script.src);
}
document.getElementsByTagName('script')[0].parentNode.appendChild(script);
},
/*
This will only run if tabletop is being run in node.js
*/
serverSideFetch: function(path, callback) {
var self = this
request({url: this.endpoint + path, json: true}, function(err, resp, body) {
if (err) {
return console.error(err);
}
callback.call(self, body);
});
},
/*
Is this a sheet you want to pull?
If { wanted: ["Sheet1"] } has been specified, only Sheet1 is imported
Pulls all sheets if none are specified
*/
isWanted: function(sheetName) {
if(this.wanted.length === 0) {
return true;
} else {
return (ttIndexOf(this.wanted, sheetName) !== -1);
}
},
/*
What gets send to the callback
if simpleSheet === true, then don't return an array of Tabletop.this.models,
only return the first one's elements
*/
data: function() {
// If the instance is being queried before the data's been fetched
// then return undefined.
if(this.model_names.length === 0) {
return undefined;
}
if(this.simpleSheet) {
if(this.model_names.length > 1 && this.debug) {
this.log("WARNING You have more than one sheet but are using simple sheet mode! Don't blame me when something goes wrong.");
}
return this.models[ this.model_names[0] ].all();
} else {
return this.models;
}
},
/*
Add another sheet to the wanted list
*/
addWanted: function(sheet) {
if(ttIndexOf(this.wanted, sheet) === -1) {
this.wanted.push(sheet);
}
},
/*
Load all worksheets of the spreadsheet, turning each into a Tabletop Model.
Need to use injectScript because the worksheet view that you're working from
doesn't actually include the data. The list-based feed (/feeds/list/key..) does, though.
Calls back to loadSheet in order to get the real work done.
Used as a callback for the worksheet-based JSON
*/
loadSheets: function(data) {
var i, ilen;
var toLoad = [];
this.foundSheetNames = [];
for(i = 0, ilen = data.feed.entry.length; i < ilen ; i++) {
this.foundSheetNames.push(data.feed.entry[i].title.$t);
// Only pull in desired sheets to reduce loading
if( this.isWanted(data.feed.entry[i].content.$t) ) {
var linkIdx = data.feed.entry[i].link.length-1;
var sheet_id = data.feed.entry[i].link[linkIdx].href.split('/').pop();
var json_path = "/feeds/list/" + this.key + "/" + sheet_id + "/public/values?alt="
if (inNodeJS || supportsCORS) {
json_path += 'json';
} else {
json_path += 'json-in-script';
}
if(this.query) {
json_path += "&sq=" + this.query;
}
if(this.orderby) {
json_path += "&orderby=column:" + this.orderby.toLowerCase();
}
if(this.reverse) {
json_path += "&reverse=true";
}
toLoad.push(json_path);
}
}
this.sheetsToLoad = toLoad.length;
for(i = 0, ilen = toLoad.length; i < ilen; i++) {
this.requestData(toLoad[i], this.loadSheet);
}
},
/*
Access layer for the this.models
.sheets() gets you all of the sheets
.sheets('Sheet1') gets you the sheet named Sheet1
*/
sheets: function(sheetName) {
if(typeof sheetName === "undefined") {
return this.models;
} else {
if(typeof(this.models[ sheetName ]) === "undefined") {
// alert( "Can't find " + sheetName );
return;
} else {
return this.models[ sheetName ];
}
}
},
/*
Parse a single list-based worksheet, turning it into a Tabletop Model
Used as a callback for the list-based JSON
*/
loadSheet: function(data) {
var model = new Tabletop.Model( { data: data,
parseNumbers: this.parseNumbers,
postProcess: this.postProcess,
tabletop: this } );
this.models[ model.name ] = model;
if(ttIndexOf(this.model_names, model.name) === -1) {
this.model_names.push(model.name);
}
this.sheetsToLoad--;
if(this.sheetsToLoad === 0)
this.doCallback();
},
/*
Execute the callback upon loading! Rely on this.data() because you might
only request certain pieces of data (i.e. simpleSheet mode)
Tests this.sheetsToLoad just in case a race condition happens to show up
*/
doCallback: function() {
if(this.sheetsToLoad === 0) {
this.callback.apply(this.callbackContext || this, [this.data(), this]);
}
},
log: function(msg) {
if(this.debug) {
if(typeof console !== "undefined" && typeof console.log !== "undefined") {
Function.prototype.apply.apply(console.log, [console, arguments]);
}
}
}
};
/*
Tabletop.Model stores the attribute names and parses the worksheet data
to turn it into something worthwhile
Options should be in the format { data: XXX }, with XXX being the list-based worksheet
*/
Tabletop.Model = function(options) {
var i, j, ilen, jlen;
this.column_names = [];
this.name = options.data.feed.title.$t;
this.elements = [];
this.raw = options.data; // A copy of the sheet's raw data, for accessing minutiae
if(typeof(options.data.feed.entry) === 'undefined') {
options.tabletop.log("Missing data for " + this.name + ", make sure you didn't forget column headers");
this.elements = [];
return;
}
for(var key in options.data.feed.entry[0]){
if(/^gsx/.test(key))
this.column_names.push( key.replace("gsx$","") );
}
for(i = 0, ilen = options.data.feed.entry.length ; i < ilen; i++) {
var source = options.data.feed.entry[i];
var element = {};
for(var j = 0, jlen = this.column_names.length; j < jlen ; j++) {
var cell = source[ "gsx$" + this.column_names[j] ];
if (typeof(cell) !== 'undefined') {
if(options.parseNumbers && cell.$t !== '' && !isNaN(cell.$t))
element[ this.column_names[j] ] = +cell.$t;
else
element[ this.column_names[j] ] = cell.$t;
} else {
element[ this.column_names[j] ] = '';
}
}
if(element.rowNumber === undefined)
element.rowNumber = i + 1;
if( options.postProcess )
options.postProcess(element);
this.elements.push(element);
}
};
Tabletop.Model.prototype = {
/*
Returns all of the elements (rows) of the worksheet as objects
*/
all: function() {
return this.elements;
},
/*
Return the elements as an array of arrays, instead of an array of objects
*/
toArray: function() {
var array = [],
i, j, ilen, jlen;
for(i = 0, ilen = this.elements.length; i < ilen; i++) {
var row = [];
for(j = 0, jlen = this.column_names.length; j < jlen ; j++) {
row.push( this.elements[i][ this.column_names[j] ] );
}
array.push(row);
}
return array;
}
};
if(inNodeJS) {
module.exports = Tabletop;
} else {
global.Tabletop = Tabletop;
}
})(this);
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment