Skip to content

ppapapetrou76/go-data-gov-gr-sdk

Repository files navigation

Codacy Badge codebeat badge Fluent Go Testing Quality Gate Status codecov Go Report Card GoDoc

go-data-gov-gr-sdk

A Go based SDK to access the public data provided by the Greek Government and are available at https://www.data.gov.gr/

Quick Start

Get your API Token

Submit the form found here You will receive by email an API token. You will use it to access the data in the example below

Add the SDK as a dependency to your project

go get github.com/ppapapetrou76/go-data-gov-gr-sdk

or if you are using go modules ( recommended )

go mod download github.com/ppapapetrou76/go-data-gov-gr-sdk

Implement a client to read some data

package main

import (
	"fmt"
	"os"
	"time"

	"github.com/ppapapetrou76/go-data-gov-gr-sdk/api"
	"github.com/ppapapetrou76/go-data-gov-gr-sdk/pkg/vaccination"
)

func main() {
	// Fetches the vaccination data for the last 6 days for all areas
	client := api.NewClient("<YOUR_API_TOKEN_HERE>")
	vaccinationData, err := vaccination.Get(client,
		api.NewDefaultGetParams(api.SetDateFrom(time.Now().Add(-fiveDays))),
	)
	if err != nil {
		panic(err)
	}
	// Filter by a specific region
	for _, d := range vaccinationData.FilterByArea("ΘΕΣΣΑΛΟΝΙΚΗΣ") {
		fmt.Fprintf(os.Stdout, "Area:%s, Vaccinations on %v:%d\n", d.Area, d.ReferenceDate, d.DayTotal)
	}
}

Implemented endpoints

To be implemented soon

  • Business and Economy (Small businesses, industry, imports, exports and trade)
  • Crime and Justice (Courts, police, prison, offenders, borders and immigration)
  • Education (Students, training, universities, quaifications)
  • Environment (Weather, flooding, rivers, air quality, geology and agriculture)
  • Health (Includes smoking, drugs, alcohol, medicine performance and hospitals)
  • Society (Employment, benefits, household finances, poverty and population)
  • Technology (Internet, technology and digital adoption)
  • Telecommunication (Telecommunications data, television and radio)
  • Transport (Airports, roads, freight, electric vehicles, parking, buses and footpaths)

data.gov.gr clients / SDK in other languages

About

A go SDK for the data available via data.gov.gr

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages