library(tidyverse)
## -- Attaching packages ----------------------------------------------------------------------------------------- tidyverse 1.2.1 --
## v ggplot2 3.2.0     v purrr   0.3.2
## v tibble  2.1.1     v dplyr   0.8.1
## v tidyr   0.8.3     v stringr 1.4.0
## v readr   1.3.1     v forcats 0.4.0
## -- Conflicts -------------------------------------------------------------------------------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(sf) 
## Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.6.1
library(osmdata)
## Warning: package 'osmdata' was built under R version 3.6.1
## Data (c) OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright

#PARA EL EJERCICIO PRIMERO ANALIZAMOS UN BARRIO (Abasto)

bbox <- getbb("Rosario, Santa Fe")
bbox
##         min       max
## x -60.78326 -60.61167
## y -33.03487 -32.86965
bbox_poly <- getbb("Municipio de Rosario, Santa Fe", format_out = "sf_polygon")
leaflet(bbox_poly) %>%
    addTiles() %>% 
    addPolygons()
rosario <- opq(bbox) %>% 
    add_osm_feature(key = "healthcare")
rosario <- opq(bbox) %>% 
    add_osm_feature(key = "highway")
rosario <- rosario %>% 
    osmdata_sf()
calles <- rosario$osm_lines

head(calles) 
## Simple feature collection with 6 features and 278 fields
## geometry type:  LINESTRING
## dimension:      XY
## bbox:           xmin: -60.71891 ymin: -33.01829 xmax: -60.65706 ymax: -32.86627
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs
##            osm_id                                  name abandoned.highway
## 10585611 10585611            Autopista Juan José Valle              <NA>
## 23633084 23633084 Avenida de Circunvalación 25 de Mayo              <NA>
## 23633086 23633086    Puente Nuestra Señora del Rosario              <NA>
## 23633100 23633100 Avenida de Circunvalación 25 de Mayo              <NA>
## 23633101 23633101 Avenida de Circunvalación 25 de Mayo              <NA>
## 23644546 23644546 Avenida de Circunvalación 25 de Mayo              <NA>
##          abandoned.railway.left abandoned.surface abutters access
## 10585611                   <NA>              <NA>     <NA>   <NA>
## 23633084                   <NA>              <NA>     <NA>   <NA>
## 23633086                   <NA>              <NA>     <NA>   <NA>
## 23633100                   <NA>              <NA>     <NA>   <NA>
## 23633101                   <NA>              <NA>     <NA>   <NA>
## 23644546                   <NA>              <NA>     <NA>   <NA>
##          access.lanes addr.housenumber addr.postcode addr.street
## 10585611         <NA>             <NA>          <NA>        <NA>
## 23633084         <NA>             <NA>          <NA>        <NA>
## 23633086         <NA>             <NA>          <NA>        <NA>
## 23633100         <NA>             <NA>          <NA>        <NA>
## 23633101         <NA>             <NA>          <NA>        <NA>
## 23644546         <NA>             <NA>          <NA>        <NA>
##          agricultural                    alt_name amenity area barrier
## 10585611         <NA>             Ruta Nacional 9    <NA> <NA>    <NA>
## 23633084         <NA> Doctor Constantino Razzetti    <NA> <NA>    <NA>
## 23633086         <NA>                        <NA>    <NA> <NA>    <NA>
## 23633100         <NA> Doctor Constantino Razzetti    <NA> <NA>    <NA>
## 23633101         <NA> Doctor Constantino Razzetti    <NA> <NA>    <NA>
## 23644546         <NA> Doctor Constantino Razzetti    <NA> <NA>    <NA>
##          bench bicycle bicycle.lanes bicycle.oneway bicycle_road  bin
## 10585611  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
## 23633084  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
## 23633086  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
## 23633100  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
## 23633101  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
## 23644546  <NA>    <NA>          <NA>           <NA>         <NA> <NA>
##              bridge bridge.name bridge.structure bridge.support building
## 10585611       <NA>        <NA>             <NA>           <NA>     <NA>
## 23633084       <NA>        <NA>             <NA>           <NA>     <NA>
## 23633086 cantilever        <NA>             beam          pylon     <NA>
## 23633100        yes        <NA>             <NA>           <NA>     <NA>
## 23633101       <NA>        <NA>             <NA>           <NA>     <NA>
## 23644546    viaduct        <NA>             <NA>           <NA>     <NA>
##           bus bus.lanes bus_bay busway.left busway.right change.backward
## 10585611 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
## 23633084 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
## 23633086 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
## 23633100 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
## 23633101 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
## 23644546 <NA>      <NA>    <NA>        <NA>         <NA>            <NA>
##          change.forward change.lanes change.lanes.backward
## 10585611           <NA>         <NA>                  <NA>
## 23633084           <NA>         <NA>                  <NA>
## 23633086           <NA>         <NA>                  <NA>
## 23633100           <NA>         <NA>                  <NA>
## 23633101           <NA>         <NA>                  <NA>
## 23644546           <NA>         <NA>                  <NA>
##          change.lanes.forward check_date construction
## 10585611                 <NA>       <NA>         <NA>
## 23633084                 <NA>       <NA>         <NA>
## 23633086                 <NA>       <NA>         <NA>
## 23633100                 <NA>       <NA>         <NA>
## 23633101                 <NA>       <NA>         <NA>
## 23644546                 <NA>       <NA>         <NA>
##          construction.cycleway.left construction.highway
## 10585611                       <NA>                 <NA>
## 23633084                       <NA>                 <NA>
## 23633086                       <NA>                 <NA>
## 23633100                       <NA>                 <NA>
## 23633101                       <NA>                 <NA>
## 23644546                       <NA>                 <NA>
##          construction.lanes construction.maxspeed construction.oneway
## 10585611               <NA>                  <NA>                <NA>
## 23633084               <NA>                  <NA>                <NA>
## 23633086               <NA>                  <NA>                <NA>
## 23633100               <NA>                  <NA>                <NA>
## 23633101               <NA>                  <NA>                <NA>
## 23644546               <NA>                  <NA>                <NA>
##          construction.surface contact.website conveying covered crossing
## 10585611                 <NA>            <NA>      <NA>    <NA>     <NA>
## 23633084                 <NA>            <NA>      <NA>    <NA>     <NA>
## 23633086                 <NA>            <NA>      <NA>    <NA>     <NA>
## 23633100                 <NA>            <NA>      <NA>    <NA>     <NA>
## 23633101                 <NA>            <NA>      <NA>    <NA>     <NA>
## 23644546                 <NA>            <NA>      <NA>    <NA>     <NA>
##          cutting cycleway cycleway.left cycleway.left.oneway
## 10585611    <NA>     <NA>          <NA>                 <NA>
## 23633084    <NA>     <NA>          <NA>                 <NA>
## 23633086    <NA>     <NA>          <NA>                 <NA>
## 23633100    <NA>     <NA>          <NA>                 <NA>
## 23633101    <NA>     <NA>          <NA>                 <NA>
## 23644546    <NA>     <NA>          <NA>                 <NA>
##          cycleway.left.surface cycleway.right description
## 10585611                  <NA>           <NA>        <NA>
## 23633084                  <NA>           <NA>        <NA>
## 23633086                  <NA>           <NA>        <NA>
## 23633100                  <NA>           <NA>        <NA>
## 23633101                  <NA>           <NA>        <NA>
## 23644546                  <NA>           <NA>        <NA>
##          description.cycleway designation    destination
## 10585611                 <NA>        <NA>           <NA>
## 23633084                 <NA>        <NA>           <NA>
## 23633086                 <NA>        <NA> Victoria RN174
## 23633100                 <NA>        <NA>           <NA>
## 23633101                 <NA>        <NA>           <NA>
## 23644546                 <NA>        <NA>           <NA>
##          destination.backward destination.forward
## 10585611                 <NA>                <NA>
## 23633084                 <NA>                <NA>
## 23633086                 <NA>                <NA>
## 23633100                 <NA>                <NA>
## 23633101                 <NA>                <NA>
## 23644546                 <NA>                <NA>
##                  destination.lanes destination.ref destination.ref.forward
## 10585611                      <NA>            <NA>                    <NA>
## 23633084                      <NA>            <NA>                    <NA>
## 23633086                      <NA>            <NA>                    <NA>
## 23633100 Victoria|Victoria|Rosario            <NA>                    <NA>
## 23633101 Victoria|Victoria|Rosario            <NA>                    <NA>
## 23644546                      <NA>            <NA>                    <NA>
##          destination.ref.lanes destination.street
## 10585611                  <NA>               <NA>
## 23633084                  <NA>               <NA>
## 23633086                  <NA>               <NA>
## 23633100      RN174|RN174|RN11               <NA>
## 23633101      RN174|RN174|RN11               <NA>
## 23644546                  <NA>               <NA>
##                                                                   destination.street.lanes
## 10585611                                                                              <NA>
## 23633084                                                                              <NA>
## 23633086                                                                              <NA>
## 23633100                                                                              <NA>
## 23633101 Puente Rosario - Victoria|Puente Rosario - Victoria|Bulevar General José Rondeau
## 23644546                                                                              <NA>
##          destination.symbol destination.symbol.forward
## 10585611               <NA>                       <NA>
## 23633084               <NA>                       <NA>
## 23633086               <NA>                       <NA>
## 23633100               <NA>                       <NA>
## 23633101               <NA>                       <NA>
## 23644546               <NA>                       <NA>
##          destination.symbol.lanes destination.to distance disused
## 10585611                     <NA>           <NA>     <NA>    <NA>
## 23633084                     <NA>           <NA>     <NA>    <NA>
## 23633086                     <NA>           <NA>     <NA>    <NA>
## 23633100     bridge|bridge|centre           <NA>     <NA>    <NA>
## 23633101     bridge|bridge|centre           <NA>     <NA>    <NA>
## 23644546                     <NA>           <NA>     <NA>    <NA>
##          disused.highway disused.maxspeed disused.turn.lanes.backward
## 10585611            <NA>             <NA>                        <NA>
## 23633084            <NA>             <NA>                        <NA>
## 23633086            <NA>             <NA>                        <NA>
## 23633100            <NA>             <NA>                        <NA>
## 23633101            <NA>             <NA>                        <NA>
## 23644546            <NA>             <NA>                        <NA>
##          drinking_water embankment embedded_rails emergency
## 10585611           <NA>       <NA>           <NA>      <NA>
## 23633084           <NA>        yes           <NA>      <NA>
## 23633086           <NA>       <NA>           <NA>      <NA>
## 23633100           <NA>       <NA>           <NA>      <NA>
## 23633101           <NA>       <NA>           <NA>      <NA>
## 23644546           <NA>       <NA>           <NA>      <NA>
##          emergency.lanes fence_type fixme flood_prone floor.material foot
## 10585611            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
## 23633084            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
## 23633086            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
## 23633100            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
## 23633101            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
## 23644546            <NA>       <NA>  <NA>        <NA>           <NA> <NA>
##          foot.lanes footway golf golf_cart goods handrail handrail.center
## 10585611       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
## 23633084       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
## 23633086       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
## 23633100       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
## 23633101       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
## 23644546       <NA>    <NA> <NA>      <NA>  <NA>     <NA>            <NA>
##          handrail.left handrail.right hazard height  hgv  highway historic
## 10585611          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
## 23633084          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
## 23633086          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
## 23633100          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
## 23633101          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
## 23644546          <NA>           <NA>   <NA>   <NA> <NA> motorway     <NA>
##          horse  hov incline indoor indoor.highway int_name internet_access
## 10585611  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
## 23633084  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
## 23633086  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
## 23633100  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
## 23633101  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
## 23644546  <NA> <NA>    <NA>   <NA>           <NA>     <NA>            <NA>
##          internet_access.fee internet_access.operator is_in.country
## 10585611                <NA>                     <NA>     Argentina
## 23633084                <NA>                     <NA>          <NA>
## 23633086                <NA>                     <NA>          <NA>
## 23633100                <NA>                     <NA>          <NA>
## 23633101                <NA>                     <NA>          <NA>
## 23644546                <NA>                     <NA>          <NA>
##          junction kerb landcover landuse lanes lanes.backward
## 10585611     <NA> <NA>      <NA>    <NA>     2           <NA>
## 23633084     <NA> <NA>      <NA>    <NA>     3           <NA>
## 23633086     <NA> <NA>      <NA>    <NA>     2           <NA>
## 23633100     <NA> <NA>      <NA>    <NA>     3           <NA>
## 23633101     <NA> <NA>      <NA>    <NA>     3           <NA>
## 23644546     <NA> <NA>      <NA>    <NA>     3           <NA>
##          lanes.bicycle lanes.bus lanes.forward lanes.psv
## 10585611          <NA>      <NA>          <NA>      <NA>
## 23633084          <NA>      <NA>          <NA>      <NA>
## 23633086          <NA>      <NA>          <NA>      <NA>
## 23633100          <NA>      <NA>          <NA>      <NA>
## 23633101          <NA>      <NA>          <NA>      <NA>
## 23644546          <NA>      <NA>          <NA>      <NA>
##          lanes.psv.conditional layer leisure level  lit lit.type loc_ref
## 10585611                  <NA>  <NA>    <NA>  <NA> <NA>     <NA>    <NA>
## 23633084                  <NA>  <NA>    <NA>  <NA>  yes     <NA>    <NA>
## 23633086                  <NA>     2    <NA>  <NA> <NA>     <NA>    <NA>
## 23633100                  <NA>     1    <NA>  <NA>  yes     <NA>    <NA>
## 23633101                  <NA>  <NA>    <NA>  <NA>  yes     <NA>    <NA>
## 23644546                  <NA>     1    <NA>  <NA>  yes     <NA>    <NA>
##          man_made material maxheight maxheight.physical maxspeed
## 10585611     <NA>     <NA>      <NA>               <NA>      120
## 23633084     <NA>     <NA>      <NA>               <NA>      100
## 23633086     <NA>     <NA>      <NA>               <NA>       80
## 23633100     <NA>     <NA>      <NA>               <NA>      100
## 23633101     <NA>     <NA>      <NA>               <NA>      100
## 23644546     <NA>     <NA>      <NA>               <NA>      100
##          maxspeed.bus maxspeed.hgv maxspeed.lanes maxspeed.type memorial
## 10585611         <NA>         <NA>           <NA>          <NA>     <NA>
## 23633084           90           80           <NA>          <NA>     <NA>
## 23633086         <NA>           60           <NA>          <NA>     <NA>
## 23633100           90           80           <NA>          <NA>     <NA>
## 23633101           90           80           <NA>          <NA>     <NA>
## 23644546           90           80           <NA>          <NA>     <NA>
##          minspeed mooring motor_vehicle motor_vehicle.conditional
## 10585611     <NA>    <NA>          <NA>                      <NA>
## 23633084       60    <NA>          <NA>                      <NA>
## 23633086       55    <NA>          <NA>                      <NA>
## 23633100       60    <NA>          <NA>                      <NA>
## 23633101       60    <NA>          <NA>                      <NA>
## 23644546       60    <NA>          <NA>                      <NA>
##          motor_vehicle.lanes motorcar motorcycle motorroad mtb.scale
## 10585611                <NA>     <NA>       <NA>      <NA>      <NA>
## 23633084                <NA>     <NA>       <NA>       yes      <NA>
## 23633086                <NA>     <NA>       <NA>      <NA>      <NA>
## 23633100                <NA>     <NA>       <NA>       yes      <NA>
## 23633101                <NA>     <NA>       <NA>       yes      <NA>
## 23644546                <NA>     <NA>       <NA>       yes      <NA>
##          mtb.scale.uphill name.bridge name.etymology.wikidata natural
## 10585611             <NA>        <NA>                    <NA>    <NA>
## 23633084             <NA>        <NA>                    <NA>    <NA>
## 23633086             <NA>        <NA>                    <NA>    <NA>
## 23633100             <NA>        <NA>                    <NA>    <NA>
## 23633101             <NA>        <NA>                    <NA>    <NA>
## 23644546             <NA>        <NA>                    <NA>    <NA>
##          network noname note obstacle.wheelchair
## 10585611    <NA>   <NA> <NA>                <NA>
## 23633084    <NA>   <NA> <NA>                <NA>
## 23633086    <NA>   <NA> <NA>                <NA>
## 23633100    <NA>   <NA> <NA>                <NA>
## 23633101    <NA>   <NA> <NA>                <NA>
## 23644546    <NA>   <NA> <NA>                <NA>
##                                        official_name
## 10585611 Autopista Teniente General Juan José Valle
## 23633084                                        <NA>
## 23633086                                        <NA>
## 23633100                                        <NA>
## 23633101                                        <NA>
## 23644546                                        <NA>
##                                           old_name old_ref oneway
## 10585611 Autopista Teniente General Pedro Aramburu    <NA>    yes
## 23633084                                      <NA>    <NA>    yes
## 23633086                                      <NA>    <NA>    yes
## 23633100                                      <NA>    <NA>    yes
## 23633101                                      <NA>    <NA>    yes
## 23644546                                      <NA>    <NA>    yes
##          oneway.bicycle opening_hours operator overtaking park_ride
## 10585611           <NA>          <NA>     <NA>       <NA>      <NA>
## 23633084           <NA>          <NA>     <NA>    forward      <NA>
## 23633086           <NA>          <NA>     <NA>        yes      <NA>
## 23633100           <NA>          <NA>     <NA>         no      <NA>
## 23633101           <NA>          <NA>     <NA>       <NA>      <NA>
## 23644546           <NA>          <NA>     <NA>    forward      <NA>
##          parking parking.condition.both parking.condition.both.maxstay
## 10585611    <NA>                   <NA>                           <NA>
## 23633084    <NA>                   <NA>                           <NA>
## 23633086    <NA>                   <NA>                           <NA>
## 23633100    <NA>                   <NA>                           <NA>
## 23633101    <NA>                   <NA>                           <NA>
## 23644546    <NA>                   <NA>                           <NA>
##          parking.condition.both.residents
## 10585611                             <NA>
## 23633084                             <NA>
## 23633086                             <NA>
## 23633100                             <NA>
## 23633101                             <NA>
## 23644546                             <NA>
##          parking.condition.both.time_interval parking.condition.left
## 10585611                                 <NA>                   <NA>
## 23633084                                 <NA>                   <NA>
## 23633086                                 <NA>                   <NA>
## 23633100                                 <NA>                   <NA>
## 23633101                                 <NA>                   <NA>
## 23644546                                 <NA>                   <NA>
##          parking.condition.left.maxstay parking.condition.left.vehicles
## 10585611                           <NA>                            <NA>
## 23633084                           <NA>                            <NA>
## 23633086                           <NA>                            <NA>
## 23633100                           <NA>                            <NA>
## 23633101                           <NA>                            <NA>
## 23644546                           <NA>                            <NA>
##          parking.condition.right parking.condition.right.maxstay
## 10585611                    <NA>                            <NA>
## 23633084                    <NA>                            <NA>
## 23633086                    <NA>                            <NA>
## 23633100                    <NA>                            <NA>
## 23633101                    <NA>                            <NA>
## 23644546                    <NA>                            <NA>
##          parking.condition.right.time_interval
## 10585611                                  <NA>
## 23633084                                  <NA>
## 23633086                                  <NA>
## 23633100                                  <NA>
## 23633101                                  <NA>
## 23644546                                  <NA>
##          parking.condition.right.vehicles parking.lane.both
## 10585611                             <NA>              <NA>
## 23633084                             <NA>              <NA>
## 23633086                             <NA>              <NA>
## 23633100                             <NA>       no_stopping
## 23633101                             <NA>              <NA>
## 23644546                             <NA>              <NA>
##          parking.lane.left parking.lane.right parking.lane.right.diagonal
## 10585611              <NA>               <NA>                        <NA>
## 23633084       no_stopping         no_parking                        <NA>
## 23633086              <NA>               <NA>                        <NA>
## 23633100              <NA>               <NA>                        <NA>
## 23633101       no_stopping         no_parking                        <NA>
## 23644546       no_stopping         no_parking                        <NA>
##          parking.lanes.left passenger_information_display picnic_table
## 10585611               <NA>                          <NA>         <NA>
## 23633084               <NA>                          <NA>         <NA>
## 23633086               <NA>                          <NA>         <NA>
## 23633100               <NA>                          <NA>         <NA>
## 23633101               <NA>                          <NA>         <NA>
## 23644546               <NA>                          <NA>         <NA>
##          placement placement.backward placement.forward proposed
## 10585611      <NA>               <NA>              <NA>     <NA>
## 23633084      <NA>               <NA>              <NA>     <NA>
## 23633086      <NA>               <NA>              <NA>     <NA>
## 23633100      <NA>               <NA>              <NA>     <NA>
## 23633101      <NA>               <NA>              <NA>     <NA>
## 23644546      <NA>               <NA>              <NA>     <NA>
##          proposed.highway proposed.lanes proposed.maxspeed proposed.name
## 10585611             <NA>           <NA>              <NA>          <NA>
## 23633084             <NA>           <NA>              <NA>          <NA>
## 23633086             <NA>           <NA>              <NA>          <NA>
## 23633100             <NA>           <NA>              <NA>          <NA>
## 23633101             <NA>           <NA>              <NA>          <NA>
## 23644546             <NA>           <NA>              <NA>          <NA>
##          proposed.oneway proposed.surface  psv psv.lanes public_transport
## 10585611            <NA>             <NA> <NA>      <NA>             <NA>
## 23633084            <NA>             <NA> <NA>      <NA>             <NA>
## 23633086            <NA>             <NA> <NA>      <NA>             <NA>
## 23633100            <NA>             <NA> <NA>      <NA>             <NA>
## 23633101            <NA>             <NA> <NA>      <NA>             <NA>
## 23644546            <NA>             <NA> <NA>      <NA>             <NA>
##          ramp ramp.bicycle ramp.luggage ramp.stroller ramp.wheelchair
## 10585611 <NA>         <NA>         <NA>          <NA>            <NA>
## 23633084 <NA>         <NA>         <NA>          <NA>            <NA>
## 23633086 <NA>         <NA>         <NA>          <NA>            <NA>
## 23633100 <NA>         <NA>         <NA>          <NA>            <NA>
## 23633101 <NA>         <NA>         <NA>          <NA>            <NA>
## 23644546 <NA>         <NA>         <NA>          <NA>            <NA>
##             ref reg_name seamark.bridge.category segregated service
## 10585611    RN9     <NA>                    <NA>       <NA>    <NA>
## 23633084 RNA008     <NA>                    <NA>       <NA>    <NA>
## 23633086  RN174     <NA>              suspension       <NA>    <NA>
## 23633100 RNA008     <NA>                    <NA>       <NA>    <NA>
## 23633101 RNA008     <NA>                    <NA>       <NA>    <NA>
## 23644546 RNA008     <NA>                    <NA>       <NA>    <NA>
##          share_taxi shelter              short_name shoulder
## 10585611       <NA>    <NA>        Juan José Valle     <NA>
## 23633084       <NA>    <NA> Avenida Circunvalación     <NA>
## 23633086       <NA>    <NA>                    <NA>     <NA>
## 23633100       <NA>    <NA> Avenida Circunvalación     <NA>
## 23633101       <NA>    <NA> Avenida Circunvalación     <NA>
## 23644546       <NA>    <NA> Avenida Circunvalación     <NA>
##          shoulder.access.bicycle shoulder.line shoulder.right
## 10585611                    <NA>          <NA>           <NA>
## 23633084                    <NA>          <NA>           <NA>
## 23633086                    <NA>          <NA>           <NA>
## 23633100                    <NA>          <NA>           <NA>
## 23633101                    <NA>          <NA>           <NA>
## 23644546                    <NA>          <NA>           <NA>
##          shoulder.right.surface shoulder.surface sidewalk
## 10585611                   <NA>             <NA>     <NA>
## 23633084                   <NA>             <NA>     <NA>
## 23633086                   <NA>             <NA>     <NA>
## 23633100                   <NA>             <NA>     <NA>
## 23633101                   <NA>             <NA>     <NA>
## 23644546                   <NA>             <NA>     <NA>
##          sidewalk.both.surface sidewalk.oneway sidewalk.right
## 10585611                  <NA>            <NA>           <NA>
## 23633084                  <NA>            <NA>           <NA>
## 23633086                  <NA>            <NA>           <NA>
## 23633100                  <NA>            <NA>           <NA>
## 23633101                  <NA>            <NA>           <NA>
## 23644546                  <NA>            <NA>           <NA>
##          sidewalk.right.surface smoothness sorting_name source
## 10585611                   <NA>       <NA>         <NA>   <NA>
## 23633084                   <NA>       <NA>         <NA>   <NA>
## 23633086                   <NA>       <NA>         <NA>   <NA>
## 23633100                   <NA>       <NA>         <NA>   <NA>
## 23633101                   <NA>       <NA>         <NA>   <NA>
## 23644546                   <NA>       <NA>         <NA>   <NA>
##          source.bridge source.date source.disused source.hgv
## 10585611          <NA>        <NA>           <NA>       <NA>
## 23633084          <NA>        <NA>           <NA>       <NA>
## 23633086          <NA>        <NA>           <NA>       <NA>
## 23633100          <NA>        <NA>           <NA>       <NA>
## 23633101          <NA>        <NA>           <NA>       <NA>
## 23644546          <NA>        <NA>           <NA>       <NA>
##          source.highway source.imagery source.lanes source.maxheight
## 10585611           <NA>           <NA>         <NA>             <NA>
## 23633084           <NA>           <NA>         <NA>             <NA>
## 23633086           <NA>           <NA>         <NA>             <NA>
## 23633100           <NA>           <NA>         <NA>             <NA>
## 23633101           <NA>           <NA>         <NA>             <NA>
## 23644546           <NA>           <NA>         <NA>             <NA>
##          source.maxspeed source.minspeed source.motor_vehicle.conditional
## 10585611            <NA>            <NA>                             <NA>
## 23633084            sign            sign                             <NA>
## 23633086            <NA>  sign;Mapillary                             <NA>
## 23633100            sign            sign                             <NA>
## 23633101            sign            sign                             <NA>
## 23644546            sign            sign                             <NA>
##                                                                                source.name
## 10585611 http://infoleg.mecon.gov.ar/infolegInternet/anexos/225000-229999/225220/norma.htm
## 23633084                                                                              <NA>
## 23633086                                                                              <NA>
## 23633100                                                                              <NA>
## 23633101                                                                              <NA>
## 23644546                                                                              <NA>
##          source.oneway source.parking.lane.both source.parking.lanes.both
## 10585611          <NA>                     <NA>                      <NA>
## 23633084          <NA>                     <NA>                      <NA>
## 23633086          <NA>                     <NA>                      <NA>
## 23633100          <NA>                     <NA>                      <NA>
## 23633101          <NA>                     <NA>                      <NA>
## 23644546          <NA>                     <NA>                      <NA>
##          source.proposed source.proposed.lanes
## 10585611            <NA>                  <NA>
## 23633084            <NA>                  <NA>
## 23633086            <NA>                  <NA>
## 23633100            <NA>                  <NA>
## 23633101            <NA>                  <NA>
## 23644546            <NA>                  <NA>
##                                                     source.ref
## 10585611 http://forum.openstreetmap.org/viewtopic.php?id=31749
## 23633084                                                  <NA>
## 23633086                                                  <NA>
## 23633100                                                  <NA>
## 23633101                                                  <NA>
## 23644546                                                  <NA>
##          source.surface sport step_count supervised surface
## 10585611           <NA>  <NA>       <NA>       <NA> asphalt
## 23633084           <NA>  <NA>       <NA>       <NA> asphalt
## 23633086           <NA>  <NA>       <NA>       <NA> asphalt
## 23633100           <NA>  <NA>       <NA>       <NA> asphalt
## 23633101           <NA>  <NA>       <NA>       <NA> asphalt
## 23644546           <NA>  <NA>       <NA>       <NA> asphalt
##          surface.bicycle surface.lanes surface.lanes.backward
## 10585611            <NA>          <NA>                   <NA>
## 23633084            <NA>          <NA>                   <NA>
## 23633086            <NA>          <NA>                   <NA>
## 23633100            <NA>          <NA>                   <NA>
## 23633101            <NA>          <NA>                   <NA>
## 23644546            <NA>          <NA>                   <NA>
##          surface.lanes.forward surveillance surveillance.type
## 10585611                  <NA>         <NA>              <NA>
## 23633084                  <NA>         <NA>              <NA>
## 23633086                  <NA>         <NA>              <NA>
## 23633100                  <NA>         <NA>              <NA>
## 23633101                  <NA>         <NA>              <NA>
## 23644546                  <NA>         <NA>              <NA>
##          tactile_paving taxi taxi.lanes toilets toll tourism tourist_bus
## 10585611           <NA> <NA>       <NA>    <NA> <NA>    <NA>        <NA>
## 23633084           <NA> <NA>       <NA>    <NA> <NA>    <NA>        <NA>
## 23633086           <NA> <NA>       <NA>    <NA>  yes    <NA>        <NA>
## 23633100           <NA> <NA>       <NA>    <NA> <NA>    <NA>        <NA>
## 23633101           <NA> <NA>       <NA>    <NA> <NA>    <NA>        <NA>
## 23644546           <NA> <NA>       <NA>    <NA> <NA>    <NA>        <NA>
##          tracktype traffic traffic_calming train trolley_wire trolleybus
## 10585611      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
## 23633084      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
## 23633086      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
## 23633100      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
## 23633101      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
## 23644546      <NA>    <NA>            <NA>  <NA>         <NA>       <NA>
##          tunnel turn                   turn.lanes turn.lanes.backward
## 10585611   <NA> <NA>                         <NA>                <NA>
## 23633084   <NA> <NA>                         <NA>                <NA>
## 23633086   <NA> <NA>                         <NA>                <NA>
## 23633100   <NA> <NA> through|through|slight_right                <NA>
## 23633101   <NA> <NA> through|through|slight_right                <NA>
## 23644546   <NA> <NA>                         <NA>                <NA>
##          turn.lanes.forward vehicle vehicle.conditional water wheelchair
## 10585611               <NA>    <NA>                <NA>  <NA>       <NA>
## 23633084               <NA>    <NA>                <NA>  <NA>       <NA>
## 23633086               <NA>    <NA>                <NA>  <NA>       <NA>
## 23633100               <NA>    <NA>                <NA>  <NA>       <NA>
## 23633101               <NA>    <NA>                <NA>  <NA>       <NA>
## 23644546               <NA>    <NA>                <NA>  <NA>       <NA>
##          wheelchair.description width wikidata wikimedia_commons wikipedia
## 10585611                   <NA>  <NA>     <NA>              <NA>      <NA>
## 23633084                   <NA>  <NA>     <NA>              <NA>      <NA>
## 23633086                   <NA>  <NA>     <NA>              <NA>      <NA>
## 23633100                   <NA>  <NA>     <NA>              <NA>      <NA>
## 23633101                   <NA>  <NA>     <NA>              <NA>      <NA>
## 23644546                   <NA>  <NA>     <NA>              <NA>      <NA>
##                                geometry
## 10585611 LINESTRING (-60.66396 -33.0...
## 23633084 LINESTRING (-60.71845 -32.8...
## 23633086 LINESTRING (-60.68246 -32.8...
## 23633100 LINESTRING (-60.70536 -32.8...
## 23633101 LINESTRING (-60.7047 -32.87...
## 23644546 LINESTRING (-60.71891 -32.8...
ggplot() +
    geom_sf(data = calles)

calles <- st_intersection(calles, bbox_poly)
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
calles <- calles %>% 
  mutate(maxspeed = as.numeric(maxspeed),
         lanes = ifelse(is.na(lanes), 1, as.numeric(lanes)))
## Warning: NAs introducidos por coerción

Ahora graficamos

ggplot(calles) +
    geom_sf(aes(color = maxspeed), alpha = 0.5) +
    scale_color_viridis_c() +

    labs(title = "Rosario",
         subtitle = "Vías de circulación",
         caption = "fuente: OpenStreetMap",
         color = "velocidad máxima")

Otras cosas que podemeos mapear

names(calles)
##   [1] "osm_id"                               
##   [2] "name"                                 
##   [3] "abandoned.highway"                    
##   [4] "abandoned.railway.left"               
##   [5] "abandoned.surface"                    
##   [6] "abutters"                             
##   [7] "access"                               
##   [8] "access.lanes"                         
##   [9] "addr.housenumber"                     
##  [10] "addr.postcode"                        
##  [11] "addr.street"                          
##  [12] "agricultural"                         
##  [13] "alt_name"                             
##  [14] "amenity"                              
##  [15] "area"                                 
##  [16] "barrier"                              
##  [17] "bench"                                
##  [18] "bicycle"                              
##  [19] "bicycle.lanes"                        
##  [20] "bicycle.oneway"                       
##  [21] "bicycle_road"                         
##  [22] "bin"                                  
##  [23] "bridge"                               
##  [24] "bridge.name"                          
##  [25] "bridge.structure"                     
##  [26] "bridge.support"                       
##  [27] "building"                             
##  [28] "bus"                                  
##  [29] "bus.lanes"                            
##  [30] "bus_bay"                              
##  [31] "busway.left"                          
##  [32] "busway.right"                         
##  [33] "change.backward"                      
##  [34] "change.forward"                       
##  [35] "change.lanes"                         
##  [36] "change.lanes.backward"                
##  [37] "change.lanes.forward"                 
##  [38] "check_date"                           
##  [39] "construction"                         
##  [40] "construction.cycleway.left"           
##  [41] "construction.highway"                 
##  [42] "construction.lanes"                   
##  [43] "construction.maxspeed"                
##  [44] "construction.oneway"                  
##  [45] "construction.surface"                 
##  [46] "contact.website"                      
##  [47] "conveying"                            
##  [48] "covered"                              
##  [49] "crossing"                             
##  [50] "cutting"                              
##  [51] "cycleway"                             
##  [52] "cycleway.left"                        
##  [53] "cycleway.left.oneway"                 
##  [54] "cycleway.left.surface"                
##  [55] "cycleway.right"                       
##  [56] "description"                          
##  [57] "description.cycleway"                 
##  [58] "designation"                          
##  [59] "destination"                          
##  [60] "destination.backward"                 
##  [61] "destination.forward"                  
##  [62] "destination.lanes"                    
##  [63] "destination.ref"                      
##  [64] "destination.ref.forward"              
##  [65] "destination.ref.lanes"                
##  [66] "destination.street"                   
##  [67] "destination.street.lanes"             
##  [68] "destination.symbol"                   
##  [69] "destination.symbol.forward"           
##  [70] "destination.symbol.lanes"             
##  [71] "destination.to"                       
##  [72] "distance"                             
##  [73] "disused"                              
##  [74] "disused.highway"                      
##  [75] "disused.maxspeed"                     
##  [76] "disused.turn.lanes.backward"          
##  [77] "drinking_water"                       
##  [78] "embankment"                           
##  [79] "embedded_rails"                       
##  [80] "emergency"                            
##  [81] "emergency.lanes"                      
##  [82] "fence_type"                           
##  [83] "fixme"                                
##  [84] "flood_prone"                          
##  [85] "floor.material"                       
##  [86] "foot"                                 
##  [87] "foot.lanes"                           
##  [88] "footway"                              
##  [89] "golf"                                 
##  [90] "golf_cart"                            
##  [91] "goods"                                
##  [92] "handrail"                             
##  [93] "handrail.center"                      
##  [94] "handrail.left"                        
##  [95] "handrail.right"                       
##  [96] "hazard"                               
##  [97] "height"                               
##  [98] "hgv"                                  
##  [99] "highway"                              
## [100] "historic"                             
## [101] "horse"                                
## [102] "hov"                                  
## [103] "incline"                              
## [104] "indoor"                               
## [105] "indoor.highway"                       
## [106] "int_name"                             
## [107] "internet_access"                      
## [108] "internet_access.fee"                  
## [109] "internet_access.operator"             
## [110] "is_in.country"                        
## [111] "junction"                             
## [112] "kerb"                                 
## [113] "landcover"                            
## [114] "landuse"                              
## [115] "lanes"                                
## [116] "lanes.backward"                       
## [117] "lanes.bicycle"                        
## [118] "lanes.bus"                            
## [119] "lanes.forward"                        
## [120] "lanes.psv"                            
## [121] "lanes.psv.conditional"                
## [122] "layer"                                
## [123] "leisure"                              
## [124] "level"                                
## [125] "lit"                                  
## [126] "lit.type"                             
## [127] "loc_ref"                              
## [128] "man_made"                             
## [129] "material"                             
## [130] "maxheight"                            
## [131] "maxheight.physical"                   
## [132] "maxspeed"                             
## [133] "maxspeed.bus"                         
## [134] "maxspeed.hgv"                         
## [135] "maxspeed.lanes"                       
## [136] "maxspeed.type"                        
## [137] "memorial"                             
## [138] "minspeed"                             
## [139] "mooring"                              
## [140] "motor_vehicle"                        
## [141] "motor_vehicle.conditional"            
## [142] "motor_vehicle.lanes"                  
## [143] "motorcar"                             
## [144] "motorcycle"                           
## [145] "motorroad"                            
## [146] "mtb.scale"                            
## [147] "mtb.scale.uphill"                     
## [148] "name.bridge"                          
## [149] "name.etymology.wikidata"              
## [150] "natural"                              
## [151] "network"                              
## [152] "noname"                               
## [153] "note"                                 
## [154] "obstacle.wheelchair"                  
## [155] "official_name"                        
## [156] "old_name"                             
## [157] "old_ref"                              
## [158] "oneway"                               
## [159] "oneway.bicycle"                       
## [160] "opening_hours"                        
## [161] "operator"                             
## [162] "overtaking"                           
## [163] "park_ride"                            
## [164] "parking"                              
## [165] "parking.condition.both"               
## [166] "parking.condition.both.maxstay"       
## [167] "parking.condition.both.residents"     
## [168] "parking.condition.both.time_interval" 
## [169] "parking.condition.left"               
## [170] "parking.condition.left.maxstay"       
## [171] "parking.condition.left.vehicles"      
## [172] "parking.condition.right"              
## [173] "parking.condition.right.maxstay"      
## [174] "parking.condition.right.time_interval"
## [175] "parking.condition.right.vehicles"     
## [176] "parking.lane.both"                    
## [177] "parking.lane.left"                    
## [178] "parking.lane.right"                   
## [179] "parking.lane.right.diagonal"          
## [180] "parking.lanes.left"                   
## [181] "passenger_information_display"        
## [182] "picnic_table"                         
## [183] "placement"                            
## [184] "placement.backward"                   
## [185] "placement.forward"                    
## [186] "proposed"                             
## [187] "proposed.highway"                     
## [188] "proposed.lanes"                       
## [189] "proposed.maxspeed"                    
## [190] "proposed.name"                        
## [191] "proposed.oneway"                      
## [192] "proposed.surface"                     
## [193] "psv"                                  
## [194] "psv.lanes"                            
## [195] "public_transport"                     
## [196] "ramp"                                 
## [197] "ramp.bicycle"                         
## [198] "ramp.luggage"                         
## [199] "ramp.stroller"                        
## [200] "ramp.wheelchair"                      
## [201] "ref"                                  
## [202] "reg_name"                             
## [203] "seamark.bridge.category"              
## [204] "segregated"                           
## [205] "service"                              
## [206] "share_taxi"                           
## [207] "shelter"                              
## [208] "short_name"                           
## [209] "shoulder"                             
## [210] "shoulder.access.bicycle"              
## [211] "shoulder.line"                        
## [212] "shoulder.right"                       
## [213] "shoulder.right.surface"               
## [214] "shoulder.surface"                     
## [215] "sidewalk"                             
## [216] "sidewalk.both.surface"                
## [217] "sidewalk.oneway"                      
## [218] "sidewalk.right"                       
## [219] "sidewalk.right.surface"               
## [220] "smoothness"                           
## [221] "sorting_name"                         
## [222] "source"                               
## [223] "source.bridge"                        
## [224] "source.date"                          
## [225] "source.disused"                       
## [226] "source.hgv"                           
## [227] "source.highway"                       
## [228] "source.imagery"                       
## [229] "source.lanes"                         
## [230] "source.maxheight"                     
## [231] "source.maxspeed"                      
## [232] "source.minspeed"                      
## [233] "source.motor_vehicle.conditional"     
## [234] "source.name"                          
## [235] "source.oneway"                        
## [236] "source.parking.lane.both"             
## [237] "source.parking.lanes.both"            
## [238] "source.proposed"                      
## [239] "source.proposed.lanes"                
## [240] "source.ref"                           
## [241] "source.surface"                       
## [242] "sport"                                
## [243] "step_count"                           
## [244] "supervised"                           
## [245] "surface"                              
## [246] "surface.bicycle"                      
## [247] "surface.lanes"                        
## [248] "surface.lanes.backward"               
## [249] "surface.lanes.forward"                
## [250] "surveillance"                         
## [251] "surveillance.type"                    
## [252] "tactile_paving"                       
## [253] "taxi"                                 
## [254] "taxi.lanes"                           
## [255] "toilets"                              
## [256] "toll"                                 
## [257] "tourism"                              
## [258] "tourist_bus"                          
## [259] "tracktype"                            
## [260] "traffic"                              
## [261] "traffic_calming"                      
## [262] "train"                                
## [263] "trolley_wire"                         
## [264] "trolleybus"                           
## [265] "tunnel"                               
## [266] "turn"                                 
## [267] "turn.lanes"                           
## [268] "turn.lanes.backward"                  
## [269] "turn.lanes.forward"                   
## [270] "vehicle"                              
## [271] "vehicle.conditional"                  
## [272] "water"                                
## [273] "wheelchair"                           
## [274] "wheelchair.description"               
## [275] "width"                                
## [276] "wikidata"                             
## [277] "wikimedia_commons"                    
## [278] "wikipedia"                            
## [279] "geometry"

