top of page

GEORREFERENCIAR PUNTOS CON GOOGLE y DENUE

ESTHER QUIÑONES LUNA

Se presenta un ejemplo de como georreferencia puntos de la base de datos del Directorio Estadístico Nacional de Unidades Económicas (DENUE) del Instituto Nacional de Estadística y Geografía (INEGI) con Google Maps. Comparto el código para R-Studio. ¡No olvides cambiar directorios e incorporar clave de Google!


CODIGO

##ESTABLECIMIENTOS SECTOR 336 FABRICACIÓN DE EQUIPO DE TRANSPORTE

#ESTHER QUIÑONES LUNA



library(dplyr)

library(stringr)

library(tidyverse)



#Directorio de la información


setwd('C:\\')


####----Ciudad de México----


library(knitr)

library(PKI)

library(packrat)

library(ggplot2)

library(ggmap)

library(tibble)


##CLAVE GOOGLE


register_google(key="AIzaSyBgjCTDgl1N9vbiK.....")


Geo.Cdmx<- get_map("Ciudad de México", maptype = "roadmap", zoom =11)

ggmap(Geo.Cdmx)



EstIA.Cdmx <- read.csv("C:\\EstIA.Cdmx.csv",

encoding = "UTF-8")


EstIA.Cdmx <-rename(EstIA.Cdmx, Empleados=per_ocu,Actividad=nombre_act)


ggmap(Geo.Cdmx)+

geom_point(data=EstIA.Cdmx, aes(x=longitud, y=latitud, color=Actividad, shape=Empleados),

size=2)+

scale_shape_manual(values=c(16,17))+

ggtitle("Unidades Económicas en Ciudad de México")+

labs(x="longitud", y="latitud")


ARCHIVOS


RESULTADO




Enlace externo a video para registrarse en Google y obtener la clave (NO SOY AUTORA, NI PARTICIPE EN SU DESARROLLO)




41 visualizaciones0 comentarios

Entradas Recientes

Ver todo

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Publicar: Blog2_Post
bottom of page