{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Paris WiFi Services" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Read local data from a JSON file" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import requests\n", "\n", "data_json = requests.get('https://libs.cartocdn.com/cartoframes/samples/paris_wifi_services.json').json()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Normalize the json data and build a DataFrame" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | datasetid | \n", "recordid | \n", "record_timestamp | \n", "fields.cp | \n", "fields.nom_site | \n", "fields.arc_adresse | \n", "fields.geo_point_2d | \n", "fields.nombre_de_borne_wifi | \n", "fields.idpw | \n", "fields.geo_shape.type | \n", "fields.geo_shape.coordinates | \n", "fields.etat2 | \n", "geometry.type | \n", "geometry.coordinates | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "31c3bfd9ad944ec1bea07cbeb28dc6bb0653e530 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75010 | \n", "MEDIATHEQUE FRANCOISE SAGAN | \n", "8 RUE LEON SCHWARTZENBERG | \n", "[48.8754298708, 2.35366677297] | \n", "11 | \n", "PW0147 | \n", "Point | \n", "[2.353666772968424, 48.87542987081135] | \n", "Opérationnel | \n", "Point | \n", "[2.35366677297, 48.8754298708] | \n", "
1 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "322b5836dd2af4413728e67dc4432cf83dde06b1 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75020 | \n", "PARC DE BELLEVILLE (PARIS NATURE MAISON DE L'AIR) | \n", "27 RUE PIAT | \n", "[48.8716051488, 2.38492475051] | \n", "1 | \n", "PW0168 | \n", "Point | \n", "[2.384924750509342, 48.87160514880642] | \n", "Opérationnel | \n", "Point | \n", "[2.38492475051, 48.8716051488] | \n", "
2 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "ec66708cf6e56caced0ae6485f68c0a44167636d | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75013 | \n", "JARDIN BRASSAI | \n", "59 BOULEVARD AUGUSTE BLANQUI | \n", "[48.8292152156, 2.34951229427] | \n", "1 | \n", "NaN | \n", "Point | \n", "[2.349512294267843, 48.82921521555871] | \n", "En étude | \n", "Point | \n", "[2.34951229427, 48.8292152156] | \n", "
3 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "6f37d419ab91b1d9b2972eafe2f5585c4d51f358 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75007 | \n", "BERGES RIVE GAUCHE - JARDIN FLOTTANT | \n", "PORT DU GROS CAILLOU | \n", "[48.8629641751, 2.30452468194] | \n", "3 | \n", "PW0189 | \n", "Point | \n", "[2.30452468193794, 48.86296417505911] | \n", "Opérationnel | \n", "Point | \n", "[2.30452468194, 48.8629641751] | \n", "
4 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "76280ce4b86872e0c0696c047c1d140b66c6868f | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75016 | \n", "BIBLIOTHEQUE GERMAINE TILLION | \n", "6 RUE DU COMMANDANT SCHLOESING | \n", "[48.8618363826, 2.28427079122] | \n", "2 | \n", "PW0113 | \n", "Point | \n", "[2.284270791218422, 48.86183638257241] | \n", "Opérationnel | \n", "Point | \n", "[2.28427079122, 48.8618363826] | \n", "
\n", " | datasetid | \n", "recordid | \n", "record_timestamp | \n", "fields_cp | \n", "fields_nom_site | \n", "fields_arc_adresse | \n", "fields_geo_point_2d | \n", "fields_nombre_de_borne_wifi | \n", "fields_idpw | \n", "fields_geo_shape_type | \n", "fields_geo_shape_coordinates | \n", "fields_etat2 | \n", "geometry_type | \n", "geometry_coordinates | \n", "lon | \n", "lat | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "31c3bfd9ad944ec1bea07cbeb28dc6bb0653e530 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75010 | \n", "MEDIATHEQUE FRANCOISE SAGAN | \n", "8 RUE LEON SCHWARTZENBERG | \n", "[48.8754298708, 2.35366677297] | \n", "11 | \n", "PW0147 | \n", "Point | \n", "[2.353666772968424, 48.87542987081135] | \n", "Opérationnel | \n", "Point | \n", "[2.35366677297, 48.8754298708] | \n", "2.353667 | \n", "48.875430 | \n", "
1 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "322b5836dd2af4413728e67dc4432cf83dde06b1 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75020 | \n", "PARC DE BELLEVILLE (PARIS NATURE MAISON DE L'AIR) | \n", "27 RUE PIAT | \n", "[48.8716051488, 2.38492475051] | \n", "1 | \n", "PW0168 | \n", "Point | \n", "[2.384924750509342, 48.87160514880642] | \n", "Opérationnel | \n", "Point | \n", "[2.38492475051, 48.8716051488] | \n", "2.384925 | \n", "48.871605 | \n", "
2 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "ec66708cf6e56caced0ae6485f68c0a44167636d | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75013 | \n", "JARDIN BRASSAI | \n", "59 BOULEVARD AUGUSTE BLANQUI | \n", "[48.8292152156, 2.34951229427] | \n", "1 | \n", "NaN | \n", "Point | \n", "[2.349512294267843, 48.82921521555871] | \n", "En étude | \n", "Point | \n", "[2.34951229427, 48.8292152156] | \n", "2.349512 | \n", "48.829215 | \n", "
3 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "6f37d419ab91b1d9b2972eafe2f5585c4d51f358 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75007 | \n", "BERGES RIVE GAUCHE - JARDIN FLOTTANT | \n", "PORT DU GROS CAILLOU | \n", "[48.8629641751, 2.30452468194] | \n", "3 | \n", "PW0189 | \n", "Point | \n", "[2.30452468193794, 48.86296417505911] | \n", "Opérationnel | \n", "Point | \n", "[2.30452468194, 48.8629641751] | \n", "2.304525 | \n", "48.862964 | \n", "
4 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "76280ce4b86872e0c0696c047c1d140b66c6868f | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75016 | \n", "BIBLIOTHEQUE GERMAINE TILLION | \n", "6 RUE DU COMMANDANT SCHLOESING | \n", "[48.8618363826, 2.28427079122] | \n", "2 | \n", "PW0113 | \n", "Point | \n", "[2.284270791218422, 48.86183638257241] | \n", "Opérationnel | \n", "Point | \n", "[2.28427079122, 48.8618363826] | \n", "2.284271 | \n", "48.861836 | \n", "
\n", " | datasetid | \n", "recordid | \n", "record_timestamp | \n", "fields_cp | \n", "fields_nom_site | \n", "fields_arc_adresse | \n", "fields_geo_point_2d | \n", "fields_nombre_de_borne_wifi | \n", "fields_idpw | \n", "fields_geo_shape_type | \n", "fields_geo_shape_coordinates | \n", "fields_etat2 | \n", "geometry_type | \n", "geometry_coordinates | \n", "lon | \n", "lat | \n", "geometry | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "31c3bfd9ad944ec1bea07cbeb28dc6bb0653e530 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75010 | \n", "MEDIATHEQUE FRANCOISE SAGAN | \n", "8 RUE LEON SCHWARTZENBERG | \n", "[48.8754298708, 2.35366677297] | \n", "11 | \n", "PW0147 | \n", "Point | \n", "[2.353666772968424, 48.87542987081135] | \n", "Opérationnel | \n", "Point | \n", "[2.35366677297, 48.8754298708] | \n", "2.353667 | \n", "48.875430 | \n", "POINT (2.35367 48.87543) | \n", "
1 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "322b5836dd2af4413728e67dc4432cf83dde06b1 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75020 | \n", "PARC DE BELLEVILLE (PARIS NATURE MAISON DE L'AIR) | \n", "27 RUE PIAT | \n", "[48.8716051488, 2.38492475051] | \n", "1 | \n", "PW0168 | \n", "Point | \n", "[2.384924750509342, 48.87160514880642] | \n", "Opérationnel | \n", "Point | \n", "[2.38492475051, 48.8716051488] | \n", "2.384925 | \n", "48.871605 | \n", "POINT (2.38492 48.87161) | \n", "
2 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "ec66708cf6e56caced0ae6485f68c0a44167636d | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75013 | \n", "JARDIN BRASSAI | \n", "59 BOULEVARD AUGUSTE BLANQUI | \n", "[48.8292152156, 2.34951229427] | \n", "1 | \n", "NaN | \n", "Point | \n", "[2.349512294267843, 48.82921521555871] | \n", "En étude | \n", "Point | \n", "[2.34951229427, 48.8292152156] | \n", "2.349512 | \n", "48.829215 | \n", "POINT (2.34951 48.82922) | \n", "
3 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "6f37d419ab91b1d9b2972eafe2f5585c4d51f358 | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75007 | \n", "BERGES RIVE GAUCHE - JARDIN FLOTTANT | \n", "PORT DU GROS CAILLOU | \n", "[48.8629641751, 2.30452468194] | \n", "3 | \n", "PW0189 | \n", "Point | \n", "[2.30452468193794, 48.86296417505911] | \n", "Opérationnel | \n", "Point | \n", "[2.30452468194, 48.8629641751] | \n", "2.304525 | \n", "48.862964 | \n", "POINT (2.30452 48.86296) | \n", "
4 | \n", "sites-disposant-du-service-paris-wi-fi | \n", "76280ce4b86872e0c0696c047c1d140b66c6868f | \n", "2019-10-08T07:01:10.494000+00:00 | \n", "75016 | \n", "BIBLIOTHEQUE GERMAINE TILLION | \n", "6 RUE DU COMMANDANT SCHLOESING | \n", "[48.8618363826, 2.28427079122] | \n", "2 | \n", "PW0113 | \n", "Point | \n", "[2.284270791218422, 48.86183638257241] | \n", "Opérationnel | \n", "Point | \n", "[2.28427079122, 48.8618363826] | \n", "2.284271 | \n", "48.861836 | \n", "POINT (2.28427 48.86184) | \n", "