Documentation ¶
Index ¶
- Constants
- func AndamentoNazionaleCompleto(data *[]NationData, title, filename string) (error, string)
- func AttualmentePositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
- func CalculateDelta(first int, second int) (float64, string)
- func DeleteAllPlots(folder string)
- func DeleteFile(filename string) error
- func FilenameCreator(plotTitle string) (filename string)
- func FindFirstOccurrenceNation(data *[]NationData, fieldName string, toFind interface{}) (int, error)
- func FindFirstOccurrenceNote(data *[]NoteData, fieldName string, toFind interface{}) (int, error)
- func FindFirstOccurrenceProvince(data *[]ProvinceData, fieldName string, toFind interface{}) (int, error)
- func FindFirstOccurrenceRegion(data *[]RegionData, fieldName string, toFind interface{}) (int, error)
- func FindLastOccurrenceProvince(data *[]ProvinceData, fieldName string, toFind interface{}) (int, error)
- func FindLastOccurrenceRegion(data *[]RegionData, fieldName string, toFind interface{}) (int, error)
- func GetCentroRegionsNamesList() []string
- func GetLastProvincesByRegionName(data *[]ProvinceData, regionName string) *[]ProvinceData
- func GetNation() (*[]NationData, error)
- func GetNordRegionsNamesList() []string
- func GetNotes() (*[]NoteData, error)
- func GetProvinces() (*[]ProvinceData, error)
- func GetRegions() (*[]RegionData, error)
- func GetRegionsNamesList(data *[]RegionData) []string
- func GetSudRegionsNamesList() []string
- func GetTopTenProvincesTotaleContagi(data *[]ProvinceData) *[]ProvinceData
- func GetTopTenRegionsTotaleContagi(data *[]RegionData) *[]RegionData
- func IsGraphExisting(filename string) bool
- func NuoviPositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
- func NuoviPositiviProvincia(data *[]ProvinceData, provinceName string, placeAnnotations bool, ...) (error, string)
- func TotaleDecedutiNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
- func TotaleGuaritiNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
- func TotalePositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
- func TotalePositiviProvincia(data *[]ProvinceData, provinceIndex int, provinceCode int, ...) (error, string)
- func VociNazione(data *[]NationData, fieldName []string, nationIndex int, ...) (error, string)
- func VociProvince(data *[]ProvinceData, fieldName []string, provinceIndex int, provinceCode int, ...) (error, string)
- func VociRegione(data *[]RegionData, fieldName []string, regionIndex int, regionCode int, ...) (error, string)
- type NationData
- type NoteData
- type ProvinceData
- type RegionData
Constants ¶
const ProvinceOffset = 149
Variables ¶
This section is empty.
Functions ¶
func AndamentoNazionaleCompleto ¶
func AndamentoNazionaleCompleto(data *[]NationData, title, filename string) (error, string)
Returns a plot including total cases, healed and dead
func AttualmentePositiviNazione ¶
func AttualmentePositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
Returns a plot including national current positive cases
func CalculateDelta ¶
Calculates delta between two integer quantities
func FilenameCreator ¶
Returns a well formatted filename
func FindFirstOccurrenceNation ¶
func FindFirstOccurrenceNation(data *[]NationData, fieldName string, toFind interface{}) (int, error)
Finds the first occurence in the nation data array for the specified field
func FindFirstOccurrenceNote ¶
Finds the first occurence in the notes data array for the specified field
func FindFirstOccurrenceProvince ¶
func FindFirstOccurrenceProvince(data *[]ProvinceData, fieldName string, toFind interface{}) (int, error)
Finds the first occurence in the provinces data array for the specified field
func FindFirstOccurrenceRegion ¶
func FindFirstOccurrenceRegion(data *[]RegionData, fieldName string, toFind interface{}) (int, error)
Finds the first occurence in the regions data array for the specified field
func FindLastOccurrenceProvince ¶
func FindLastOccurrenceProvince(data *[]ProvinceData, fieldName string, toFind interface{}) (int, error)
Finds the last occurence in the provinces data array for the specified field
func FindLastOccurrenceRegion ¶
func FindLastOccurrenceRegion(data *[]RegionData, fieldName string, toFind interface{}) (int, error)
Finds the last occurence in the regions data array for the specified field
func GetCentroRegionsNamesList ¶
func GetCentroRegionsNamesList() []string
Returns central regions names list
func GetLastProvincesByRegionName ¶
func GetLastProvincesByRegionName(data *[]ProvinceData, regionName string) *[]ProvinceData
Returns the last provinces data according to the given region name
func GetNation ¶
func GetNation() (*[]NationData, error)
Retrieves and parses nation data from the pcm repo
func GetNordRegionsNamesList ¶
func GetNordRegionsNamesList() []string
Returns northern regions names list
func GetProvinces ¶
func GetProvinces() (*[]ProvinceData, error)
Retrieves and parses provinces data from the pcm repo
func GetRegions ¶
func GetRegions() (*[]RegionData, error)
Retrieves and parses regions data from the pcm repo
func GetRegionsNamesList ¶
func GetRegionsNamesList(data *[]RegionData) []string
Returns regions names list
func GetSudRegionsNamesList ¶
func GetSudRegionsNamesList() []string
Returns southern regions names list
func GetTopTenProvincesTotaleContagi ¶
func GetTopTenProvincesTotaleContagi(data *[]ProvinceData) *[]ProvinceData
Returns top provinces according to field totale_casi
func GetTopTenRegionsTotaleContagi ¶
func GetTopTenRegionsTotaleContagi(data *[]RegionData) *[]RegionData
Returns top regions according to field totale_contagi
func IsGraphExisting ¶
Checks if a given plot already exist by title
func NuoviPositiviNazione ¶
func NuoviPositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
Returns a plot including national new cases
func NuoviPositiviProvincia ¶
func NuoviPositiviProvincia(data *[]ProvinceData, provinceName string, placeAnnotations bool, title, filename string) (error, string)
Returns new cases for the given province
func TotaleDecedutiNazione ¶
func TotaleDecedutiNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
Returns a plot including national total deaths
func TotaleGuaritiNazione ¶
func TotaleGuaritiNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
Returns a plot including national total healed
func TotalePositiviNazione ¶
func TotalePositiviNazione(data *[]NationData, placeAnnotations bool, title, filename string) (error, string)
Returns a plot including national total cases
func TotalePositiviProvincia ¶
func TotalePositiviProvincia(data *[]ProvinceData, provinceIndex int, provinceCode int, title, filename string) (error, string)
Returns total cases for the given province
func VociNazione ¶
func VociNazione(data *[]NationData, fieldName []string, nationIndex int, title, filename string) (error, string)
Returns a plot with the national data according to the specified fields
func VociProvince ¶
func VociProvince(data *[]ProvinceData, fieldName []string, provinceIndex int, provinceCode int, title, filename string) (error, string)
Returns a plot with the data of a specified province according to the specified fields
func VociRegione ¶
func VociRegione(data *[]RegionData, fieldName []string, regionIndex int, regionCode int, title, filename string) (error, string)
Returns a plot with the data of a specified region according to the specified fields
Types ¶
type NationData ¶
type NationData struct { Data string `json:"data"` Stato string `json:"stato"` Ricoverati_con_sintomi int `json:"ricoverati_con_sintomi"` Terapia_intensiva int `json:"terapia_intensiva"` Totale_ospedalizzati int `json:"totale_ospedalizzati"` Isolamento_domiciliare int `json:"isolamento_domiciliare"` Totale_positivi int `json:"totale_positivi"` Nuovi_positivi int `json:"nuovi_positivi"` Dimessi_guariti int `json:"dimessi_guariti"` Deceduti int `json:"deceduti"` Totale_casi int `json:"totale_casi"` Tamponi int `json:"tamponi"` Note_it string `json:"note_it"` }
National data struct containing fields from the parsed JSON
type NoteData ¶
type NoteData struct { Codice string `json:"codice"` Data string `json:"Data"` Regione string `json:"regione"` Provincia string `json:"provincia"` Tipologia_avviso string `json:"tipologia_avviso"` Avviso string `json:"avviso"` Note string `json:"NoteData"` }
Notes data struct containing fields from the parsed CSV
type ProvinceData ¶
type ProvinceData struct { Data string `json:"data"` Stato string `json:"stato"` Codice_regione int `json:"codice_regione"` Denominazione_regione string `json:"denominazione_regione"` Codice_provincia int `json:"codice_provincia"` Denominazione_provincia string `json:"denominazione_provincia"` Sigla_provincia string `json:"sigla_provincia"` Lat float64 `json:"lat"` Long float64 `json:"long"` Totale_casi int `json:"totale_casi"` Note_it string `json:"note_it"` NuoviCasi int }
Provincial data struct containing fields from the parsed JSON
type RegionData ¶
type RegionData struct { Data string `json:"data"` Stato string `json:"stato"` Codice_regione int `json:"codice_regione"` Denominazione_regione string `json:"denominazione_regione"` Lat float64 `json:"lat"` Long float64 `json:"long"` Ricoverati_con_sintomi int `json:"ricoverati_con_sintomi"` Terapia_intensiva int `json:"terapia_intensiva"` Totale_ospedalizzati int `json:"totale_ospedalizzati"` Isolamento_domiciliare int `json:"isolamento_domiciliare"` Totale_positivi int `json:"totale_positivi"` Nuovi_positivi int `json:"nuovi_positivi"` Dimessi_guariti int `json:"dimessi_guariti"` Deceduti int `json:"deceduti"` Totale_casi int `json:"totale_casi"` Tamponi int `json:"tamponi"` Note_it string `json:"note_it"` }
Regional data struct containing fields from the parsed JSON