How to calculate indicators with `coresoi`
calculate-indicators.Rmd
Calculate an indicator
Let’s say we are interested in calculating and indicator say number 3, namely Economic deviation across the crisis. The indicator aims at quantifying the difference between the sum foreseen in the contract and the actual payment by the C.A. ( ita S.A. Stazione Appaltante) prior and after the emergency outbreak. This is extremely convenient since we may expect that the ratio between what’s should be paid and what it is actually paid (in other words the the proportion of the contract value left to be paid) needs to remain just as equal in the two adjacent periods. We may also suppose that this does not happen due to the fact that during emergency outbreaks inspections and controls are wicker and less in-depth. This may give the chance to fraudsters to get money quicker than before and runaway with 💰.
All we need to do is to load data sample mock_data_core
and supply related variables to function ind_3()
. Check out
the documentation for function ind_3()
to get a grasp on
that.
data("mock_data_core", package = "coresoi")
ind_3(
data = mock_data_core,
award_value=importo_aggiudicazione,
sums_paid=importo_lotto,
cf_amministrazione_appaltante,
publication_date=data_pubblicazione,
emergency_name = "coronavirus"
) |>
head(10)
#> # A tibble: 10 × 12
#> indicator_id indica…¹ indic…² aggre…³ aggre…⁴ aggre…⁵ emerg…⁶ emerg…⁷ count…⁸
#> <dbl> <chr> <dbl> <chr> <chr> <chr> <int> <chr> <chr>
#> 1 3 Economi… 0.5 000647… ISTAT1 cf_amm… 1 Corona… 1
#> 2 3 Economi… 0 000759… ISTAT1 cf_amm… 1 Corona… 1
#> 3 3 Economi… 0.5 000982… ISTAT1 cf_amm… 1 Corona… 1
#> 4 3 Economi… 1 001043… ISTAT1 cf_amm… 1 Corona… 1
#> 5 3 Economi… 1 001086… ISTAT1 cf_amm… 1 Corona… 1
#> 6 3 Economi… 0.794 001155… ISTAT1 cf_amm… 1 Corona… 1
#> 7 3 Economi… 1 001184… ISTAT1 cf_amm… 1 Corona… 1
#> 8 3 Economi… 1 001188… ISTAT1 cf_amm… 1 Corona… 1
#> 9 3 Economi… 0.429 001246… ISTAT1 cf_amm… 1 Corona… 1
#> 10 3 Economi… 0.5 001323… ISTAT1 cf_amm… 1 Corona… 1
#> # … with 3 more variables: country_name <chr>, indicator_last_update <dttm>,
#> # data_last_update <dttm>, and abbreviated variable names ¹indicator_name,
#> # ²indicator_value, ³aggregation_name, ⁴aggregation_id, ⁵aggregation_type,
#> # ⁶emergency_id, ⁷emergency_name, ⁸country_id
The output from ind_3
is a schema which shows
… we may want also to be interested in…
… ggplot2 graphs and minimal model…