refactoring
This commit is contained in:
@@ -31,12 +31,12 @@ class BatchcodeByCountryBarChart {
|
||||
labels: barChartDescription.countries,
|
||||
datasets: [
|
||||
{
|
||||
label: `known (${this.#dateRange2str(barChartDescription['date range known'])})`,
|
||||
data: barChartDescription["frequencies before deletion"]
|
||||
label: `Known (${this.#dateRange2str(barChartDescription['date range known'])})`,
|
||||
data: barChartDescription["Adverse Reaction Reports known"]
|
||||
},
|
||||
{
|
||||
label: `guessed (${this.#dateRange2str(barChartDescription['date range guessed'])})`,
|
||||
data: barChartDescription["frequencies guessed"]
|
||||
label: `Guessed (${this.#dateRange2str(barChartDescription['date range guessed'])})`,
|
||||
data: barChartDescription["Adverse Reaction Reports guessed"]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,8 +8,8 @@ class CountryCountsByBatchcodeTable2BarChartDescriptionTableConverter:
|
||||
columns =
|
||||
{
|
||||
'COUNTRY': 'countries',
|
||||
'COUNTRY_COUNT_BY_VAX_LOT Clicked': 'frequencies guessed',
|
||||
'COUNTRY_COUNT_BY_VAX_LOT Before Deletion': 'frequencies before deletion'
|
||||
'COUNTRY_COUNT_BY_VAX_LOT Clicked': 'Adverse Reaction Reports guessed',
|
||||
'COUNTRY_COUNT_BY_VAX_LOT Before Deletion': 'Adverse Reaction Reports known'
|
||||
})
|
||||
.groupby('VAX_LOT')
|
||||
.apply(lambda countryCountsTable: countryCountsTable.to_dict('list'))
|
||||
|
||||
@@ -30,16 +30,16 @@ class CountryCountsByBatchcodeTable2BarChartDescriptionTableConverterTest(unitte
|
||||
data = [
|
||||
[
|
||||
{
|
||||
'countries': ['Germany', 'Hungary'],
|
||||
'frequencies guessed': [10, 15],
|
||||
'frequencies before deletion': [20, 30]
|
||||
'countries': ['Germany', 'Hungary'],
|
||||
'Adverse Reaction Reports guessed': [10, 15],
|
||||
'Adverse Reaction Reports known': [20, 30]
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
'countries': ['Germany'],
|
||||
'frequencies guessed': [70],
|
||||
'frequencies before deletion': [80]
|
||||
'countries': ['Germany'],
|
||||
'Adverse Reaction Reports guessed': [70],
|
||||
'Adverse Reaction Reports known': [80]
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user