Podemos graficar tambien calles por cantidad de carriles

ggplot(calles) +
    geom_sf(aes(color = lanes), alpha = 0.5) +
    scale_color_viridis_c() +

    labs(title = "Rosario",
         subtitle = "Cantidad de carriles",
         caption = "fuente: OpenStreetMap",
         color = "Cantidad de carriles")

Bares

bares <- opq(bbox) %>% 
  add_osm_feature(key = "amenity", value = "bar") %>% 
  osmdata_sf()

Para los bares necesitamos los puntos

bares <- st_intersection(bares$osm_points, bbox_poly)
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
ggplot() +
  geom_sf(data = calles, 
            color = "blue") +
  geom_sf(data = bares, 
            color = "green")

La distribución de bares está cocnentrada en el centro y a lo largo de la costa del río, disperandose hacia la periferia.

Busquemos los Cafe de la zona

cafe <- opq(bbox) %>% 
  add_osm_feature(key = "amenity", value = "cafe") %>% 
  osmdata_sf()

A diferencia de las calles, para los Cafes queremos los puntos unicamente

cafe <- st_intersection(cafe$osm_points, bbox_poly)
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
ggplot() +
  geom_sf(data = calles, 
            color = "blue") +
  geom_sf(data = cafe, 
            color = "green")

