Screening¶
Graphs¶
-
daily_test(age, department, screening_daily)¶ Displays the barplot of screenings performed per day by age group and department. The more intense the color of the bar (towards yellow), the higher the percentage of number of positive tests (the reference is placed to the right of the graph). The ‘plotly’ package allows you to zoom the desired period.
- Parameters
age (int) – age class in [9, 19, 29, 39, 49, 59, 69, 79, 89, 90]
department (str) – french department like ‘34’ (for Hérault department)
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
bar plot (from plotly)
-
daily_test_age(age_class, screening_daily)¶ Displays the barplot of screenings performed per day by age. The more intense the color of the bar (towards yellow), the higher the percentage of number of positive tests (the reference is placed to the right of the graph). The ‘plotly’ package allows you to zoom the desired period.
- Parameters
age (int) – age class in [9, 19, 29, 39, 49, 59, 69, 79, 89, 90]
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
bar plot (from plotly)
-
daily_test_dep(department, screening_daily)¶ Displays the barplot of screenings performed per day by department. The more intense the color of the bar (towards yellow), the higher the percentage of number of positive tests (the reference is placed to the right of the graph). The ‘plotly’ package allows you to zoom the desired period.
- Parameters
department (str) – french department like ‘34’ (for Hérault department)
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
bar plot (from plotly)
-
screening_by_age(screening_daily)¶ We regroup data by age. We add the columns :
‘Tests cumul’ : indicates the number of cumulative screenings since the first day (first line of data), per day.
‘% positive tests’ : indicates the percentage of positive screenings.
- Parameters
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
screening_daily_age
- Return type
dict
-
screening_by_age_dep(screening_daily)¶ We regroup data by age (we will filter by department after). We add the columns :
‘Tests cumul’ : indicates the number of cumulative screenings since the first day (first line of data), per day.
‘% positive tests’ : indicates the percentage of positive screenings.
- Parameters
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
screening_daily_age_dep
- Return type
dict
-
screening_by_dep(screening_daily)¶ We regroup data by department. We add the columns :
‘Tests cumul’ :indicates the number of cumulative screenings since the first day (first line of data), per day.
‘% positive tests’ : indicates the percentage of positive screenings.
- Parameters
screening_daily (dataframe) – data on the number of screenings carried out by age group and / or department
- Returns
screening_daily_dep
- Return type
dict
Plot map¶
-
clean_dep(dep_fr)¶ We (quickly) clean the dataframe by deleting the empty columns.
- Parameters
dep_fr (dataframe) – coordonates of french departments
- Returns
df
- Return type
dataframe
-
clean_private_centers(depis_acces_restreint)¶ We clean the dataframe ‘depis_acces_restreint’ We add a column who indicates the department code.
- Parameters
depis_acces_restreint (dataframe) – all informtations about screening centers in restricted access in France
- Returns
df
- Return type
dataframe
-
clean_public_centers(depis_grand_public)¶ We clean and complete the dataframe ‘depis_grand_public’ by adding missing informations. We add a column who indicates the department code.
- Parameters
depis_grand_public (dataframe) – all informations about screening centers in public access in France
- Returns
df
- Return type
dataframe
-
map_dep(department, dep_fr)¶ Create a map with one department
We display the french department (or DOM) map selected.
- Parameters
department (str) – french department or DOM code
dep_fr (dataframe) – all french departments and DOM coordinates
- Returns
dep_map
- Return type
Folium Map Object
-
map_screening(dep_code, dep_fr, depis_grand_public, depis_acces_restreint)¶ We display the department selected map with all markers, with all screening centers informations.
- Parameters
dep_code (str) – french department code like ‘34’ for Hérault
dep_fr (dataframe) – all french departments coordinates
depis_grand_public (dataframe) – data on screening centers in public access in France
depis_acces_restreint (dataframe) – data on screening centers in restricted access in France
- Returns
all_map_dep[dep_code]
- Return type
Folium Map Object
-
markers_set(dep_fr, depis_grand_public, depis_acces_restreint)¶ We add all the markers in each department map. The markers indicate the screening centers. The green markers indicate the public centers. The red markers indicate the private centers.
Remark : not all departments have restricted access screening centers, so we clean the dictionary ‘depis_department_acces_restreint’ created by deleting the keys of departments without screening centers.
- Parameters
dep_fr (dataframe) – all french departments coordinates
depis_grand_public (dataframe) – data on screening centers in public access in France
depis_acces_restreint (dataframe) – data on screening centers in restricted access in France
- Returns
all_map_dep
- Return type
dic
-
regroup_map(dep_fr)¶ All french departments maps are regrouped in a dictionary.
- Parameters
dep_fr (dataframe) – all french departments and DOM coordinates
- Returns
all_map_dep
- Return type
dict
-
regroup_private_center_by_dep(depis_acces_restreint, dep_fr)¶ screening centers in restricted access by department regrouped in a dictionnary.
- Parameters
depis_acces_restreint (dataframe) – all informtations about screening centers in restricted access in France
dep_fr (dataframe) – all french departments and DOM coordinates
- Returns
depis_department_acces_restreint
- Return type
dict
-
regroup_public_center_by_dep(depis_grand_public, dep_fr)¶ screening centers in public access by department are regrouped in a dictionnary.
- Parameters
depis_grand_public (dataframe) – all informations about screening centers in public access in France
dep_fr (dataframe) – all french departments and DOM coordinates
- Returns
depis_department_grand_public
- Return type
dict