Skip to content

elenigvasilaki/datagovgR

Repository files navigation

datagovgR

Lifecycle: experimental

R wrapper package for the data.gov.gr API.

The goal of datagovgR is to enable R users, data analysts, academics and students to work with the Greek open governmental data programmatically. By default, the package returns queries from the v1 API on https://data.gov.gr/api/v1/. Unfortunately, no official documentation has come to my attention for this API.

The following endpoints are currently available through the package:

  • “mdg_emvolio” Covid-19 Vaccination Statistics

Installation

You can install the development version of datagovgR using devtools like so:

# install.packages("devtools")
devtools::install_github(hypnicjerk91/datagovgR)

What else do I need?

You will need an access token to retrieve records from data.gov.gr. You may request for your API token on https://www.data.gov.gr/token. After your request, check your email regularly for your data.gov.gr API token.

Setting up

Telling datagovgR about your API token

You have to set your token once for all your API calls to use with the package’s corresponding function.

To set:

set_token("token abcd12344321")

To retrieve your token (if needed):

get_token()

’GET’ting data

This is a basic example which shows you how to query the API. You will have to set the endpoint/dataset you are going to call, start_date (optional) and end_date (optional).

install_github("hypnicjerk91/datagovgR")
library(datagovgR)
data <- gov_query("mdg_emvolio","2022-07-04","2022-07-11")
## basic example code using the Covid-19 Vaccination dataset
summary(data)

Related projects

License

Distributed under the MIT License.

Acknowledgements

All rights are reserved by the official https://data.gov.gr site, its developers, its maintainers and the Hellenic Government.

Releases

No releases published

Packages

No packages published

Languages