La distribución de cafés repite el patrón de los bares, pero con menos cantidad de cafés, más en la trama de la ciudad y menos en al costa como los bares.

Busquemos los centros de salud de la zona

hospitales <- opq(bbox) %>% 
  add_osm_feature(key = "amenity", value = "hospital") %>% 
  osmdata_sf()
summary(hospitales)
##                   Length Class  Mode     
## bbox               1     -none- character
## overpass_call      1     -none- character
## meta               3     -none- list     
## osm_points        24     sf     list     
## osm_lines          0     -none- NULL     
## osm_polygons      33     sf     list     
## osm_multilines     0     -none- NULL     
## osm_multipolygons  0     -none- NULL

Como los bares, también queremos los puntos unicamente de centros de salud

hospitales <- st_intersection(hospitales$osm_points, bbox_poly)
## although coordinates are longitude/latitude, st_intersection assumes that they are planar
## Warning: attribute variables are assumed to be spatially constant
## throughout all geometries
ggplot() +
  geom_sf(data = calles, 
            color = "blue") +
  geom_sf(data = hospitales, 
            color = "green")

Los centros de salud tienen una distribución más homogénea, en los barrios periféricos aumenta la distancia mínima a un centro, pero la distribución es más o menos continua en general, salvo radios donde se discontinúa.

Rosario_barrios <- st_read("https://datos.rosario.gob.ar/sites/default/files/barrios.gml",
stringsAsFactors = FALSE)
## Reading layer `barrios' from data source `https://datos.rosario.gob.ar/sites/default/files/barrios.gml' using driver `GML'
## Simple feature collection with 50 features and 4 fields
## geometry type:  POLYGON
## dimension:      XY
## bbox:           xmin: -60.79693 ymin: -33.03934 xmax: -60.61278 ymax: -32.86941
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs
hospitales_Rosariobarrios <- st_join(Rosario_barrios, hospitales)
## although coordinates are longitude/latitude, st_intersects assumes that they are planar
names(hospitales_Rosariobarrios)
##  [1] "gml_id"                "MSLINK"               
##  [3] "BARRIO"                "OBSERVACIO"           
##  [5] "osm_id"                "name"                 
##  [7] "access"                "addr.flats"           
##  [9] "addr.housenumber"      "addr.postcode"        
## [11] "addr.street"           "alt_name"             
## [13] "amenity"               "barrier"              
## [15] "contact.phone"         "contact.website"      
## [17] "description"           "emergency"            
## [19] "entrance"              "healthcare"           
## [21] "healthcare.speciality" "official_name"        
## [23] "operator"              "operator.type"        
## [25] "ref"                   "short_name"           
## [27] "wheelchair"            "geometry"
hospitales_Rosariobarrios %>% 
    group_by(BARRIO) %>% 
    summarise(cantidad = n())
## Simple feature collection with 47 features and 2 fields
## geometry type:  GEOMETRY
## dimension:      XY
## bbox:           xmin: -60.79693 ymin: -33.03934 xmax: -60.61278 ymax: -32.86941
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs
## # A tibble: 47 x 3
##    BARRIO        cantidad                                          geometry
##    <chr>            <int>                                     <POLYGON [°]>
##  1 14 de Octubre        1 ((-60.66428 -32.99669, -60.66418 -32.99669, -60.~
##  2 17 de agosto         1 ((-60.66469 -33.00935, -60.65717 -33.0091, -60.6~
##  3 Alberdi             21 ((-60.72078 -32.89466, -60.72014 -32.89389, -60.~
##  4 Alberto Olme~       22 ((-60.66689 -32.94126, -60.66452 -32.93196, -60.~
##  5 Alvear               1 ((-60.6903 -32.97121, -60.68739 -32.97172, -60.6~
##  6 Antártida Ar~        2 ((-60.72207 -32.94906, -60.72202 -32.95005, -60.~
##  7 Azcuenaga            1 ((-60.70364 -32.93467, -60.70205 -32.93495, -60.~
##  8 Barrio del A~       23 ((-60.6559 -32.96538, -60.65359 -32.95621, -60.6~
##  9 Belgrano             2 ((-60.72339 -32.92802, -60.72132 -32.92822, -60.~
## 10 Bella Vista          3 ((-60.68858 -32.95953, -60.68504 -32.96017, -60.~
## # ... with 37 more rows
hospitales_Rosariobarrios <- hospitales_Rosariobarrios %>% 
group_by(BARRIO) %>% 
summarise(cantidad = n())
ggplot() +
geom_sf(data = hospitales_Rosariobarrios, aes(fill = cantidad)) + scale_fill_viridis_c()

En relación al gráfico del trabajo práctico 1, aumenta la cantidad de 7 centros de salud máximo por barrio a 50. Ésto puede ser porque el shapefile de OSM de hospitales está “sucio”, y al tener varias entradas de items de centros de salud sin información localizada los contempla en cada barrio, o también porque más allá de que la categoría hospitales es distinta a otras como veterinarias, farmacias, centros de vacunación, dentistas, todas se encuntran bajo la categoría “healthcare” y pueden estar mezclados.

Posiblemente sean datos erróneos en dos de los tres barrios que figuran con más cantidad de centros, ya que uno de ellos corresponde al área central de Rosario, y coincide con que allí si aumenta la densidad de centros.