Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬 Register for the Oct 27 webinar.

Saudi arabia map

Hi guys,

I have a dataset that contains four features SAM ,longitude ,latitude , and ID here is the screenshot

the all longitude, and latitude is for Saudi Arabia location I am trying to create Saudi Map based on each longitude, and latitude

Here is the code

thank you

Hi @swe2010,

Could you update your example to be reproducible by including:

  1. The code as a fenced code block so that it can be copied and pasted. See https://help.github.com/articles/creating-and-highlighting-code-blocks/
  2. The imports you are using
  3. The definition of the df variable in code form. You can do this by either reducing your dataset size and including all of the data in the constructor of the DataFrame, or you could upload a csv to a public location (chart studio cloud, github, etc.)

Finally, please include a screenshot of the result you are seeing, and a description of what you would like to accomplish.

Hi thank you for ur replying!

Here is the could

import plotly.plotly as py
import pandas as pd
import plotly.graph_objs as go

import pandas as pd
import plotly.offline as py_offline
import plotly.graph_objs as go
import pandas as pd
cases = []
lon = df[‘longitude’],
lat = df[‘latitude’],
text = df[‘SAM’]
) )

layout = go.Layout(
title=“Saudi Arabia”,
geo = dict(
resolution = 50,
scope = ‘asia’,
showframe = False,
showcoastlines = True,
showland = True,
landcolor = “rgb(229, 229, 229)”,
countrycolor = “rgb(255, 255, 255)” ,
coastlinecolor = “rgb(255, 255, 255)”,
projection = dict(
type = ‘mercator’,
center = dict(

fig = go.Figure(layout=layout, data=cases)
py_offline.iplot(fig, validate=False, filename=‘Saudi Arabia’)

thank you

Hi @swe2010,

It looks like you added the imports and included the text of the code. But we still need items (1) and (3) above, along with the description of what behavior you want.