# Multiple choropleths on the same page

**URL:** <https://community.plotly.com/t/multiple-choropleths-on-the-same-page/37252>\
**Category:** 📊 Plotly Python\
**Created:** [April 5, 2020, 3:23pm UTC](https://community.plotly.com/t/multiple-choropleths-on-the-same-page/37252 "2020-04-05T15:23:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex79](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Alex79](https://community.plotly.com/u/Alex79)\
**Post date:** [April 5, 2020, 3:23pm UTC](https://community.plotly.com/t/multiple-choropleths-on-the-same-page/37252/1 "2020-04-05T15:23:34Z")

</div>

Hello There!

my code ouputs two choropleth-georef-figs: fig1 and fig2. However, I don’t know how to plot both figs whitin the same page and how to set them in vertical or horizontal layout (side by side or top/bottom).

this code doesn’t work:  
from plotly.offline import plot  
plot(fig1,fig2)

following works but is not what I want. It creates two separate chrome-tabs for each plot.  
plot(fig1)  
plot(fig2)

I know it should be something with subplots but no idea how to handle choropleth\_mapbox with subplots.

Any help?

Thanks in advance!  
Best, A.

```auto
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 18:17:57 2020

@author: ale
"""
import fileinput
import sys
import numpy as np
import scipy.integrate as intgr
import matplotlib.pyplot as plt
#%matplotlib qt
from urllib.request import urlopen
import json

geoprov = 'C:/Users/ale/OneDrive/Ale/COVID/grafici/limits_IT_provinces.json'
with open(geoprov, 'r') as response:
    geo = json.load(response)
    
# geoprov ='https://githubusercontent.com/openpolis/geojson-italy/master/geojson/limits_IT_provinces.json'
# with urlopen(geoprov, 'r') as response:
# geo = json.load(response)

import plotly.express as px    
#filedata = 'C:/Users/ale/OneDrive/Ale/COVID/grafici/dpc-covid19-ita-province-latest.csv'
filedata = "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-province/dpc-covid19-ita-province-latest.csv"
import pandas as pd
import requests
df = pd.read_csv(filedata,dtype={"sigla_provincia": str},error_bad_lines=True)

fig1 = px.choropleth_mapbox(df, geojson=geo, color="totale_casi",
                           locations="sigla_provincia", featureidkey="properties.prov_acr",
                           center={"lat": 42.35, "lon": 14.70},
                           mapbox_style="carto-positron", zoom=5,
                           labels={'totale_casi':'Totale casi al 04/04'})

fig1.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig1.show() 

filedata = "https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-province/dpc-covid19-ita-province-20200310.csv"
df = pd.read_csv(filedata,dtype={"sigla_provincia": str},error_bad_lines=True)
fig2 = px.choropleth_mapbox(df, geojson=geo, color="totale_casi",
                           locations="sigla_provincia", featureidkey="properties.prov_acr",
                           center={"lat": 42.35, "lon": 14.70},
                           mapbox_style="carto-positron", zoom=5,
                           labels={'totale_casi':'Totale casi al 04/04'})

fig2.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig2.show() 

from plotly.offline import plot
plot(fig1)
plot(fig2)

```
