This entry is not about the SDGs as such, but about the data available thanks to the 2030 Agenda for Sustainable Development.
There is plenty of information about the 2030 Agenda of Sustainable Development, and in particular, the knowledge platform is very comprehensive (https://sustainabledevelopment.un.org/). National Statistics Agency are the source of data for the SDGs, however, doing data analysis at global level would imply talking to each agency. If you want to do data analysis, the work is a lot simpler using the different resources available at the UN Statistics Division.
There are two ways of getting the data indicator database, where data can be downloaded in comma separated values (CSV), but there is also an easier way for those (like me) that are using R and do not want to bother converting data formats (even if R and CSV are an easy match). You can get the data from the archive, where data is updated on a quarterly basis and is available in CSV and R data formats.
Sticking to the R format, files are compressed in zip format, which unzipped has a size of about 12MB. Once loaded, there is a single dataframe with the following attributes:
> names(SDGData_Q2_2019_Final)
[1] "ID" "Goal" "Target" "Indicator"
[5] "ReleaseStatus" "ReleaseName" "SeriesID" "SeriesCode"
[9] "SeriesDescription" "SeriesObservationCount" "GeoAreaCode" "GeoAreaName"
[13] "TimePeriod" "Value" "ValueType" "Time_Detail"
[17] "Source" "ObservationID" "Age" "Freq"
[21] "Location" "Nature" "Sex" "Source Type"
[25] "UnitMultiplier" "Units" "Management Level" "Level/Status"
[29] "Name of international agreement" "Education level" "Type of product" "Type of facilities"
[33] "Name of international institution" "Type of occupation" "Tariff regime (status)" "Type of skill"
[37] "Mode of transportation" "Type of mobile technology" "Name of non-communicable disease" "Type of speed"
[41] "Migratory status" "Disability status" "Hazard type" "IHR Capacity"
[45] "Cities" "Reporting Type" "Quantile" "Activity"
[49] "Observation Status" "Geo Info Type" "Policy Domains"
To understand the values reported, the Data Structure Definition (DSD) provides clues on the values that each of the attributes can take. In addition, it is worth looking at the metadata to know more about the methodology to obtain the indicators and data sources.
From the data is easy to obtain graphs like the one above just with a bit of R programming.
I do not particularly like spaghetti plots, but this particular one gives the idea of how the whole world (each line is a country) is evolving with respect to indicator 1.1.1, and allows to see the particular evolution of a country (green highlighted line).
*****
Esta entrada no es sobre los ODS sino sobre los datos que están disponibles gracias a la Agenda 2030 de Desarrollo Sostenible.
Hay muchísima información sobre la Agenda 2030 de Desarrollo Sostenible, y en particular, la plataforma de conocimiento (knowledge platform) es muy completa (https://sustainabledevelopment.un.org/). Las Agencias de Estadística Nacionales son la fuente de datos para los ODS, sin embargo, hacer un análísis de datos a nivel global implicaría ir una a una. Si uno quiere hacer análisis de datos, la tarea se simplica mucho utilizando los recursos que la División de Estadística de Naciones Unidas tiene disponibles.
Hay dos maneras de obtener los datos indicator database, donde los datos pueden ser descargados en formato de valores separados por comas (CSV), pero hay una manera mas sencilla para aquellas personas (como yo) que utilizan R y no quieren complicarse la vida convirtiendo formatos (incluso si R puede trabajar con CSV). Se puede obtener la información del archivo, que tiene datos actualizados cada tres meses y disponibles en formato R y CSV.
Si uno se centra en el formato R, los ficheros que se pueden obtener están comprimidos en zip, una vez descomprimidos ocupan unos 12MB, y que, una vez cargados, conforman un único dataframe con los siguientes atributos:
> names(SDGData_Q2_2019_Final)
[1] "ID" "Goal" "Target" "Indicator"
[5] "ReleaseStatus" "ReleaseName" "SeriesID" "SeriesCode"
[9] "SeriesDescription" "SeriesObservationCount" "GeoAreaCode" "GeoAreaName"
[13] "TimePeriod" "Value" "ValueType" "Time_Detail"
[17] "Source" "ObservationID" "Age" "Freq"
[21] "Location" "Nature" "Sex" "Source Type"
[25] "UnitMultiplier" "Units" "Management Level" "Level/Status"
[29] "Name of international agreement" "Education level" "Type of product" "Type of facilities"
[33] "Name of international institution" "Type of occupation" "Tariff regime (status)" "Type of skill"
[37] "Mode of transportation" "Type of mobile technology" "Name of non-communicable disease" "Type of speed"
[41] "Migratory status" "Disability status" "Hazard type" "IHR Capacity"
[45] "Cities" "Reporting Type" "Quantile" "Activity"
[49] "Observation Status" "Geo Info Type" "Policy Domains"
Para entender mejor los atributos, la Data Structure Definition (DSD) proporciona pistas sobre que valores puede tomar cada atributo. Además, merece la pena echar un vistazo a los metadatos para saber más sobre la metodología de obtención de los indicadores y las fuentes de datos.
Usando los datos es sencillo obtener gráficos como el de más arriba, solo aplicando un poco de programación en R. A mi no me gustan demasiado los gráficos de espagheti pero este ejemplo particular da una idea de como esta evolucionando el mundo (cada linea es un pais) en relación al indicador 1.1.1. y permite ver la evolución de un país concreto, que sería el que esta resaltado en verde.
This is just my notebook. I am interested in a wide range of topics, data visualization, data science, statistics, machine learning, electronics, definitively outer space and much more... Esto es mi cuaderno de notas, Me interesan muchos temas, desde visualización y ciencia de datos, estadística, inteligencia artificial, electrónica, definitivamente el espacio exterior y mucho más
Suscribirse a:
Enviar comentarios (Atom)
Como hacer funcionar un Joystick analógico con una Raspberry Pi 1B
Me regalaron un kit de eletrónica para Arduino , y esas plataformas estan genial para sistemas de control en tiempo real, cada pin hará lo q...
-
Lo que sí voy a hacer en esta entrada es mostrar como se comporta una LSTM al cambiar algunos parámetros, creando un código usando Keras mu...
-
astroquery es una librería de Python permite obtener las posiciones de cuerpos celestes en el sistema Solar. Después de estar jugando con el...
-
Me regalaron un kit de eletrónica para Arduino , y esas plataformas estan genial para sistemas de control en tiempo real, cada pin hará lo q...
No hay comentarios:
Publicar un comentario