Giter VIP home page Giter VIP logo

netotz / georreferenciacion Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 2.0 46.45 MB

(Python) Proyecto de investigación de PROVERICYT 2020: Georreferenciación con datos de contaminantes en el área metropolitana de Monterrey.

Home Page: https://elisa.dyndns-web.com/verano/2020/ernesto.pdf

License: MIT License

Python 0.02% HTML 99.98%
python maps geolocation espanol epidemiology pollution plotly uanl

georreferenciacion's Introduction

Georreferenciación

Verano Científico de la UANL 2020: Georreferenciación con datos de contaminantes en el Área Metropolitana de Monterrey (AMM).

Ver póster en español aquí.


2020 University Scientific Summer: Geostatistical analysis of pollution in the city of Monterrey, México.

See Spanish poster here.

CLI

Este proyecto cuenta con una interfaz de línea de comandos (CLI). Para usarla basta con ejecutar el archivo cli.py desde el directorio de este repositorio:

python georef/cli.py --help

Instalar comando

También es posible instalar el programa para mandarlo a llamar desde un comando:

python setup.py install

Luego de instalarlo, el programa estará disponible con el comando georef, sin tener que usar el de Python:

georef --help

Mapas de calor / Heat maps

Translated from publication (not revised):

Meteorological stations monitor air quality only in the microenvironment around them, so spatial interpolation methods are used, which are used to estimate or predict new levels of pollutants at points without information, based on the locations of the stations. stations and their known values.

Kriging is a spatial interpolation method that provides the best unbiased linear estimator of a point and minimizes the variance of the estimate. In the present work, the ordinary kriging method is used.

Starting from the known locations, that is, the thirteen monitoring stations, the points with calculated values ​​of the pollutant are predicted using a recursive calculation method by grids: it begins by executing the kriging method with a 5 × 5 grid, which is used to calculate another by adding five rows and five columns, 10 × 10. The procedure ends when there is a 40 × 40 coordinate grid, within which each cell has an estimated value on the pollutant, which results in a total of 1600 estimated points. These new points are used to plot a heat map for a pollutant on the MMA.

Se requiere una base de datos CSV con la siguiente cabecera:

timestamp,station,CO,NO,NO2,NOX,O3,PM10,PM2_5,pressure,rainfall,humidity,SO2,solar,temperature,velocity,direction,valid,notes

También se necesita un token de Mapbox para poder generar estos mapas. Para los detalles, consultar ayuda de Mapbox (en inglés).

Al ejecutar la función plot_heatmap (ver heatmap.py) se genera un mapa de calor animado como el siguiente:

Mapa de calor

En la carpeta results/pollution se encuentran los HTML de mapas completos de distintas fechas, y enlaces para visualizarlos.

  • La escala de colores representa el nivel del contaminante.
  • La dirección de los marcadores indica la dirección del viento.
  • La opacidad de los círculos sobre los marcadores representa la velocidad del viento.

Mapas coropléticos / Choropleth maps

Se requiere uno de los archivos EGRESO_{año}.csv disponibles en el sitio web de la Secretaría de Salud.

También se requiere un archivo GeoJSON que contenga la división municipal del AMM: resources/amm_mun2019gw.json (archivo local).

Al ejecutar la función plot_entries_choropleth (ver choropleth.py) se genera un mapa coroplético animado como el siguiente:

Mapa coroplético

Muestra el número de casos de ingresos hospitalarios agrupados por CIE, municipio del AMM y semana epidemiológica.

En la carpeta results/entries se encuentra un HTML de un mapa, pero está incompleto, pues no contiene todas las semanas epidemiológicas, debido a que el límite de tamaño en GitHub son 100 MB. Para generar un mapa completo es necesario ejecutar la función.

Recursos

Los archivos que necesita cada mapa deben encontrarse en una carpeta de nombre resources, como se muestra en este repositorio.

georreferenciacion's People

Contributors

netotz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.