Does the lazy laugh come when you hear about digital transformation? Do you no longer believe in open data promises? Do you think it is ugly to squander public money in "Portalitos"? You are in the right place.
The plan is to build decent APIs that consult public data sources (for example, web pages) to use administration services in a programmatic way.
Try to consult some examples in a real demo:
There are many services to include and I will not be able to do it alone. Collaborate!
The project is divided into several packages:
egov-api-server uses this package.HTTP server that exposes an API Graphql to access real public data (try demo). It is developed at node.js (TypeScript) with Apollo Graphql and is the easiest way to access the data.

You can consult the data scheme. I have started with data from geographical locations and telecommunications services available in the area (antennas, digital television channels, available networks).
You just need node.js 10+. You must initialize the project after closing it for the first time:
git clone [email protected]:palmerabollo/egov.git
cd egov
npm install
And execute it:
npm run start:api-server
At http: // localhost: 4000 you will have the website access to the API Graphql to execute your queries. If you feel like it, there are more details about the development process in the guide for collaborators.
Note: Some administrations have insecure servers, affected by vulnerabilities (CVE-2009-3555) for more than a decade. This prevents the support of node.js> 16 / OpenSL 3.x. It is necessary to investigate whether it can be ignored with the variable
SSL_OP_LEGACY_SERVER_CONNECT.
It includes the implementation of data suppliers: consultation services that extract public sources data. Some services consult data when requested (online) and others use local data (offline).
Creating a new service is very simple. The following are currently developed. Check out and propose new ideas in the ISSUES or send your Pull request with new services. It is very easy.
| Service | Class | Data origin | On-line |
|---|---|---|---|
| Search for populations and postal codes Category: General | PostalCodeService | Geonames.org | ❎ (Local File) |
| Mobile telephone antennas location Category: Telco | AntennaService | geoportal.minetur.gob.es | ✅ (API) |
| 4G to 800MHz coverage verification Category: Telco | NetworkService | www.llega800.es | ✅ (API) |
| Television signals by geographic location Category: Telco | DigitalTelevisionService | www.televisiongital.gob.es | ✅ (HTML) |
| Traffic radars Category: Traffic | TrafficRadarService | www.dgt.es | ✅ (HTML, PDF) |
| Vehicle information Category: Traffic | TrafficVehicleService | www.dgt.es | ✅ (HTML, PDF) |
Examples of programmatic use of the consultation services available in egov-data-providers .
import * as egov from '@egov/data-providers' ;
let service = new egov . AntennaService ( ) ;
let antennas = await service . findAntennas ( 41.73 , - 5.32 ) ;
console . table ( antennas , [ 'code' , 'latitude' , 'longitude' ] ) ;
// output
// ┌─────────┬───────────────────────────────────┬───────────┬───────────┐
// │ (index) │ code │ latitude │ longitude │
// ├─────────┼───────────────────────────────────┼───────────┼───────────┤
// │ 0 │ 'VODAFONE ESPAÑA, S.A. - 144588' │ 41.471472 │ -4.989911 │
// │ 1 │ 'VODAFONE ESPAÑA, S.A. - 144589' │ 41.479806 │ -5.048222 │
// │ 2 │ 'ORANGE ESPAGNE, SAU - CYLR2147A' │ 41.471472 │ -4.989911 │
// │ 3 │ 'ORANGE ESPAGNE, SAU - CYLR2223B' │ 41.479806 │ -5.048222 │
// └─────────┴───────────────────────────────────┴───────────┴───────────┘The Egov code is developed at Node.js (TypeScript). Those who want to contribute to new data suppliers in other programming language, have the possibility of being executed as independent processes that expose an HTTP interface. These adapter processes can obtain the data, process them and offer them to EGOV through that HTTP interface.
There is a proof of concept to obtain traffic radars with a Python process that scrap of the DGT radars data. This process is being executed as a Serverless function in AWS Lambda.
Data-Provider-(HTTP)-> Adapter-(http scrape)-> Datasource
Why Serverless? Because it is the way to do the economically sustainable project, without having to ask for money for now.
Copyright 2019 - Guido García (Guido.Garcia at Protonmail Dot Com)
Licensed Under The Gnu, General Public License, version 2.0 (The "License"); You May Not use this file except in compliance with the license.
SUB INFORMATION POSTAL CODES IS PROVIDED BY GEONAMES Under A CREATIVE COMMONS ATTRIBUTION 4.0 LICENSE.