.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_rio_de_janeiro_districts.py: Rio de Janeiro (city) districts =============================== This example will explore the case of getting data from another ArcGIS server. We will use a `server `__ that provides data on the city of Rio de Janeiro. Let's, for example, plot the district divisions. .. code-block:: default from mapsbr import arcgis districts = arcgis.get_map( service="Basicos/mapa_basico_UTM", layer=15, baseurl="https://pgeo3.rio.rj.gov.br/arcgis/rest/services/", ) import matplotlib.pyplot as plt districts.plot(color="w", edgecolor="steelblue") plt.title("Rio de Janeiro city districts") plt.gca().axis("off") .. image:: /auto_examples/images/sphx_glr_plot_rio_de_janeiro_districts_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none (-43.83036038458216, -43.06193412774771, -23.09973631742922, -22.72917666587355) .. note: This function unfortunately is considerably unreliable and only tested in these two hosts. I'll surely put some work on improving it. From the same service, you could also plot some interesting things like the geographical distribution of municipal hospitals. .. code-block:: default rj_districts = districts.plot(color="w", edgecolor="steelblue") arcgis.get_map( service="Basicos/mapa_basico_UTM", layer=7, baseurl="https://pgeo3.rio.rj.gov.br/arcgis/rest/services/", ).plot(ax=rj_districts, color="black", marker="x", markersize=10) plt.gca().axis("off") plt.title("Municipal hospitals in Rio de Janeiro") .. image:: /auto_examples/images/sphx_glr_plot_rio_de_janeiro_districts_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Text(0.5, 1, 'Municipal hospitals in Rio de Janeiro') .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 5.670 seconds) **Estimated memory usage:** 24 MB .. _sphx_glr_download_auto_examples_plot_rio_de_janeiro_districts.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_rio_de_janeiro_districts.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_rio_de_janeiro_districts.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_