Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plotly coordinates mapping

import pandas as pd
us_cities = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/us-cities-top-1k.csv")

import plotly.express as px

fig = px.scatter_mapbox(us_cities, lat="lat", lon="lon", hover_name="City", hover_data=["State", "Population"],
                        color_discrete_sequence=["fuchsia"], zoom=3, height=300)
fig.update_layout(mapbox_style="open-street-map")
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
Comment

PREVIOUS NEXT
Code Example
Python :: web driver module in python 
Python :: python random generator from list 
Python :: imagefield django models 
Python :: plot scatter and line together 
Python :: python modules 
Python :: python input for competitive programming 
Python :: username python 
Python :: python dict del key 
Python :: Python RegEx Split – re.split() 
Python :: how to show bar loading in python in cmd 
Python :: unsplash python 
Python :: power in python 
Python :: how to convert float to string in python 
Python :: openpyxl get value from readonly cell 
Python :: run all python files in a directory in windows 
Python :: python . 
Python :: binary to octal in python 
Python :: python print same line 
Python :: comtypes python 
Python :: convert float to string python 
Python :: making ckeditor django responsive 
Python :: histogram chart plotly 
Python :: pytorch squeeze 
Python :: NLP text summarization with Luhn 
Python :: python to postgresql 
Python :: how to check if python is installed on mac 
Python :: .items() python 
Python :: plt dashed line 
Python :: open pdfs using python 
Python :: check if any letter in string python 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =