Interact
Bike Sharing in the Bay Area¶
We end this chapter by using all the methods we have learned to examine a new and large dataset. We will also introduce map_table
, a powerful visualization tool.
The Bay Area Bike Share service published a dataset describing every bicycle rental from September 2014 to August 2015 in their system. There were 354,152 rentals in all. The columns are:
- An ID for the rental
- Duration of the rental, in seconds
- Start date
- Name of the Start Station and code for Start Terminal
- Name of the End Station and code for End Terminal
- A serial number for the bike
- Subscriber type and zip code
Trip ID | Duration | Start Date | Start Station | Start Terminal | End Date | End Station | End Terminal | Bike # | Subscriber Type | Zip Code |
913460 | 765 | 8/31/2015 23:26 | Harry Bridges Plaza (Ferry Building) | 50 | 8/31/2015 23:39 | San Francisco Caltrain (Townsend at 4th) | 70 | 288 | Subscriber | 2139 |
913459 | 1036 | 8/31/2015 23:11 | San Antonio Shopping Center | 31 | 8/31/2015 23:28 | Mountain View City Hall | 27 | 35 | Subscriber | 95032 |
913455 | 307 | 8/31/2015 23:13 | Post at Kearny | 47 | 8/31/2015 23:18 | 2nd at South Park | 64 | 468 | Subscriber | 94107 |
913454 | 409 | 8/31/2015 23:10 | San Jose City Hall | 10 | 8/31/2015 23:17 | San Salvador at 1st | 8 | 68 | Subscriber | 95113 |
913453 | 789 | 8/31/2015 23:09 | Embarcadero at Folsom | 51 | 8/31/2015 23:22 | Embarcadero at Sansome | 60 | 487 | Customer | 9069 |
913452 | 293 | 8/31/2015 23:07 | Yerba Buena Center of the Arts (3rd @ Howard) | 68 | 8/31/2015 23:12 | San Francisco Caltrain (Townsend at 4th) | 70 | 538 | Subscriber | 94118 |
913451 | 896 | 8/31/2015 23:07 | Embarcadero at Folsom | 51 | 8/31/2015 23:22 | Embarcadero at Sansome | 60 | 363 | Customer | 92562 |
913450 | 255 | 8/31/2015 22:16 | Embarcadero at Sansome | 60 | 8/31/2015 22:20 | Steuart at Market | 74 | 470 | Subscriber | 94111 |
913449 | 126 | 8/31/2015 22:12 | Beale at Market | 56 | 8/31/2015 22:15 | Temporary Transbay Terminal (Howard at Beale) | 55 | 439 | Subscriber | 94130 |
913448 | 932 | 8/31/2015 21:57 | Post at Kearny | 47 | 8/31/2015 22:12 | South Van Ness at Market | 66 | 472 | Subscriber | 94702 |
... (354142 rows omitted)
We'll focus only on the free trips, which are trips that last less than 1800 seconds (half an hour). There is a charge for longer trips.
The histogram below shows that most of the trips took around 10 minutes (600 seconds) or so. Very few took near 30 minutes (1800 seconds), possibly because people try to return the bikes before the cutoff time so as not to have to pay.
We can get more detail by specifying a larger number of bins. But the overall shape doesn't change much.
Exploring the Data with group
and pivot
¶
We can use group
to identify the most highly used Start Station:
Start Station | count |
San Francisco Caltrain (Townsend at 4th) | 25858 |
San Francisco Caltrain 2 (330 Townsend) | 21523 |
Harry Bridges Plaza (Ferry Building) | 15543 |
Temporary Transbay Terminal (Howard at Beale) | 14298 |
2nd at Townsend | 13674 |
Townsend at 7th | 13579 |
Steuart at Market | 13215 |
Embarcadero at Sansome | 12842 |
Market at 10th | 11523 |
Market at Sansome | 11023 |
... (60 rows omitted)
The largest number of trips started at the Caltrain Station on Townsend and 4th in San Francisco. People take the train into the city, and then use a shared bike to get to their next destination.
The group
method can also be used to classify the rentals by both Start Station and End Station.
Start Station | End Station | count |
2nd at Folsom | 2nd at Folsom | 54 |
2nd at Folsom | 2nd at South Park | 295 |
2nd at Folsom | 2nd at Townsend | 437 |
2nd at Folsom | 5th at Howard | 113 |
2nd at Folsom | Beale at Market | 127 |
2nd at Folsom | Broadway St at Battery St | 67 |
2nd at Folsom | Civic Center BART (7th at Market) | 47 |
2nd at Folsom | Clay at Battery | 240 |
2nd at Folsom | Commercial at Montgomery | 128 |
2nd at Folsom | Davis at Jackson | 28 |
... (1619 rows omitted)
Fifty-four trips both started and ended at the station on 2nd at Folsom. A much large number (437) were between 2nd at Folsom and 2nd at Townsend.
The pivot
method does the same classification but displays its results in a contingency table that shows all possible combinations of Start and End Stations, even though some of them didn't correspond to any trips. Remember that the first argument of a pivot
statement specifies the column labels of the pivot table; the second argument labels the rows.
There is a train station as well as a Bay Area Rapid Transit (BART) station near Beale at Market, explaining the high number of trips that start and end there.
End Station | 2nd at Folsom | 2nd at South Park | 2nd at Townsend | 5th at Howard | Adobe on Almaden | Arena Green / SAP Center | Beale at Market | Broadway St at Battery St | California Ave Caltrain Station | Castro Street and El Camino Real | Civic Center BART (7th at Market) | Clay at Battery | Commercial at Montgomery | Cowper at University | Davis at Jackson | Embarcadero at Bryant | Embarcadero at Folsom | Embarcadero at Sansome | Embarcadero at Vallejo | Evelyn Park and Ride | Franklin at Maple | Golden Gate at Polk | Grant Avenue at Columbus Avenue | Harry Bridges Plaza (Ferry Building) | Howard at 2nd | Japantown | MLK Library | Market at 10th | Market at 4th | Market at Sansome | Mechanics Plaza (Market at Battery) | Mezes Park | Mountain View Caltrain Station | Mountain View City Hall | Palo Alto Caltrain Station | Park at Olive | Paseo de San Antonio | Post at Kearny | Powell Street BART | Powell at Post (Union Square) | Redwood City Caltrain Station | Redwood City Medical Center | Redwood City Public Library | Rengstorff Avenue / California Street | Ryland Park | SJSU - San Salvador at 9th | SJSU 4th at San Carlos | San Antonio Caltrain Station | San Antonio Shopping Center | San Francisco Caltrain (Townsend at 4th) | San Francisco Caltrain 2 (330 Townsend) | San Francisco City Hall | San Jose City Hall | San Jose Civic Center | San Jose Diridon Caltrain Station | San Mateo County Center | San Pedro Square | San Salvador at 1st | Santa Clara County Civic Center | Santa Clara at Almaden | South Van Ness at Market | Spear at Folsom | St James Park | Stanford in Redwood City | Steuart at Market | Temporary Transbay Terminal (Howard at Beale) | Townsend at 7th | University and Emerson | Washington at Kearny | Yerba Buena Center of the Arts (3rd @ Howard) |
2nd at Folsom | 54 | 190 | 554 | 107 | 0 | 0 | 40 | 21 | 0 | 0 | 44 | 78 | 54 | 0 | 9 | 77 | 32 | 41 | 14 | 0 | 0 | 11 | 30 | 416 | 53 | 0 | 0 | 169 | 114 | 302 | 33 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 121 | 88 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 694 | 445 | 21 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 57 | 0 | 0 | 39 | 237 | 342 | 0 | 17 | 31 |
2nd at South Park | 295 | 164 | 71 | 180 | 0 | 0 | 208 | 85 | 0 | 0 | 112 | 87 | 160 | 0 | 37 | 56 | 178 | 83 | 116 | 0 | 0 | 57 | 73 | 574 | 500 | 0 | 0 | 139 | 199 | 1633 | 119 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 84 | 113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 559 | 480 | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 152 | 0 | 0 | 374 | 429 | 143 | 0 | 63 | 209 |
2nd at Townsend | 437 | 151 | 185 | 92 | 0 | 0 | 608 | 350 | 0 | 0 | 80 | 329 | 168 | 0 | 386 | 361 | 658 | 506 | 254 | 0 | 0 | 27 | 315 | 2607 | 295 | 0 | 0 | 110 | 225 | 845 | 177 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 100 | 141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 905 | 299 | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 508 | 0 | 0 | 2349 | 784 | 417 | 0 | 57 | 166 |
5th at Howard | 113 | 177 | 148 | 83 | 0 | 0 | 59 | 130 | 0 | 0 | 203 | 76 | 129 | 0 | 30 | 57 | 49 | 166 | 54 | 0 | 0 | 85 | 78 | 371 | 478 | 0 | 0 | 303 | 158 | 168 | 90 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 183 | 169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 690 | 1859 | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 102 | 0 | 0 | 182 | 750 | 200 | 0 | 43 | 267 |
Adobe on Almaden | 0 | 0 | 0 | 0 | 11 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 7 | 16 | 0 | 0 | 0 | 0 | 0 | 19 | 23 | 265 | 0 | 20 | 4 | 5 | 10 | 0 | 0 | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Arena Green / SAP Center | 0 | 0 | 0 | 0 | 7 | 64 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 3 | 7 | 0 | 0 | 0 | 0 | 0 | 6 | 20 | 7 | 0 | 56 | 12 | 38 | 259 | 0 | 0 | 13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Beale at Market | 127 | 79 | 183 | 59 | 0 | 0 | 59 | 661 | 0 | 0 | 201 | 75 | 101 | 0 | 247 | 178 | 38 | 590 | 165 | 0 | 0 | 54 | 435 | 57 | 72 | 0 | 0 | 286 | 236 | 163 | 26 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 227 | 179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 640 | 269 | 25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 128 | 0 | 0 | 16 | 167 | 35 | 0 | 64 | 45 |
Broadway St at Battery St | 67 | 89 | 279 | 119 | 0 | 0 | 1022 | 110 | 0 | 0 | 62 | 283 | 226 | 0 | 191 | 198 | 79 | 231 | 35 | 0 | 0 | 5 | 70 | 168 | 49 | 0 | 0 | 32 | 97 | 341 | 214 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 71 | 218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 685 | 438 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 106 | 0 | 0 | 344 | 748 | 50 | 0 | 79 | 47 |
California Ave Caltrain Station | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 1 | 0 | 0 | 0 | 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 192 | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 0 | 0 | 17 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0 | 0 |
Castro Street and El Camino Real | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 931 | 34 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 0 | 0 | 4 | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
... (60 rows omitted)
We can also use pivot
to find the shortest time of the rides between Start and End Stations. Here pivot
has been given Duration
as the optional values
argument, and min
as the function which to perform on the values in each cell.
End Station | 2nd at Folsom | 2nd at South Park | 2nd at Townsend | 5th at Howard | Adobe on Almaden | Arena Green / SAP Center | Beale at Market | Broadway St at Battery St | California Ave Caltrain Station | Castro Street and El Camino Real | Civic Center BART (7th at Market) | Clay at Battery | Commercial at Montgomery | Cowper at University | Davis at Jackson | Embarcadero at Bryant | Embarcadero at Folsom | Embarcadero at Sansome | Embarcadero at Vallejo | Evelyn Park and Ride | Franklin at Maple | Golden Gate at Polk | Grant Avenue at Columbus Avenue | Harry Bridges Plaza (Ferry Building) | Howard at 2nd | Japantown | MLK Library | Market at 10th | Market at 4th | Market at Sansome | Mechanics Plaza (Market at Battery) | Mezes Park | Mountain View Caltrain Station | Mountain View City Hall | Palo Alto Caltrain Station | Park at Olive | Paseo de San Antonio | Post at Kearny | Powell Street BART | Powell at Post (Union Square) | Redwood City Caltrain Station | Redwood City Medical Center | Redwood City Public Library | Rengstorff Avenue / California Street | Ryland Park | SJSU - San Salvador at 9th | SJSU 4th at San Carlos | San Antonio Caltrain Station | San Antonio Shopping Center | San Francisco Caltrain (Townsend at 4th) | San Francisco Caltrain 2 (330 Townsend) | San Francisco City Hall | San Jose City Hall | San Jose Civic Center | San Jose Diridon Caltrain Station | San Mateo County Center | San Pedro Square | San Salvador at 1st | Santa Clara County Civic Center | Santa Clara at Almaden | South Van Ness at Market | Spear at Folsom | St James Park | Stanford in Redwood City | Steuart at Market | Temporary Transbay Terminal (Howard at Beale) | Townsend at 7th | University and Emerson | Washington at Kearny | Yerba Buena Center of the Arts (3rd @ Howard) |
2nd at Folsom | 61 | 97 | 164 | 268 | 0 | 0 | 271 | 407 | 0 | 0 | 483 | 329 | 306 | 0 | 494 | 239 | 262 | 687 | 599 | 0 | 0 | 639 | 416 | 282 | 80 | 0 | 0 | 506 | 237 | 167 | 250 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 264 | 290 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 300 | 303 | 584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 590 | 208 | 0 | 0 | 318 | 149 | 448 | 0 | 429 | 165 |
2nd at South Park | 61 | 60 | 77 | 86 | 0 | 0 | 78 | 345 | 0 | 0 | 290 | 188 | 171 | 0 | 357 | 104 | 81 | 490 | 341 | 0 | 0 | 369 | 278 | 122 | 60 | 0 | 0 | 416 | 142 | 61 | 68 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 237 | 106 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 66 | 458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 399 | 63 | 0 | 0 | 79 | 61 | 78 | 0 | 270 | 96 |
2nd at Townsend | 137 | 67 | 60 | 423 | 0 | 0 | 311 | 469 | 0 | 0 | 546 | 520 | 474 | 0 | 436 | 145 | 232 | 509 | 494 | 0 | 0 | 773 | 549 | 325 | 221 | 0 | 0 | 667 | 367 | 265 | 395 | 0 | 0 | 0 | 0 | 0 | 0 | 319 | 455 | 398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 133 | 742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 777 | 241 | 0 | 0 | 291 | 249 | 259 | 0 | 610 | 284 |
5th at Howard | 215 | 300 | 384 | 68 | 0 | 0 | 357 | 530 | 0 | 0 | 179 | 412 | 364 | 0 | 543 | 419 | 359 | 695 | 609 | 0 | 0 | 235 | 474 | 453 | 145 | 0 | 0 | 269 | 161 | 250 | 306 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 89 | 202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 221 | 347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 375 | 402 | 0 | 0 | 455 | 265 | 357 | 0 | 553 | 109 |
Adobe on Almaden | 0 | 0 | 0 | 0 | 84 | 275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 701 | 387 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 452 | 318 | 0 | 0 | 0 | 0 | 0 | 309 | 146 | 182 | 0 | 207 | 358 | 876 | 101 | 0 | 0 | 369 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Arena Green / SAP Center | 0 | 0 | 0 | 0 | 305 | 62 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 875 | 685 | 0 | 0 | 0 | 0 | 0 | 440 | 420 | 153 | 0 | 166 | 624 | 759 | 116 | 0 | 0 | 301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Beale at Market | 219 | 343 | 417 | 387 | 0 | 0 | 60 | 155 | 0 | 0 | 343 | 122 | 153 | 0 | 115 | 216 | 170 | 303 | 198 | 0 | 0 | 437 | 235 | 149 | 204 | 0 | 0 | 535 | 203 | 88 | 72 | 0 | 0 | 0 | 0 | 0 | 0 | 191 | 316 | 191 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 395 | 526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 173 | 0 | 0 | 87 | 94 | 619 | 0 | 222 | 264 |
Broadway St at Battery St | 351 | 424 | 499 | 555 | 0 | 0 | 195 | 62 | 0 | 0 | 520 | 90 | 129 | 0 | 70 | 340 | 284 | 128 | 101 | 0 | 0 | 961 | 148 | 168 | 357 | 0 | 0 | 652 | 351 | 218 | 221 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 376 | 316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 611 | 599 | 799 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 738 | 336 | 0 | 0 | 169 | 291 | 885 | 0 | 134 | 411 |
California Ave Caltrain Station | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 1645 | 0 | 0 | 0 | 628 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1771 | 0 | 484 | 131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1077 | 0 | 0 | 0 | 870 | 911 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 531 | 0 | 0 |
Castro Street and El Camino Real | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 201 | 108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 654 | 0 | 0 | 0 | 953 | 696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
... (60 rows omitted)
Someone had a very quick trip (271 seconds, or about 4.5 minutes) from 2nd at Folsom to Beale at Market, about five blocks away. There are no bike trips between the 2nd Avenue stations and Adobe on Almaden, because the latter is in a different city.
Drawing Maps¶
The table stations
contains geographical information about each bike station, including latitude, longitude, and a "landmark" which is the name of the city where the station is located.
station_id | name | lat | long | dockcount | landmark | installation |
2 | San Jose Diridon Caltrain Station | 37.3297 | -121.902 | 27 | San Jose | 8/6/2013 |
3 | San Jose Civic Center | 37.3307 | -121.889 | 15 | San Jose | 8/5/2013 |
4 | Santa Clara at Almaden | 37.334 | -121.895 | 11 | San Jose | 8/6/2013 |
5 | Adobe on Almaden | 37.3314 | -121.893 | 19 | San Jose | 8/5/2013 |
6 | San Pedro Square | 37.3367 | -121.894 | 15 | San Jose | 8/7/2013 |
7 | Paseo de San Antonio | 37.3338 | -121.887 | 15 | San Jose | 8/7/2013 |
8 | San Salvador at 1st | 37.3302 | -121.886 | 15 | San Jose | 8/5/2013 |
9 | Japantown | 37.3487 | -121.895 | 15 | San Jose | 8/5/2013 |
10 | San Jose City Hall | 37.3374 | -121.887 | 15 | San Jose | 8/6/2013 |
11 | MLK Library | 37.3359 | -121.886 | 19 | San Jose | 8/6/2013 |
... (60 rows omitted)
We can draw a map of where the stations are located, using Marker.map_table
. The function operates on a table, whose columns are (in order) latitude, longitude, and an optional identifier for each point.
<iframe ;="" border:="" none"="" srcdoc="<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://rawgit.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.css">
<script src="https://rawgithub.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js"></script>
<link rel="stylesheet" href="https://birdage.github.io/Leaflet.awesome-markers/dist/leaflet.awesome.rotate.css">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map {
position:absolute;
top:0;
bottom:0;
right:0;
left:0;
}
</style>
</head>
<body>
<div class="folium-map" id="folium_a4626707f4a94446af60c544cd8c0c5c" style="width: 960px; height: 500px"></div>
<script>
var base_tile = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
minZoom: 8.0,
attribution: 'Map data (c) <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
});
var baseLayer = {
"Base Layer": base_tile
};
/*
addition of the wms layers
*/
/*
addition of the tile layers
*/
/*
list of layers to be added
*/
var layer_list = {
};
/*
Bounding box.
*/
var southWest = L.latLng(-90, -180),
northEast = L.latLng(90, 180),
bounds = L.latLngBounds(southWest, northEast);
/*
Creates the map and adds the selected layers
*/
var map = L.map('folium_a4626707f4a94446af60c544cd8c0c5c', {
center:[37.567251, -122.1481515],
zoom: 10.0,
maxBounds: bounds,
layers: [base_tile]
});
L.control.layers(baseLayer, layer_list).addTo(map);
//cluster group
var clusteredmarkers = L.markerClusterGroup();
//section for adding clustered markers
//add the clustered markers to the group anyway
map.addLayer(clusteredmarkers);
var marker_1_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_1 = L.marker([37.329732,
-121.901782],
{'icon':marker_1_icon}
);
marker_1.bindPopup("San Jose Diridon Caltrain Station");
marker_1._popup.options.maxWidth = 300;
map.addLayer(marker_1)
var marker_2_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_2 = L.marker([37.330698,
-121.888979],
{'icon':marker_2_icon}
);
marker_2.bindPopup("San Jose Civic Center");
marker_2._popup.options.maxWidth = 300;
map.addLayer(marker_2)
var marker_3_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_3 = L.marker([37.333988,
-121.894902],
{'icon':marker_3_icon}
);
marker_3.bindPopup("Santa Clara at Almaden");
marker_3._popup.options.maxWidth = 300;
map.addLayer(marker_3)
var marker_4_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_4 = L.marker([37.331415,
-121.8932],
{'icon':marker_4_icon}
);
marker_4.bindPopup("Adobe on Almaden");
marker_4._popup.options.maxWidth = 300;
map.addLayer(marker_4)
var marker_5_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_5 = L.marker([37.336721,
-121.894074],
{'icon':marker_5_icon}
);
marker_5.bindPopup("San Pedro Square");
marker_5._popup.options.maxWidth = 300;
map.addLayer(marker_5)
var marker_6_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_6 = L.marker([37.333798,
-121.886943],
{'icon':marker_6_icon}
);
marker_6.bindPopup("Paseo de San Antonio");
marker_6._popup.options.maxWidth = 300;
map.addLayer(marker_6)
var marker_7_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_7 = L.marker([37.330165,
-121.885831],
{'icon':marker_7_icon}
);
marker_7.bindPopup("San Salvador at 1st");
marker_7._popup.options.maxWidth = 300;
map.addLayer(marker_7)
var marker_8_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_8 = L.marker([37.348742,
-121.894715],
{'icon':marker_8_icon}
);
marker_8.bindPopup("Japantown");
marker_8._popup.options.maxWidth = 300;
map.addLayer(marker_8)
var marker_9_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_9 = L.marker([37.337391,
-121.886995],
{'icon':marker_9_icon}
);
marker_9.bindPopup("San Jose City Hall");
marker_9._popup.options.maxWidth = 300;
map.addLayer(marker_9)
var marker_10_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_10 = L.marker([37.335885,
-121.88566],
{'icon':marker_10_icon}
);
marker_10.bindPopup("MLK Library");
marker_10._popup.options.maxWidth = 300;
map.addLayer(marker_10)
var marker_11_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_11 = L.marker([37.332808,
-121.883891],
{'icon':marker_11_icon}
);
marker_11.bindPopup("SJSU 4th at San Carlos");
marker_11._popup.options.maxWidth = 300;
map.addLayer(marker_11)
var marker_12_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_12 = L.marker([37.339301,
-121.889937],
{'icon':marker_12_icon}
);
marker_12.bindPopup("St James Park");
marker_12._popup.options.maxWidth = 300;
map.addLayer(marker_12)
var marker_13_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_13 = L.marker([37.332692,
-121.900084],
{'icon':marker_13_icon}
);
marker_13.bindPopup("Arena Green / SAP Center");
marker_13._popup.options.maxWidth = 300;
map.addLayer(marker_13)
var marker_14_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_14 = L.marker([37.333955,
-121.877349],
{'icon':marker_14_icon}
);
marker_14.bindPopup("SJSU - San Salvador at 9th");
marker_14._popup.options.maxWidth = 300;
map.addLayer(marker_14)
var marker_15_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_15 = L.marker([37.481758,
-122.226904],
{'icon':marker_15_icon}
);
marker_15.bindPopup("Franklin at Maple");
marker_15._popup.options.maxWidth = 300;
map.addLayer(marker_15)
var marker_16_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_16 = L.marker([37.486078,
-122.232089],
{'icon':marker_16_icon}
);
marker_16.bindPopup("Redwood City Caltrain Station");
marker_16._popup.options.maxWidth = 300;
map.addLayer(marker_16)
var marker_17_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_17 = L.marker([37.487616,
-122.229951],
{'icon':marker_17_icon}
);
marker_17.bindPopup("San Mateo County Center");
marker_17._popup.options.maxWidth = 300;
map.addLayer(marker_17)
var marker_18_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_18 = L.marker([37.484219,
-122.227424],
{'icon':marker_18_icon}
);
marker_18.bindPopup("Redwood City Public Library");
marker_18._popup.options.maxWidth = 300;
map.addLayer(marker_18)
var marker_19_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_19 = L.marker([37.48537,
-122.203288],
{'icon':marker_19_icon}
);
marker_19.bindPopup("Stanford in Redwood City");
marker_19._popup.options.maxWidth = 300;
map.addLayer(marker_19)
var marker_20_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_20 = L.marker([37.487682,
-122.223492],
{'icon':marker_20_icon}
);
marker_20.bindPopup("Redwood City Medical Center");
marker_20._popup.options.maxWidth = 300;
map.addLayer(marker_20)
var marker_21_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_21 = L.marker([37.389218,
-122.081896],
{'icon':marker_21_icon}
);
marker_21.bindPopup("Mountain View City Hall");
marker_21._popup.options.maxWidth = 300;
map.addLayer(marker_21)
var marker_22_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_22 = L.marker([37.394358,
-122.076713],
{'icon':marker_22_icon}
);
marker_22.bindPopup("Mountain View Caltrain Station");
marker_22._popup.options.maxWidth = 300;
map.addLayer(marker_22)
var marker_23_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_23 = L.marker([37.40694,
-122.106758],
{'icon':marker_23_icon}
);
marker_23.bindPopup("San Antonio Caltrain Station");
marker_23._popup.options.maxWidth = 300;
map.addLayer(marker_23)
var marker_24_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_24 = L.marker([37.390277,
-122.066553],
{'icon':marker_24_icon}
);
marker_24.bindPopup("Evelyn Park and Ride");
marker_24._popup.options.maxWidth = 300;
map.addLayer(marker_24)
var marker_25_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_25 = L.marker([37.400443,
-122.108338],
{'icon':marker_25_icon}
);
marker_25.bindPopup("San Antonio Shopping Center");
marker_25._popup.options.maxWidth = 300;
map.addLayer(marker_25)
var marker_26_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_26 = L.marker([37.385956,
-122.083678],
{'icon':marker_26_icon}
);
marker_26.bindPopup("Castro Street and El Camino Real");
marker_26._popup.options.maxWidth = 300;
map.addLayer(marker_26)
var marker_27_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_27 = L.marker([37.400241,
-122.099076],
{'icon':marker_27_icon}
);
marker_27.bindPopup("Rengstorff Avenue / California Street");
marker_27._popup.options.maxWidth = 300;
map.addLayer(marker_27)
var marker_28_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_28 = L.marker([37.443988,
-122.164759],
{'icon':marker_28_icon}
);
marker_28.bindPopup("Palo Alto Caltrain Station");
marker_28._popup.options.maxWidth = 300;
map.addLayer(marker_28)
var marker_29_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_29 = L.marker([37.444521,
-122.163093],
{'icon':marker_29_icon}
);
marker_29.bindPopup("University and Emerson");
marker_29._popup.options.maxWidth = 300;
map.addLayer(marker_29)
var marker_30_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_30 = L.marker([37.429082,
-122.142805],
{'icon':marker_30_icon}
);
marker_30.bindPopup("California Ave Caltrain Station");
marker_30._popup.options.maxWidth = 300;
map.addLayer(marker_30)
var marker_31_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_31 = L.marker([37.448598,
-122.159504],
{'icon':marker_31_icon}
);
marker_31.bindPopup("Cowper at University");
marker_31._popup.options.maxWidth = 300;
map.addLayer(marker_31)
var marker_32_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_32 = L.marker([37.4256839,
-122.1377775],
{'icon':marker_32_icon}
);
marker_32.bindPopup("Park at Olive");
marker_32._popup.options.maxWidth = 300;
map.addLayer(marker_32)
var marker_33_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_33 = L.marker([37.795001,
-122.39997],
{'icon':marker_33_icon}
);
marker_33.bindPopup("Clay at Battery");
marker_33._popup.options.maxWidth = 300;
map.addLayer(marker_33)
var marker_34_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_34 = L.marker([37.79728,
-122.398436],
{'icon':marker_34_icon}
);
marker_34.bindPopup("Davis at Jackson");
marker_34._popup.options.maxWidth = 300;
map.addLayer(marker_34)
var marker_35_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_35 = L.marker([37.794231,
-122.402923],
{'icon':marker_35_icon}
);
marker_35.bindPopup("Commercial at Montgomery");
marker_35._popup.options.maxWidth = 300;
map.addLayer(marker_35)
var marker_36_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_36 = L.marker([37.795425,
-122.404767],
{'icon':marker_36_icon}
);
marker_36.bindPopup("Washington at Kearney");
marker_36._popup.options.maxWidth = 300;
map.addLayer(marker_36)
var marker_37_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_37 = L.marker([37.788975,
-122.403452],
{'icon':marker_37_icon}
);
marker_37.bindPopup("Post at Kearney");
marker_37._popup.options.maxWidth = 300;
map.addLayer(marker_37)
var marker_38_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_38 = L.marker([37.799953,
-122.398525],
{'icon':marker_38_icon}
);
marker_38.bindPopup("Embarcadero at Vallejo");
marker_38._popup.options.maxWidth = 300;
map.addLayer(marker_38)
var marker_39_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_39 = L.marker([37.790302,
-122.390637],
{'icon':marker_39_icon}
);
marker_39.bindPopup("Spear at Folsom");
marker_39._popup.options.maxWidth = 300;
map.addLayer(marker_39)
var marker_40_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_40 = L.marker([37.795392,
-122.394203],
{'icon':marker_40_icon}
);
marker_40.bindPopup("Harry Bridges Plaza (Ferry Building)");
marker_40._popup.options.maxWidth = 300;
map.addLayer(marker_40)
var marker_41_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_41 = L.marker([37.791464,
-122.391034],
{'icon':marker_41_icon}
);
marker_41.bindPopup("Embarcadero at Folsom");
marker_41._popup.options.maxWidth = 300;
map.addLayer(marker_41)
var marker_42_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_42 = L.marker([37.783871,
-122.408433],
{'icon':marker_42_icon}
);
marker_42.bindPopup("Powell Street BART");
marker_42._popup.options.maxWidth = 300;
map.addLayer(marker_42)
var marker_43_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_43 = L.marker([37.787152,
-122.388013],
{'icon':marker_43_icon}
);
marker_43.bindPopup("Embarcadero at Bryant");
marker_43._popup.options.maxWidth = 300;
map.addLayer(marker_43)
var marker_44_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_44 = L.marker([37.789756,
-122.394643],
{'icon':marker_44_icon}
);
marker_44.bindPopup("Temporary Transbay Terminal (Howard at Beale)");
marker_44._popup.options.maxWidth = 300;
map.addLayer(marker_44)
var marker_45_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_45 = L.marker([37.792251,
-122.397086],
{'icon':marker_45_icon}
);
marker_45.bindPopup("Beale at Market");
marker_45._popup.options.maxWidth = 300;
map.addLayer(marker_45)
var marker_46_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_46 = L.marker([37.781752,
-122.405127],
{'icon':marker_46_icon}
);
marker_46.bindPopup("5th at Howard");
marker_46._popup.options.maxWidth = 300;
map.addLayer(marker_46)
var marker_47_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_47 = L.marker([37.77865,
-122.418235],
{'icon':marker_47_icon}
);
marker_47.bindPopup("San Francisco City Hall");
marker_47._popup.options.maxWidth = 300;
map.addLayer(marker_47)
var marker_48_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_48 = L.marker([37.781332,
-122.418603],
{'icon':marker_48_icon}
);
marker_48.bindPopup("Golden Gate at Polk");
marker_48._popup.options.maxWidth = 300;
map.addLayer(marker_48)
var marker_49_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_49 = L.marker([37.80477,
-122.403234],
{'icon':marker_49_icon}
);
marker_49.bindPopup("Embarcadero at Sansome");
marker_49._popup.options.maxWidth = 300;
map.addLayer(marker_49)
var marker_50_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_50 = L.marker([37.780526,
-122.390288],
{'icon':marker_50_icon}
);
marker_50.bindPopup("2nd at Townsend");
marker_50._popup.options.maxWidth = 300;
map.addLayer(marker_50)
var marker_51_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_51 = L.marker([37.785299,
-122.396236],
{'icon':marker_51_icon}
);
marker_51.bindPopup("2nd at Folsom");
marker_51._popup.options.maxWidth = 300;
map.addLayer(marker_51)
var marker_52_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_52 = L.marker([37.786978,
-122.398108],
{'icon':marker_52_icon}
);
marker_52.bindPopup("Howard at 2nd");
marker_52._popup.options.maxWidth = 300;
map.addLayer(marker_52)
var marker_53_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_53 = L.marker([37.782259,
-122.392738],
{'icon':marker_53_icon}
);
marker_53.bindPopup("2nd at South Park");
marker_53._popup.options.maxWidth = 300;
map.addLayer(marker_53)
var marker_54_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_54 = L.marker([37.771058,
-122.402717],
{'icon':marker_54_icon}
);
marker_54.bindPopup("Townsend at 7th");
marker_54._popup.options.maxWidth = 300;
map.addLayer(marker_54)
var marker_55_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_55 = L.marker([37.774814,
-122.418954],
{'icon':marker_55_icon}
);
marker_55.bindPopup("South Van Ness at Market");
marker_55._popup.options.maxWidth = 300;
map.addLayer(marker_55)
var marker_56_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_56 = L.marker([37.776619,
-122.417385],
{'icon':marker_56_icon}
);
marker_56.bindPopup("Market at 10th");
marker_56._popup.options.maxWidth = 300;
map.addLayer(marker_56)
var marker_57_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_57 = L.marker([37.784878,
-122.401014],
{'icon':marker_57_icon}
);
marker_57.bindPopup("Yerba Buena Center of the Arts (3rd @ Howard)");
marker_57._popup.options.maxWidth = 300;
map.addLayer(marker_57)
var marker_58_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_58 = L.marker([37.7766,
-122.39547],
{'icon':marker_58_icon}
);
marker_58.bindPopup("San Francisco Caltrain 2 (330 Townsend)");
marker_58._popup.options.maxWidth = 300;
map.addLayer(marker_58)
var marker_59_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_59 = L.marker([37.776617,
-122.39526],
{'icon':marker_59_icon}
);
marker_59.bindPopup("San Francisco Caltrain (Townsend at 4th)");
marker_59._popup.options.maxWidth = 300;
map.addLayer(marker_59)
var marker_60_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_60 = L.marker([37.788446,
-122.408499],
{'icon':marker_60_icon}
);
marker_60.bindPopup("Powell at Post (Union Square)");
marker_60._popup.options.maxWidth = 300;
map.addLayer(marker_60)
var marker_61_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_61 = L.marker([37.781039,
-122.411748],
{'icon':marker_61_icon}
);
marker_61.bindPopup("Civic Center BART (7th at Market)");
marker_61._popup.options.maxWidth = 300;
map.addLayer(marker_61)
var marker_62_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_62 = L.marker([37.798522,
-122.407245],
{'icon':marker_62_icon}
);
marker_62.bindPopup("Grant Avenue at Columbus Avenue");
marker_62._popup.options.maxWidth = 300;
map.addLayer(marker_62)
var marker_63_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_63 = L.marker([37.794139,
-122.394434],
{'icon':marker_63_icon}
);
marker_63.bindPopup("Steuart at Market");
marker_63._popup.options.maxWidth = 300;
map.addLayer(marker_63)
var marker_64_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_64 = L.marker([37.7913,
-122.399051],
{'icon':marker_64_icon}
);
marker_64.bindPopup("Mechanics Plaza (Market at Battery)");
marker_64._popup.options.maxWidth = 300;
map.addLayer(marker_64)
var marker_65_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_65 = L.marker([37.786305,
-122.404966],
{'icon':marker_65_icon}
);
marker_65.bindPopup("Market at 4th");
marker_65._popup.options.maxWidth = 300;
map.addLayer(marker_65)
var marker_66_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_66 = L.marker([37.789625,
-122.400811],
{'icon':marker_66_icon}
);
marker_66.bindPopup("Market at Sansome");
marker_66._popup.options.maxWidth = 300;
map.addLayer(marker_66)
var marker_67_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_67 = L.marker([37.352601,
-121.905733],
{'icon':marker_67_icon}
);
marker_67.bindPopup("Santa Clara County Civic Center");
marker_67._popup.options.maxWidth = 300;
map.addLayer(marker_67)
var marker_68_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_68 = L.marker([37.798541,
-122.400862],
{'icon':marker_68_icon}
);
marker_68.bindPopup("Broadway St at Battery St");
marker_68._popup.options.maxWidth = 300;
map.addLayer(marker_68)
var marker_69_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_69 = L.marker([37.491269,
-122.236234],
{'icon':marker_69_icon}
);
marker_69.bindPopup("Mezes Park");
marker_69._popup.options.maxWidth = 300;
map.addLayer(marker_69)
var marker_70_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_70 = L.marker([37.342725,
-121.895617],
{'icon':marker_70_icon}
);
marker_70.bindPopup("Ryland Park");
marker_70._popup.options.maxWidth = 300;
map.addLayer(marker_70)
</script>
</body>" style="width: 960px; height: 500px"></iframe>
The map is created using OpenStreetMap, which is an open online mapping system that you can use just as you would use Google Maps or any other online map. Zoom in to San Francisco to see how the stations are distributed. Click on a marker to see which station it is.
You can also represent points on a map by colored circles. Here is such a map of the San Francisco bike stations.
<iframe ;="" border:="" none"="" srcdoc="<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://rawgit.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.css">
<script src="https://rawgithub.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js"></script>
<link rel="stylesheet" href="https://birdage.github.io/Leaflet.awesome-markers/dist/leaflet.awesome.rotate.css">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map {
position:absolute;
top:0;
bottom:0;
right:0;
left:0;
}
</style>
</head>
<body>
<div class="folium-map" id="folium_5a2652b02dfc46ff988693e411b081d5" style="width: 960px; height: 500px"></div>
<script>
var base_tile = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
minZoom: 10.0,
attribution: 'Map data (c) <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
});
var baseLayer = {
"Base Layer": base_tile
};
/*
addition of the wms layers
*/
/*
addition of the tile layers
*/
/*
list of layers to be added
*/
var layer_list = {
};
/*
Bounding box.
*/
var southWest = L.latLng(-90, -180),
northEast = L.latLng(90, 180),
bounds = L.latLngBounds(southWest, northEast);
/*
Creates the map and adds the selected layers
*/
var map = L.map('folium_5a2652b02dfc46ff988693e411b081d5', {
center:[37.787914, -122.4034835],
zoom: 12.0,
maxBounds: bounds,
layers: [base_tile]
});
L.control.layers(baseLayer, layer_list).addTo(map);
//cluster group
var clusteredmarkers = L.markerClusterGroup();
//section for adding clustered markers
//add the clustered markers to the group anyway
map.addLayer(clusteredmarkers);
var circle_1 = L.circle([37.795001, -122.39997], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_1.bindPopup("Clay at Battery");
circle_1._popup.options.maxWidth = 300;
map.addLayer(circle_1)
var circle_2 = L.circle([37.79728, -122.398436], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_2.bindPopup("Davis at Jackson");
circle_2._popup.options.maxWidth = 300;
map.addLayer(circle_2)
var circle_3 = L.circle([37.794231, -122.402923], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_3.bindPopup("Commercial at Montgomery");
circle_3._popup.options.maxWidth = 300;
map.addLayer(circle_3)
var circle_4 = L.circle([37.795425, -122.404767], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_4.bindPopup("Washington at Kearney");
circle_4._popup.options.maxWidth = 300;
map.addLayer(circle_4)
var circle_5 = L.circle([37.788975, -122.403452], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_5.bindPopup("Post at Kearney");
circle_5._popup.options.maxWidth = 300;
map.addLayer(circle_5)
var circle_6 = L.circle([37.799953, -122.398525], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_6.bindPopup("Embarcadero at Vallejo");
circle_6._popup.options.maxWidth = 300;
map.addLayer(circle_6)
var circle_7 = L.circle([37.790302, -122.390637], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_7.bindPopup("Spear at Folsom");
circle_7._popup.options.maxWidth = 300;
map.addLayer(circle_7)
var circle_8 = L.circle([37.795392, -122.394203], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_8.bindPopup("Harry Bridges Plaza (Ferry Building)");
circle_8._popup.options.maxWidth = 300;
map.addLayer(circle_8)
var circle_9 = L.circle([37.791464, -122.391034], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_9.bindPopup("Embarcadero at Folsom");
circle_9._popup.options.maxWidth = 300;
map.addLayer(circle_9)
var circle_10 = L.circle([37.783871, -122.408433], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_10.bindPopup("Powell Street BART");
circle_10._popup.options.maxWidth = 300;
map.addLayer(circle_10)
var circle_11 = L.circle([37.787152, -122.388013], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_11.bindPopup("Embarcadero at Bryant");
circle_11._popup.options.maxWidth = 300;
map.addLayer(circle_11)
var circle_12 = L.circle([37.789756, -122.394643], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_12.bindPopup("Temporary Transbay Terminal (Howard at Beale)");
circle_12._popup.options.maxWidth = 300;
map.addLayer(circle_12)
var circle_13 = L.circle([37.792251, -122.397086], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_13.bindPopup("Beale at Market");
circle_13._popup.options.maxWidth = 300;
map.addLayer(circle_13)
var circle_14 = L.circle([37.781752, -122.405127], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_14.bindPopup("5th at Howard");
circle_14._popup.options.maxWidth = 300;
map.addLayer(circle_14)
var circle_15 = L.circle([37.77865, -122.418235], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_15.bindPopup("San Francisco City Hall");
circle_15._popup.options.maxWidth = 300;
map.addLayer(circle_15)
var circle_16 = L.circle([37.781332, -122.418603], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_16.bindPopup("Golden Gate at Polk");
circle_16._popup.options.maxWidth = 300;
map.addLayer(circle_16)
var circle_17 = L.circle([37.80477, -122.403234], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_17.bindPopup("Embarcadero at Sansome");
circle_17._popup.options.maxWidth = 300;
map.addLayer(circle_17)
var circle_18 = L.circle([37.780526, -122.390288], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_18.bindPopup("2nd at Townsend");
circle_18._popup.options.maxWidth = 300;
map.addLayer(circle_18)
var circle_19 = L.circle([37.785299, -122.396236], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_19.bindPopup("2nd at Folsom");
circle_19._popup.options.maxWidth = 300;
map.addLayer(circle_19)
var circle_20 = L.circle([37.786978, -122.398108], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_20.bindPopup("Howard at 2nd");
circle_20._popup.options.maxWidth = 300;
map.addLayer(circle_20)
var circle_21 = L.circle([37.782259, -122.392738], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_21.bindPopup("2nd at South Park");
circle_21._popup.options.maxWidth = 300;
map.addLayer(circle_21)
var circle_22 = L.circle([37.771058, -122.402717], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_22.bindPopup("Townsend at 7th");
circle_22._popup.options.maxWidth = 300;
map.addLayer(circle_22)
var circle_23 = L.circle([37.774814, -122.418954], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_23.bindPopup("South Van Ness at Market");
circle_23._popup.options.maxWidth = 300;
map.addLayer(circle_23)
var circle_24 = L.circle([37.776619, -122.417385], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_24.bindPopup("Market at 10th");
circle_24._popup.options.maxWidth = 300;
map.addLayer(circle_24)
var circle_25 = L.circle([37.784878, -122.401014], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_25.bindPopup("Yerba Buena Center of the Arts (3rd @ Howard)");
circle_25._popup.options.maxWidth = 300;
map.addLayer(circle_25)
var circle_26 = L.circle([37.7766, -122.39547], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_26.bindPopup("San Francisco Caltrain 2 (330 Townsend)");
circle_26._popup.options.maxWidth = 300;
map.addLayer(circle_26)
var circle_27 = L.circle([37.776617, -122.39526], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_27.bindPopup("San Francisco Caltrain (Townsend at 4th)");
circle_27._popup.options.maxWidth = 300;
map.addLayer(circle_27)
var circle_28 = L.circle([37.788446, -122.408499], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_28.bindPopup("Powell at Post (Union Square)");
circle_28._popup.options.maxWidth = 300;
map.addLayer(circle_28)
var circle_29 = L.circle([37.781039, -122.411748], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_29.bindPopup("Civic Center BART (7th at Market)");
circle_29._popup.options.maxWidth = 300;
map.addLayer(circle_29)
var circle_30 = L.circle([37.798522, -122.407245], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_30.bindPopup("Grant Avenue at Columbus Avenue");
circle_30._popup.options.maxWidth = 300;
map.addLayer(circle_30)
var circle_31 = L.circle([37.794139, -122.394434], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_31.bindPopup("Steuart at Market");
circle_31._popup.options.maxWidth = 300;
map.addLayer(circle_31)
var circle_32 = L.circle([37.7913, -122.399051], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_32.bindPopup("Mechanics Plaza (Market at Battery)");
circle_32._popup.options.maxWidth = 300;
map.addLayer(circle_32)
var circle_33 = L.circle([37.786305, -122.404966], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_33.bindPopup("Market at 4th");
circle_33._popup.options.maxWidth = 300;
map.addLayer(circle_33)
var circle_34 = L.circle([37.789625, -122.400811], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_34.bindPopup("Market at Sansome");
circle_34._popup.options.maxWidth = 300;
map.addLayer(circle_34)
var circle_35 = L.circle([37.798541, -122.400862], 200, {
color: 'None',
fillColor: 'green',
fillOpacity: 0.6
});
circle_35.bindPopup("Broadway St at Battery St");
circle_35._popup.options.maxWidth = 300;
map.addLayer(circle_35)
</script>
</body>" style="width: 960px; height: 500px"></iframe>
The bike stations are located in five different cities in the Bay Area. To distinguish the points by using a different color for each city, let's start by using group to identify all the cities and assign each one a color.
city | count |
Mountain View | 7 |
Palo Alto | 5 |
Redwood City | 7 |
San Francisco | 35 |
San Jose | 16 |
city | count | color |
Mountain View | 7 | blue |
Palo Alto | 5 | red |
Redwood City | 7 | green |
San Francisco | 35 | orange |
San Jose | 16 | purple |
Now we can join stations
and colors
by landmark
, and then select the columns we need to draw a map.
<iframe ;="" border:="" none"="" srcdoc="<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://rawgit.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.css">
<script src="https://rawgithub.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js"></script>
<link rel="stylesheet" href="https://birdage.github.io/Leaflet.awesome-markers/dist/leaflet.awesome.rotate.css">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map {
position:absolute;
top:0;
bottom:0;
right:0;
left:0;
}
</style>
</head>
<body>
<div class="folium-map" id="folium_e906e753fc124c3c95b0b66a279388b6" style="width: 960px; height: 500px"></div>
<script>
var base_tile = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
minZoom: 8.0,
attribution: 'Map data (c) <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
});
var baseLayer = {
"Base Layer": base_tile
};
/*
addition of the wms layers
*/
/*
addition of the tile layers
*/
/*
list of layers to be added
*/
var layer_list = {
};
/*
Bounding box.
*/
var southWest = L.latLng(-90, -180),
northEast = L.latLng(90, 180),
bounds = L.latLngBounds(southWest, northEast);
/*
Creates the map and adds the selected layers
*/
var map = L.map('folium_e906e753fc124c3c95b0b66a279388b6', {
center:[37.567251, -122.1481515],
zoom: 10.0,
maxBounds: bounds,
layers: [base_tile]
});
L.control.layers(baseLayer, layer_list).addTo(map);
//cluster group
var clusteredmarkers = L.markerClusterGroup();
//section for adding clustered markers
//add the clustered markers to the group anyway
map.addLayer(clusteredmarkers);
var marker_1_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_1 = L.marker([37.389218,
-122.081896],
{'icon':marker_1_icon}
);
marker_1.bindPopup("Mountain View City Hall");
marker_1._popup.options.maxWidth = 300;
map.addLayer(marker_1)
var marker_2_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_2 = L.marker([37.394358,
-122.076713],
{'icon':marker_2_icon}
);
marker_2.bindPopup("Mountain View Caltrain Station");
marker_2._popup.options.maxWidth = 300;
map.addLayer(marker_2)
var marker_3_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_3 = L.marker([37.40694,
-122.106758],
{'icon':marker_3_icon}
);
marker_3.bindPopup("San Antonio Caltrain Station");
marker_3._popup.options.maxWidth = 300;
map.addLayer(marker_3)
var marker_4_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_4 = L.marker([37.390277,
-122.066553],
{'icon':marker_4_icon}
);
marker_4.bindPopup("Evelyn Park and Ride");
marker_4._popup.options.maxWidth = 300;
map.addLayer(marker_4)
var marker_5_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_5 = L.marker([37.400443,
-122.108338],
{'icon':marker_5_icon}
);
marker_5.bindPopup("San Antonio Shopping Center");
marker_5._popup.options.maxWidth = 300;
map.addLayer(marker_5)
var marker_6_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_6 = L.marker([37.385956,
-122.083678],
{'icon':marker_6_icon}
);
marker_6.bindPopup("Castro Street and El Camino Real");
marker_6._popup.options.maxWidth = 300;
map.addLayer(marker_6)
var marker_7_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'blue',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_7 = L.marker([37.400241,
-122.099076],
{'icon':marker_7_icon}
);
marker_7.bindPopup("Rengstorff Avenue / California Street");
marker_7._popup.options.maxWidth = 300;
map.addLayer(marker_7)
var marker_8_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'red',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_8 = L.marker([37.443988,
-122.164759],
{'icon':marker_8_icon}
);
marker_8.bindPopup("Palo Alto Caltrain Station");
marker_8._popup.options.maxWidth = 300;
map.addLayer(marker_8)
var marker_9_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'red',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_9 = L.marker([37.444521,
-122.163093],
{'icon':marker_9_icon}
);
marker_9.bindPopup("University and Emerson");
marker_9._popup.options.maxWidth = 300;
map.addLayer(marker_9)
var marker_10_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'red',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_10 = L.marker([37.429082,
-122.142805],
{'icon':marker_10_icon}
);
marker_10.bindPopup("California Ave Caltrain Station");
marker_10._popup.options.maxWidth = 300;
map.addLayer(marker_10)
var marker_11_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'red',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_11 = L.marker([37.448598,
-122.159504],
{'icon':marker_11_icon}
);
marker_11.bindPopup("Cowper at University");
marker_11._popup.options.maxWidth = 300;
map.addLayer(marker_11)
var marker_12_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'red',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_12 = L.marker([37.4256839,
-122.1377775],
{'icon':marker_12_icon}
);
marker_12.bindPopup("Park at Olive");
marker_12._popup.options.maxWidth = 300;
map.addLayer(marker_12)
var marker_13_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_13 = L.marker([37.481758,
-122.226904],
{'icon':marker_13_icon}
);
marker_13.bindPopup("Franklin at Maple");
marker_13._popup.options.maxWidth = 300;
map.addLayer(marker_13)
var marker_14_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_14 = L.marker([37.486078,
-122.232089],
{'icon':marker_14_icon}
);
marker_14.bindPopup("Redwood City Caltrain Station");
marker_14._popup.options.maxWidth = 300;
map.addLayer(marker_14)
var marker_15_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_15 = L.marker([37.487616,
-122.229951],
{'icon':marker_15_icon}
);
marker_15.bindPopup("San Mateo County Center");
marker_15._popup.options.maxWidth = 300;
map.addLayer(marker_15)
var marker_16_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_16 = L.marker([37.484219,
-122.227424],
{'icon':marker_16_icon}
);
marker_16.bindPopup("Redwood City Public Library");
marker_16._popup.options.maxWidth = 300;
map.addLayer(marker_16)
var marker_17_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_17 = L.marker([37.48537,
-122.203288],
{'icon':marker_17_icon}
);
marker_17.bindPopup("Stanford in Redwood City");
marker_17._popup.options.maxWidth = 300;
map.addLayer(marker_17)
var marker_18_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_18 = L.marker([37.487682,
-122.223492],
{'icon':marker_18_icon}
);
marker_18.bindPopup("Redwood City Medical Center");
marker_18._popup.options.maxWidth = 300;
map.addLayer(marker_18)
var marker_19_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'green',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_19 = L.marker([37.491269,
-122.236234],
{'icon':marker_19_icon}
);
marker_19.bindPopup("Mezes Park");
marker_19._popup.options.maxWidth = 300;
map.addLayer(marker_19)
var marker_20_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_20 = L.marker([37.795001,
-122.39997],
{'icon':marker_20_icon}
);
marker_20.bindPopup("Clay at Battery");
marker_20._popup.options.maxWidth = 300;
map.addLayer(marker_20)
var marker_21_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_21 = L.marker([37.79728,
-122.398436],
{'icon':marker_21_icon}
);
marker_21.bindPopup("Davis at Jackson");
marker_21._popup.options.maxWidth = 300;
map.addLayer(marker_21)
var marker_22_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_22 = L.marker([37.794231,
-122.402923],
{'icon':marker_22_icon}
);
marker_22.bindPopup("Commercial at Montgomery");
marker_22._popup.options.maxWidth = 300;
map.addLayer(marker_22)
var marker_23_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_23 = L.marker([37.795425,
-122.404767],
{'icon':marker_23_icon}
);
marker_23.bindPopup("Washington at Kearney");
marker_23._popup.options.maxWidth = 300;
map.addLayer(marker_23)
var marker_24_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_24 = L.marker([37.788975,
-122.403452],
{'icon':marker_24_icon}
);
marker_24.bindPopup("Post at Kearney");
marker_24._popup.options.maxWidth = 300;
map.addLayer(marker_24)
var marker_25_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_25 = L.marker([37.799953,
-122.398525],
{'icon':marker_25_icon}
);
marker_25.bindPopup("Embarcadero at Vallejo");
marker_25._popup.options.maxWidth = 300;
map.addLayer(marker_25)
var marker_26_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_26 = L.marker([37.790302,
-122.390637],
{'icon':marker_26_icon}
);
marker_26.bindPopup("Spear at Folsom");
marker_26._popup.options.maxWidth = 300;
map.addLayer(marker_26)
var marker_27_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_27 = L.marker([37.795392,
-122.394203],
{'icon':marker_27_icon}
);
marker_27.bindPopup("Harry Bridges Plaza (Ferry Building)");
marker_27._popup.options.maxWidth = 300;
map.addLayer(marker_27)
var marker_28_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_28 = L.marker([37.791464,
-122.391034],
{'icon':marker_28_icon}
);
marker_28.bindPopup("Embarcadero at Folsom");
marker_28._popup.options.maxWidth = 300;
map.addLayer(marker_28)
var marker_29_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_29 = L.marker([37.783871,
-122.408433],
{'icon':marker_29_icon}
);
marker_29.bindPopup("Powell Street BART");
marker_29._popup.options.maxWidth = 300;
map.addLayer(marker_29)
var marker_30_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_30 = L.marker([37.787152,
-122.388013],
{'icon':marker_30_icon}
);
marker_30.bindPopup("Embarcadero at Bryant");
marker_30._popup.options.maxWidth = 300;
map.addLayer(marker_30)
var marker_31_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_31 = L.marker([37.789756,
-122.394643],
{'icon':marker_31_icon}
);
marker_31.bindPopup("Temporary Transbay Terminal (Howard at Beale)");
marker_31._popup.options.maxWidth = 300;
map.addLayer(marker_31)
var marker_32_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_32 = L.marker([37.792251,
-122.397086],
{'icon':marker_32_icon}
);
marker_32.bindPopup("Beale at Market");
marker_32._popup.options.maxWidth = 300;
map.addLayer(marker_32)
var marker_33_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_33 = L.marker([37.781752,
-122.405127],
{'icon':marker_33_icon}
);
marker_33.bindPopup("5th at Howard");
marker_33._popup.options.maxWidth = 300;
map.addLayer(marker_33)
var marker_34_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_34 = L.marker([37.77865,
-122.418235],
{'icon':marker_34_icon}
);
marker_34.bindPopup("San Francisco City Hall");
marker_34._popup.options.maxWidth = 300;
map.addLayer(marker_34)
var marker_35_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_35 = L.marker([37.781332,
-122.418603],
{'icon':marker_35_icon}
);
marker_35.bindPopup("Golden Gate at Polk");
marker_35._popup.options.maxWidth = 300;
map.addLayer(marker_35)
var marker_36_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_36 = L.marker([37.80477,
-122.403234],
{'icon':marker_36_icon}
);
marker_36.bindPopup("Embarcadero at Sansome");
marker_36._popup.options.maxWidth = 300;
map.addLayer(marker_36)
var marker_37_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_37 = L.marker([37.780526,
-122.390288],
{'icon':marker_37_icon}
);
marker_37.bindPopup("2nd at Townsend");
marker_37._popup.options.maxWidth = 300;
map.addLayer(marker_37)
var marker_38_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_38 = L.marker([37.785299,
-122.396236],
{'icon':marker_38_icon}
);
marker_38.bindPopup("2nd at Folsom");
marker_38._popup.options.maxWidth = 300;
map.addLayer(marker_38)
var marker_39_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_39 = L.marker([37.786978,
-122.398108],
{'icon':marker_39_icon}
);
marker_39.bindPopup("Howard at 2nd");
marker_39._popup.options.maxWidth = 300;
map.addLayer(marker_39)
var marker_40_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_40 = L.marker([37.782259,
-122.392738],
{'icon':marker_40_icon}
);
marker_40.bindPopup("2nd at South Park");
marker_40._popup.options.maxWidth = 300;
map.addLayer(marker_40)
var marker_41_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_41 = L.marker([37.771058,
-122.402717],
{'icon':marker_41_icon}
);
marker_41.bindPopup("Townsend at 7th");
marker_41._popup.options.maxWidth = 300;
map.addLayer(marker_41)
var marker_42_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_42 = L.marker([37.774814,
-122.418954],
{'icon':marker_42_icon}
);
marker_42.bindPopup("South Van Ness at Market");
marker_42._popup.options.maxWidth = 300;
map.addLayer(marker_42)
var marker_43_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_43 = L.marker([37.776619,
-122.417385],
{'icon':marker_43_icon}
);
marker_43.bindPopup("Market at 10th");
marker_43._popup.options.maxWidth = 300;
map.addLayer(marker_43)
var marker_44_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_44 = L.marker([37.784878,
-122.401014],
{'icon':marker_44_icon}
);
marker_44.bindPopup("Yerba Buena Center of the Arts (3rd @ Howard)");
marker_44._popup.options.maxWidth = 300;
map.addLayer(marker_44)
var marker_45_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_45 = L.marker([37.7766,
-122.39547],
{'icon':marker_45_icon}
);
marker_45.bindPopup("San Francisco Caltrain 2 (330 Townsend)");
marker_45._popup.options.maxWidth = 300;
map.addLayer(marker_45)
var marker_46_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_46 = L.marker([37.776617,
-122.39526],
{'icon':marker_46_icon}
);
marker_46.bindPopup("San Francisco Caltrain (Townsend at 4th)");
marker_46._popup.options.maxWidth = 300;
map.addLayer(marker_46)
var marker_47_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_47 = L.marker([37.788446,
-122.408499],
{'icon':marker_47_icon}
);
marker_47.bindPopup("Powell at Post (Union Square)");
marker_47._popup.options.maxWidth = 300;
map.addLayer(marker_47)
var marker_48_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_48 = L.marker([37.781039,
-122.411748],
{'icon':marker_48_icon}
);
marker_48.bindPopup("Civic Center BART (7th at Market)");
marker_48._popup.options.maxWidth = 300;
map.addLayer(marker_48)
var marker_49_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_49 = L.marker([37.798522,
-122.407245],
{'icon':marker_49_icon}
);
marker_49.bindPopup("Grant Avenue at Columbus Avenue");
marker_49._popup.options.maxWidth = 300;
map.addLayer(marker_49)
var marker_50_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_50 = L.marker([37.794139,
-122.394434],
{'icon':marker_50_icon}
);
marker_50.bindPopup("Steuart at Market");
marker_50._popup.options.maxWidth = 300;
map.addLayer(marker_50)
var marker_51_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_51 = L.marker([37.7913,
-122.399051],
{'icon':marker_51_icon}
);
marker_51.bindPopup("Mechanics Plaza (Market at Battery)");
marker_51._popup.options.maxWidth = 300;
map.addLayer(marker_51)
var marker_52_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_52 = L.marker([37.786305,
-122.404966],
{'icon':marker_52_icon}
);
marker_52.bindPopup("Market at 4th");
marker_52._popup.options.maxWidth = 300;
map.addLayer(marker_52)
var marker_53_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_53 = L.marker([37.789625,
-122.400811],
{'icon':marker_53_icon}
);
marker_53.bindPopup("Market at Sansome");
marker_53._popup.options.maxWidth = 300;
map.addLayer(marker_53)
var marker_54_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'orange',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_54 = L.marker([37.798541,
-122.400862],
{'icon':marker_54_icon}
);
marker_54.bindPopup("Broadway St at Battery St");
marker_54._popup.options.maxWidth = 300;
map.addLayer(marker_54)
var marker_55_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_55 = L.marker([37.329732,
-121.901782],
{'icon':marker_55_icon}
);
marker_55.bindPopup("San Jose Diridon Caltrain Station");
marker_55._popup.options.maxWidth = 300;
map.addLayer(marker_55)
var marker_56_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_56 = L.marker([37.330698,
-121.888979],
{'icon':marker_56_icon}
);
marker_56.bindPopup("San Jose Civic Center");
marker_56._popup.options.maxWidth = 300;
map.addLayer(marker_56)
var marker_57_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_57 = L.marker([37.333988,
-121.894902],
{'icon':marker_57_icon}
);
marker_57.bindPopup("Santa Clara at Almaden");
marker_57._popup.options.maxWidth = 300;
map.addLayer(marker_57)
var marker_58_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_58 = L.marker([37.331415,
-121.8932],
{'icon':marker_58_icon}
);
marker_58.bindPopup("Adobe on Almaden");
marker_58._popup.options.maxWidth = 300;
map.addLayer(marker_58)
var marker_59_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_59 = L.marker([37.336721,
-121.894074],
{'icon':marker_59_icon}
);
marker_59.bindPopup("San Pedro Square");
marker_59._popup.options.maxWidth = 300;
map.addLayer(marker_59)
var marker_60_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_60 = L.marker([37.333798,
-121.886943],
{'icon':marker_60_icon}
);
marker_60.bindPopup("Paseo de San Antonio");
marker_60._popup.options.maxWidth = 300;
map.addLayer(marker_60)
var marker_61_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_61 = L.marker([37.330165,
-121.885831],
{'icon':marker_61_icon}
);
marker_61.bindPopup("San Salvador at 1st");
marker_61._popup.options.maxWidth = 300;
map.addLayer(marker_61)
var marker_62_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_62 = L.marker([37.348742,
-121.894715],
{'icon':marker_62_icon}
);
marker_62.bindPopup("Japantown");
marker_62._popup.options.maxWidth = 300;
map.addLayer(marker_62)
var marker_63_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_63 = L.marker([37.337391,
-121.886995],
{'icon':marker_63_icon}
);
marker_63.bindPopup("San Jose City Hall");
marker_63._popup.options.maxWidth = 300;
map.addLayer(marker_63)
var marker_64_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_64 = L.marker([37.335885,
-121.88566],
{'icon':marker_64_icon}
);
marker_64.bindPopup("MLK Library");
marker_64._popup.options.maxWidth = 300;
map.addLayer(marker_64)
var marker_65_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_65 = L.marker([37.332808,
-121.883891],
{'icon':marker_65_icon}
);
marker_65.bindPopup("SJSU 4th at San Carlos");
marker_65._popup.options.maxWidth = 300;
map.addLayer(marker_65)
var marker_66_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_66 = L.marker([37.339301,
-121.889937],
{'icon':marker_66_icon}
);
marker_66.bindPopup("St James Park");
marker_66._popup.options.maxWidth = 300;
map.addLayer(marker_66)
var marker_67_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_67 = L.marker([37.332692,
-121.900084],
{'icon':marker_67_icon}
);
marker_67.bindPopup("Arena Green / SAP Center");
marker_67._popup.options.maxWidth = 300;
map.addLayer(marker_67)
var marker_68_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_68 = L.marker([37.333955,
-121.877349],
{'icon':marker_68_icon}
);
marker_68.bindPopup("SJSU - San Salvador at 9th");
marker_68._popup.options.maxWidth = 300;
map.addLayer(marker_68)
var marker_69_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_69 = L.marker([37.352601,
-121.905733],
{'icon':marker_69_icon}
);
marker_69.bindPopup("Santa Clara County Civic Center");
marker_69._popup.options.maxWidth = 300;
map.addLayer(marker_69)
var marker_70_icon = L.AwesomeMarkers.icon({ icon: 'info-sign',markerColor: 'purple',prefix: 'glyphicon',extraClasses: 'fa-rotate-0'});
var marker_70 = L.marker([37.342725,
-121.895617],
{'icon':marker_70_icon}
);
marker_70.bindPopup("Ryland Park");
marker_70._popup.options.maxWidth = 300;
map.addLayer(marker_70)
</script>
</body>" style="width: 960px; height: 500px"></iframe>
Now the markers have five different colors for the five different cities.
To see where most of the bike rentals originate, let's identify the start stations:
Start Station | count |
San Francisco Caltrain (Townsend at 4th) | 25858 |
San Francisco Caltrain 2 (330 Townsend) | 21523 |
Harry Bridges Plaza (Ferry Building) | 15543 |
Temporary Transbay Terminal (Howard at Beale) | 14298 |
2nd at Townsend | 13674 |
Townsend at 7th | 13579 |
Steuart at Market | 13215 |
Embarcadero at Sansome | 12842 |
Market at 10th | 11523 |
Market at Sansome | 11023 |
... (60 rows omitted)
We can include the geographical data needed to map these stations, by first joining starts
with stations
:
name | station_id | lat | long | dockcount | landmark | installation | count |
2nd at Folsom | 62 | 37.7853 | -122.396 | 19 | San Francisco | 8/22/2013 | 7841 |
2nd at South Park | 64 | 37.7823 | -122.393 | 15 | San Francisco | 8/22/2013 | 9274 |
2nd at Townsend | 61 | 37.7805 | -122.39 | 27 | San Francisco | 8/22/2013 | 13674 |
5th at Howard | 57 | 37.7818 | -122.405 | 15 | San Francisco | 8/21/2013 | 7394 |
Adobe on Almaden | 5 | 37.3314 | -121.893 | 19 | San Jose | 8/5/2013 | 522 |
Arena Green / SAP Center | 14 | 37.3327 | -121.9 | 19 | San Jose | 8/5/2013 | 590 |
Beale at Market | 56 | 37.7923 | -122.397 | 19 | San Francisco | 8/20/2013 | 8135 |
Broadway St at Battery St | 82 | 37.7985 | -122.401 | 15 | San Francisco | 1/22/2014 | 7460 |
California Ave Caltrain Station | 36 | 37.4291 | -122.143 | 15 | Palo Alto | 8/14/2013 | 300 |
Castro Street and El Camino Real | 32 | 37.386 | -122.084 | 11 | Mountain View | 12/31/2013 | 1137 |
... (58 rows omitted)
Now we extract just the data needed for drawing our map, adding a color and an area to each station. The area is 1000 times the count of the number of rentals starting at each station, where the constant 1000 was chosen so that the circles would appear at an appropriate scale on the map.
lat | long | name | color | area |
37.7853 | -122.396 | 2nd at Folsom | blue | 7841000 |
37.7823 | -122.393 | 2nd at South Park | blue | 9274000 |
37.7805 | -122.39 | 2nd at Townsend | blue | 13674000 |
... (65 rows omitted)
<iframe ;="" border:="" none"="" srcdoc="<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://rawgit.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.css">
<script src="https://rawgithub.com/lvoogdt/Leaflet.awesome-markers/2.0/develop/dist/leaflet.awesome-markers.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js"></script>
<link rel="stylesheet" href="https://birdage.github.io/Leaflet.awesome-markers/dist/leaflet.awesome.rotate.css">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map {
position:absolute;
top:0;
bottom:0;
right:0;
left:0;
}
</style>
</head>
<body>
<div class="folium-map" id="folium_9b717b5ecda8467c8ce61b280e3b4a71" style="width: 960px; height: 500px"></div>
<script>
var base_tile = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 17,
minZoom: 8.0,
attribution: 'Map data (c) <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
});
var baseLayer = {
"Base Layer": base_tile
};
/*
addition of the wms layers
*/
/*
addition of the tile layers
*/
/*
list of layers to be added
*/
var layer_list = {
};
/*
Bounding box.
*/
var southWest = L.latLng(-90, -180),
northEast = L.latLng(90, 180),
bounds = L.latLngBounds(southWest, northEast);
/*
Creates the map and adds the selected layers
*/
var map = L.map('folium_9b717b5ecda8467c8ce61b280e3b4a71', {
center:[37.567251, -122.1481515],
zoom: 10.0,
maxBounds: bounds,
layers: [base_tile]
});
L.control.layers(baseLayer, layer_list).addTo(map);
//cluster group
var clusteredmarkers = L.markerClusterGroup();
//section for adding clustered markers
//add the clustered markers to the group anyway
map.addLayer(clusteredmarkers);
var circle_1 = L.circle([37.785299, -122.396236], 891.324520553, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_1.bindPopup("2nd at Folsom");
circle_1._popup.options.maxWidth = 300;
map.addLayer(circle_1)
var circle_2 = L.circle([37.782259, -122.392738], 969.356826509, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_2.bindPopup("2nd at South Park");
circle_2._popup.options.maxWidth = 300;
map.addLayer(circle_2)
var circle_3 = L.circle([37.780526, -122.390288], 1177.05814008, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_3.bindPopup("2nd at Townsend");
circle_3._popup.options.maxWidth = 300;
map.addLayer(circle_3)
var circle_4 = L.circle([37.781752, -122.405127], 865.545395604, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_4.bindPopup("5th at Howard");
circle_4._popup.options.maxWidth = 300;
map.addLayer(circle_4)
var circle_5 = L.circle([37.331415, -121.8932], 229.977515991, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_5.bindPopup("Adobe on Almaden");
circle_5._popup.options.maxWidth = 300;
map.addLayer(circle_5)
var circle_6 = L.circle([37.332692, -121.900084], 244.498462877, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_6.bindPopup("Arena Green / SAP Center");
circle_6._popup.options.maxWidth = 300;
map.addLayer(circle_6)
var circle_7 = L.circle([37.792251, -122.397086], 907.880955264, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_7.bindPopup("Beale at Market");
circle_7._popup.options.maxWidth = 300;
map.addLayer(circle_7)
var circle_8 = L.circle([37.798541, -122.400862], 869.399810198, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_8.bindPopup("Broadway St at Battery St");
circle_8._popup.options.maxWidth = 300;
map.addLayer(circle_8)
var circle_9 = L.circle([37.429082, -122.142805], 174.34550494, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_9.bindPopup("California Ave Caltrain Station");
circle_9._popup.options.maxWidth = 300;
map.addLayer(circle_9)
var circle_10 = L.circle([37.385956, -122.083678], 339.414474944, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_10.bindPopup("Castro Street and El Camino Real");
circle_10._popup.options.maxWidth = 300;
map.addLayer(circle_10)
var circle_11 = L.circle([37.781039, -122.411748], 866.539838653, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_11.bindPopup("Civic Center BART (7th at Market)");
circle_11._popup.options.maxWidth = 300;
map.addLayer(circle_11)
var circle_12 = L.circle([37.795001, -122.39997], 697.890342223, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_12.bindPopup("Clay at Battery");
circle_12._popup.options.maxWidth = 300;
map.addLayer(circle_12)
var circle_13 = L.circle([37.794231, -122.402923], 769.823098591, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_13.bindPopup("Commercial at Montgomery");
circle_13._popup.options.maxWidth = 300;
map.addLayer(circle_13)
var circle_14 = L.circle([37.448598, -122.159504], 225.753306448, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_14.bindPopup("Cowper at University");
circle_14._popup.options.maxWidth = 300;
map.addLayer(circle_14)
var circle_15 = L.circle([37.79728, -122.398436], 705.471228365, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_15.bindPopup("Davis at Jackson");
circle_15._popup.options.maxWidth = 300;
map.addLayer(circle_15)
var circle_16 = L.circle([37.787152, -122.388013], 850.548794136, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_16.bindPopup("Embarcadero at Bryant");
circle_16._popup.options.maxWidth = 300;
map.addLayer(circle_16)
var circle_17 = L.circle([37.791464, -122.391034], 862.143957353, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_17.bindPopup("Embarcadero at Folsom");
circle_17._popup.options.maxWidth = 300;
map.addLayer(circle_17)
var circle_18 = L.circle([37.80477, -122.403234], 1140.686916, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_18.bindPopup("Embarcadero at Sansome");
circle_18._popup.options.maxWidth = 300;
map.addLayer(circle_18)
var circle_19 = L.circle([37.799953, -122.398525], 670.342785039, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_19.bindPopup("Embarcadero at Vallejo");
circle_19._popup.options.maxWidth = 300;
map.addLayer(circle_19)
var circle_20 = L.circle([37.390277, -122.066553], 302.812931026, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_20.bindPopup("Evelyn Park and Ride");
circle_20._popup.options.maxWidth = 300;
map.addLayer(circle_20)
var circle_21 = L.circle([37.481758, -122.226904], 79.2585224807, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_21.bindPopup("Franklin at Maple");
circle_21._popup.options.maxWidth = 300;
map.addLayer(circle_21)
var circle_22 = L.circle([37.781332, -122.418603], 592.518270875, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_22.bindPopup("Golden Gate at Polk");
circle_22._popup.options.maxWidth = 300;
map.addLayer(circle_22)
var circle_23 = L.circle([37.798522, -122.407245], 894.784886518, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_23.bindPopup("Grant Avenue at Columbus Avenue");
circle_23._popup.options.maxWidth = 300;
map.addLayer(circle_23)
var circle_24 = L.circle([37.795392, -122.394203], 1254.9243632, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_24.bindPopup("Harry Bridges Plaza (Ferry Building)");
circle_24._popup.options.maxWidth = 300;
map.addLayer(circle_24)
var circle_25 = L.circle([37.786978, -122.398108], 811.346861782, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_25.bindPopup("Howard at 2nd");
circle_25._popup.options.maxWidth = 300;
map.addLayer(circle_25)
var circle_26 = L.circle([37.348742, -121.894715], 286.125001325, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_26.bindPopup("Japantown");
circle_26._popup.options.maxWidth = 300;
map.addLayer(circle_26)
var circle_27 = L.circle([37.335885, -121.88566], 323.206033878, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_27.bindPopup("MLK Library");
circle_27._popup.options.maxWidth = 300;
map.addLayer(circle_27)
var circle_28 = L.circle([37.776619, -122.417385], 1080.52024466, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_28.bindPopup("Market at 10th");
circle_28._popup.options.maxWidth = 300;
map.addLayer(circle_28)
var circle_29 = L.circle([37.786305, -122.404966], 967.002173646, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_29.bindPopup("Market at 4th");
circle_29._popup.options.maxWidth = 300;
map.addLayer(circle_29)
var circle_30 = L.circle([37.789625, -122.400811], 1056.81758468, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_30.bindPopup("Market at Sansome");
circle_30._popup.options.maxWidth = 300;
map.addLayer(circle_30)
var circle_31 = L.circle([37.7913, -122.399051], 770.349383457, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_31.bindPopup("Mechanics Plaza (Market at Battery)");
circle_31._popup.options.maxWidth = 300;
map.addLayer(circle_31)
var circle_32 = L.circle([37.491269, -122.236234], 138.382454482, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_32.bindPopup("Mezes Park");
circle_32._popup.options.maxWidth = 300;
map.addLayer(circle_32)
var circle_33 = L.circle([37.394358, -122.076713], 582.863559294, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_33.bindPopup("Mountain View Caltrain Station");
circle_33._popup.options.maxWidth = 300;
map.addLayer(circle_33)
var circle_34 = L.circle([37.389218, -122.081896], 388.155381357, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_34.bindPopup("Mountain View City Hall");
circle_34._popup.options.maxWidth = 300;
map.addLayer(circle_34)
var circle_35 = L.circle([37.443988, -122.164759], 299.617370503, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_35.bindPopup("Palo Alto Caltrain Station");
circle_35._popup.options.maxWidth = 300;
map.addLayer(circle_35)
var circle_36 = L.circle([37.4256839, -122.1377775], 178.367182138, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_36.bindPopup("Park at Olive");
circle_36._popup.options.maxWidth = 300;
map.addLayer(circle_36)
var circle_37 = L.circle([37.333798, -121.886943], 282.920015336, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_37.bindPopup("Paseo de San Antonio");
circle_37._popup.options.maxWidth = 300;
map.addLayer(circle_37)
var circle_38 = L.circle([37.783871, -122.408433], 956.043094027, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_38.bindPopup("Powell Street BART");
circle_38._popup.options.maxWidth = 300;
map.addLayer(circle_38)
var circle_39 = L.circle([37.788446, -122.408499], 773.499572985, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_39.bindPopup("Powell at Post (Union Square)");
circle_39._popup.options.maxWidth = 300;
map.addLayer(circle_39)
var circle_40 = L.circle([37.486078, -122.232089], 289.4695474, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_40.bindPopup("Redwood City Caltrain Station");
circle_40._popup.options.maxWidth = 300;
map.addLayer(circle_40)
var circle_41 = L.circle([37.487682, -122.223492], 118.674531919, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_41.bindPopup("Redwood City Medical Center");
circle_41._popup.options.maxWidth = 300;
map.addLayer(circle_41)
var circle_42 = L.circle([37.484219, -122.227424], 101.160464352, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_42.bindPopup("Redwood City Public Library");
circle_42._popup.options.maxWidth = 300;
map.addLayer(circle_42)
var circle_43 = L.circle([37.400241, -122.099076], 215.418434931, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_43.bindPopup("Rengstorff Avenue / California Street");
circle_43._popup.options.maxWidth = 300;
map.addLayer(circle_43)
var circle_44 = L.circle([37.342725, -121.895617], 330.337577007, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_44.bindPopup("Ryland Park");
circle_44._popup.options.maxWidth = 300;
map.addLayer(circle_44)
var circle_45 = L.circle([37.333955, -121.877349], 217.5246946, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_45.bindPopup("SJSU - San Salvador at 9th");
circle_45._popup.options.maxWidth = 300;
map.addLayer(circle_45)
var circle_46 = L.circle([37.332808, -121.883891], 210.90282032, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_46.bindPopup("SJSU 4th at San Carlos");
circle_46._popup.options.maxWidth = 300;
map.addLayer(circle_46)
var circle_47 = L.circle([37.40694, -122.106758], 314.62802866, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_47.bindPopup("San Antonio Caltrain Station");
circle_47._popup.options.maxWidth = 300;
map.addLayer(circle_47)
var circle_48 = L.circle([37.400443, -122.108338], 321.477226744, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_48.bindPopup("San Antonio Shopping Center");
circle_48._popup.options.maxWidth = 300;
map.addLayer(circle_48)
var circle_49 = L.circle([37.776617, -122.39526], 1618.63002772, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_49.bindPopup("San Francisco Caltrain (Townsend at 4th)");
circle_49._popup.options.maxWidth = 300;
map.addLayer(circle_49)
var circle_50 = L.circle([37.7766, -122.39547], 1476.73147035, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_50.bindPopup("San Francisco Caltrain 2 (330 Townsend)");
circle_50._popup.options.maxWidth = 300;
map.addLayer(circle_50)
var circle_51 = L.circle([37.77865, -122.418235], 428.95136029, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_51.bindPopup("San Francisco City Hall");
circle_51._popup.options.maxWidth = 300;
map.addLayer(circle_51)
var circle_52 = L.circle([37.337391, -121.886995], 281.663783245, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_52.bindPopup("San Jose City Hall");
circle_52._popup.options.maxWidth = 300;
map.addLayer(circle_52)
var circle_53 = L.circle([37.330698, -121.888979], 241.160443296, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_53.bindPopup("San Jose Civic Center");
circle_53._popup.options.maxWidth = 300;
map.addLayer(circle_53)
var circle_54 = L.circle([37.329732, -121.901782], 704.53706692, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_54.bindPopup("San Jose Diridon Caltrain Station");
circle_54._popup.options.maxWidth = 300;
map.addLayer(circle_54)
var circle_55 = L.circle([37.487616, -122.229951], 104.607302964, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_55.bindPopup("San Mateo County Center");
circle_55._popup.options.maxWidth = 300;
map.addLayer(circle_55)
var circle_56 = L.circle([37.336721, -121.894074], 365.84871681, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_56.bindPopup("San Pedro Square");
circle_56._popup.options.maxWidth = 300;
map.addLayer(circle_56)
var circle_57 = L.circle([37.330165, -121.885831], 214.002745324, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_57.bindPopup("San Salvador at 1st");
circle_57._popup.options.maxWidth = 300;
map.addLayer(circle_57)
var circle_58 = L.circle([37.352601, -121.905733], 227.318727028, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_58.bindPopup("Santa Clara County Civic Center");
circle_58._popup.options.maxWidth = 300;
map.addLayer(circle_58)
var circle_59 = L.circle([37.333988, -121.894902], 437.372146709, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_59.bindPopup("Santa Clara at Almaden");
circle_59._popup.options.maxWidth = 300;
map.addLayer(circle_59)
var circle_60 = L.circle([37.774814, -122.418954], 757.417019734, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_60.bindPopup("South Van Ness at Market");
circle_60._popup.options.maxWidth = 300;
map.addLayer(circle_60)
var circle_61 = L.circle([37.790302, -122.390637], 739.479836181, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_61.bindPopup("Spear at Folsom");
circle_61._popup.options.maxWidth = 300;
map.addLayer(circle_61)
var circle_62 = L.circle([37.339301, -121.889937], 285.593334712, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_62.bindPopup("St James Park");
circle_62._popup.options.maxWidth = 300;
map.addLayer(circle_62)
var circle_63 = L.circle([37.48537, -122.203288], 203.569064717, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_63.bindPopup("Stanford in Redwood City");
circle_63._popup.options.maxWidth = 300;
map.addLayer(circle_63)
var circle_64 = L.circle([37.794139, -122.394434], 1157.13415032, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_64.bindPopup("Steuart at Market");
circle_64._popup.options.maxWidth = 300;
map.addLayer(circle_64)
var circle_65 = L.circle([37.789756, -122.394643], 1203.61550493, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_65.bindPopup("Temporary Transbay Terminal (Howard at Beale)");
circle_65._popup.options.maxWidth = 300;
map.addLayer(circle_65)
var circle_66 = L.circle([37.771058, -122.402717], 1172.96221281, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_66.bindPopup("Townsend at 7th");
circle_66._popup.options.maxWidth = 300;
map.addLayer(circle_66)
var circle_67 = L.circle([37.444521, -122.163093], 158.517044961, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_67.bindPopup("University and Emerson");
circle_67._popup.options.maxWidth = 300;
map.addLayer(circle_67)
var circle_68 = L.circle([37.784878, -122.401014], 729.270109725, {
color: 'None',
fillColor: 'blue',
fillOpacity: 0.6
});
circle_68.bindPopup("Yerba Buena Center of the Arts (3rd @ Howard)");
circle_68._popup.options.maxWidth = 300;
map.addLayer(circle_68)
</script>
</body>" style="width: 960px; height: 500px"></iframe>
That huge blob in San Francisco shows that the eastern section of the city is the unrivaled capital of bike rentals in the Bay Area.