Giter Club home page Giter Club logo

corona-lgl-bayern-scraper's Introduction

corona-lgl-bayern-scraper

Scrape corona case-data from the lgl.bayern.de website

Serverless

You can depoy a serverless function:

serverless deploy

You'll need to set a few environment-variables to recieve error messages from the telegram corona-serverless-error-bot:

  • TELEGRAM_BOT_TOKEN
  • TELEGRAM_CHAT_ID

Here is an example endpoint you can use:

https://9gqwiyjoha.execute-api.eu-central-1.amazonaws.com/dev/getCoronaDataBaveria

API Example

const LGLBayernCoronaDataScraper = require('corona-lgl-bayern-scraper');
	
const scraper = new LGLBayernCoronaDataScraper();
await scraper.loadPage();

const srcUrl = scraper.getSourceUrl();
const copyright = scraper.getCopyright();
const lastUpdate = scraper.getLastUpdate();
const data = scraper.getTableEntries();

const returnJson = {
	srcUrl,
	copyright,
	lastUpdate,
	data
}

console.log(returnJson);

Output:

"srcUrl": "https://www.lgl.bayern.de/gesundheit/infektionsschutz/infektionskrankheiten_a_z/coronavirus/karte_coronavirus/index.htm",
  "copyright": [
    "© Bayerisches Landesamt für Gesundheit und Lebensmittelsicherheit 2020",
    "© Statistisches Bundesamt (Destatis)"
  ],
  "lastUpdate": "2020-04-07T08:00:00.000Z",
  "data": [
    {
      "name_org": "Aichach-Friedberg",
      "name": "Aichach-Friedberg",
      "type": "Landkreis",
      "ags": "09771",
      "area_km2": 780.23,
      "population": 133596,
      "population_male": 66651,
      "population_female": 66945,
      "population_per_km2": 171,
      "infected": 189,
      "infected_new": 15,
      "infected_100k": 141.47,
      "infected_indicator_100k": 51.65,
      "deaths": 5,
      "deaths_new": 0
    },
		...
	]
}

corona-lgl-bayern-scraper's People

Contributors

eloo avatar mojoaxel avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

eloo

corona-lgl-bayern-scraper's Issues

Add license

Hi,

it would be great if a license could be added to the project so its clear how this project can be used.

I would recommend the MIT license as this license is really common in the open source community.

More information about different licenses can be found here https://choosealicense.com/

Thanks

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.