|
384 | 384 |
|
385 | 385 |
|
386 | 386 | carshare = px.data.carshare()
|
387 |
| -fig = px.scatter_mapbox( |
| 387 | +fig = px.scatter_map( |
388 | 388 | carshare,
|
389 | 389 | lat="centroid_lat",
|
390 | 390 | lon="centroid_lon",
|
|
394 | 394 | size_max=15,
|
395 | 395 | zoom=10,
|
396 | 396 | )
|
397 |
| -fig.write_html(os.path.join(dir_name, "scatter_mapbox.html")) |
| 397 | +fig.write_html(os.path.join(dir_name, "scatter_map.html")) |
398 | 398 |
|
399 | 399 |
|
400 | 400 | carshare = px.data.carshare()
|
401 |
| -fig = px.line_mapbox( |
402 |
| - carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour" |
403 |
| -) |
404 |
| -fig.write_html(os.path.join(dir_name, "line_mapbox.html")) |
| 401 | +fig = px.line_map(carshare, lat="centroid_lat", lon="centroid_lon", color="peak_hour") |
| 402 | +fig.write_html(os.path.join(dir_name, "line_map.html")) |
405 | 403 |
|
406 | 404 |
|
407 | 405 | sample_geojson = {
|
|
419 | 417 | }
|
420 | 418 | ],
|
421 | 419 | }
|
422 |
| -fig = px.choropleth_mapbox( |
| 420 | +fig = px.choropleth_map( |
423 | 421 | geojson=sample_geojson,
|
424 | 422 | locations=["the_polygon"],
|
425 | 423 | color=[10],
|
426 | 424 | zoom=6,
|
427 | 425 | )
|
428 |
| -fig.write_html(os.path.join(dir_name, "choropleth_mapbox.html"), auto_play=False) |
| 426 | +fig.write_html(os.path.join(dir_name, "choropleth_map.html"), auto_play=False) |
429 | 427 |
|
430 | 428 |
|
431 | 429 | carshare = px.data.carshare()
|
432 |
| -fig = px.density_mapbox( |
| 430 | +fig = px.density_map( |
433 | 431 | carshare,
|
434 | 432 | lat="centroid_lat",
|
435 | 433 | lon="centroid_lon",
|
436 | 434 | z="peak_hour",
|
437 | 435 | )
|
438 |
| -fig.write_html(os.path.join(dir_name, "density_mapbox.html"), auto_play=False) |
| 436 | +fig.write_html(os.path.join(dir_name, "density_map.html"), auto_play=False) |
439 | 437 |
|
440 | 438 |
|
441 | 439 | gapminder = px.data.gapminder()
|
|
0 commit comments