Maggio 2020
  • GIS and Web Gis 2.0
  • Drupal 8
  • Open Data

Drupal 8 as Web Gis Opensource for the Spatial Data Analysis on Covid 19

Geofield stack for COVID-19 data management of John Hopkins University Repository

Link to the Drupal 8 application: http://www.geodemocracy.com/covid19/web/

 

Preface

Drupal 8 is an excellent framework and CMS for the modelling, management and representation of any information entity. At the same time, it lends itself very well to integrating javascript geo mapping frameworks and implementing spatial analysis and representation features.

Since its version 7, thanks to the Geofield module and the GeoPHP library, Drupal is able to store and manage geographical data, and in particular any type of geometry (points, lines, polygons and multi-geometries), and do it in different formats (WKT and Geojson).

Thanks to the stack of modules connected to Geofield, Drupal can be transformed into an advanced Web Gis 2.0 application, completely opensource.

Description of the application

For this specific application in Drupal 8 I wanted to experiment with the Geofield stack for importing and representing Covid 19 data, in a similar way to the now famous John Hopkins University Covid19 World Map.

For this reason, the data source made available in the corresponding COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) of Johns Hopkins University was used.

Nothing innovative and too ambitious therefore: an experimental and didactic project to verify the use of Drupal 8 as a platform capable of managing and spatially representing large quantities of data, of very current interest.

In terms of model, every record of every daily report was managed as a node entity of Drupal.

No alt text provided for this image

For the representation, a View with Leaflet module was used, taking advantage in particular of the support for the Leaflet Circle Marker, recently implemented in the module itself. With Json syntax the Marker rendering options can be easily customised according to the data to be represented (radius, fill color and border, opacity, etc.). The radius value can be suitably modulated through the hook functions made available by the Leaflet module APIs. The module also offers various features to customise the information Pop Up for each object represented on the map.

For the import of the data, the Feeds module is used, natively supported by Geofield (to date for Point data), with a consistent functionality and stability (albeit to date in Alpha version for Drupal 8), as well as the related Feeds Tamper module, essential for preprocessing imported data.

No alt text provided for this image

The application is able to check daily new available data and update itself automatically thanks to the advanced features of Drupal Cron, the support of the Ultimate Cron module, and custom code for the creation logic of each new feed entity. Synchronisation is currently taking place a few hours later than the official John Hopkins University data availability.

A Day Select filter has been implemented in the Spatial Views of the World Maps that allows the updating of the same Views via Ajax for each available date of the correctly imported data.

The Geofield Map module (for the possible spatial management of the acquired data) and the Geocoder module (for any automatic Geocoding / Reverse geocoding of the data) have also been implemented as accessories for the possible spatial management.

Possible future evolutions: Implementation of new spatial and non-spatial GIS representations of the acquired data.

Link to the Drupal 8 applicationhttp://www.geodemocracy.com/covid19/web/

  • Drupal 8
  • Web Gis 2.0
  • Gis Spatial Analysis
  • Covid19
  • Corona Virus
  • Open Data
  • Opensource
  • John Hopkins University