Giter Site home page Giter Site logo

emibcn / covid-data Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 16.2 MB

Store and serve daily collected data from https://dadescovid.org for sibling app at https://emibcn.github.io/covid/

Home Page: https://emibcn.github.io/covid/

License: GNU General Public License v3.0

Shell 3.20% JavaScript 96.80%
cache storage covid-data backend github-page github-pages github-actions workflow scraper scraped-data hacktoberfest json json-objects charts generalitat-de-catalunya

covid-data's Introduction

DeepSource Download maps and charts from backend and publish with GitHub Pages

Covid Data

This repo is used to store and serve daily collected data from https://dadescovid.org (institutional data published by the Generalitat de Catalunya ) and Seguiment Covid19 BCN (institutional data collected and published by the Ajuntament de Barcelona) into GitHub pages. The reasons for collecting this data are:

The collected data from https://dadescovid.cat is minimally adapted before publishing it:

Maps:

  • Transform JS statements into JSON objects
  • Reduce some non-visible id's to reduce users and servers resource consumptions

Charts:

  • Transform JS statements into JSON objects
  • Transform HTML tags attributes and content into JSON structured data

The collected data from Seguiment Covid19 BCN is deeply reshaped, throwing away the unneded/repetitive data.

This repo might collect other data in the future, from the same server, it's backend server or from 3rd party servers (EU statistics servers? Data collection from other regions?).

Techie

This process is executed from a GitHub Workflow (cron scheduled some minuts after official data publication at 10am CEST). Once the data is obtained, deploy it to this repo' GitHub Pages in the gh-pages branch.

Maps

The data is collected by an ugly BASH script. This script collects the interesting parts (maps SVG source, JS code with data on it) and saves them into files. The SVG files are saved transparently. The JS files are executed with NODE to ouput the collected data as JSON.

Charts

The data is collected by a NodeJS package. This script scrapes data from HTML tags and JS code. It generates individual JSON files for each region/population selectors, and a global JSON index file with the regions recursive structure and all the download links. Deep use of async/await.

Barcelona

The data is collected by a nice NodeJS package. This script uses a self made version of SockJS to scrape data from a RStudio/Shiny server. It generates individual JSON files for each datasource or datasource section, and a global JSON index file with the data and all the download links. Deep use of async/await. Some use of Streams and Iterator Generator and deep use of async/await. Very funny stuff!

License

The application, scripts and documentation in this project are released under the GNU General Public License v3.0.

The license of the data scraped from https://dadescovid.cat and saved into the directories Charts and Maps is the same as the original: Open Data Commons Attribution License, as stated in the backend API page owned by the Generalitat de Catalunya.

The license of the data scraped from https://dades.ajuntament.barcelona.cat/seguiment-covid19-bcn is the same as the original: Creative Commons CC-BY. The owner is the Ajuntament de Barcelona.

covid-data's People

Contributors

deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar emibcn avatar

Watchers

 avatar  avatar  avatar

covid-data's Issues

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.