src/04_visualization/census_vis_synthesis.py
def clean_labour_force_status(labour, year):
        """
        This function cleans the labour force status census data
        Args:
            labour (pd.DataFrame): The dataframe for labour force data
            year (int): census year

        Returns:
            labour: A cleaned pandas dataframe
        """

        labour = labour[labour['Type'] == 'Total']
        van_total = labour.sum()
        van_total['LocalArea'] = 'City of Vancouver'
        van_total['Type'] = 'Total'
        labour = labour.append(van_total, ignore_index=True)

        labour = labour[['LocalArea',
                         'Employment rate',
                         'Unemployment rate']]

        return labour

        This function cleans the labour force status census data
        Args:
            labour (pd.DataFrame): The dataframe for labour force data
            year (int): census year

        Returns:
            labour: A cleaned pandas dataframe
        
This function cleans the labour force status census data
This function cleans the labour force status census data
def clean_labour_force_status(labour, year):
        labour = labour[labour['Type'] == 'Total']
        van_total = labour.sum()
        van_total['LocalArea'] = 'City of Vancouver'
        van_total['Type'] = 'Total'
        labour = labour.append(van_total, ignore_index=True)
        labour = labour[['LocalArea',
                         'Employment rate',
                         'Unemployment rate']]
        return labour
def clean_labour_force_status ( labour , year ) : labour = labour [ labour [ 'Type' ] == 'Total' ] van_total = labour . sum ( ) van_total [ 'LocalArea' ] = 'City of Vancouver' van_total [ 'Type' ] = 'Total' labour = labour . append ( van_total , ignore_index = True ) labour = labour [ [ 'LocalArea' , 'Employment rate' , 'Unemployment rate' ] ] return labour
This function cleans the labour force status census data
This function cleans the labour force status census data
"""
        This function cleans the labour force status census data
        Args:
            labour (pd.DataFrame): The dataframe for labour force data
            year (int): census year

        Returns:
            labour: A cleaned pandas dataframe
        """
A cleaned pandas dataframe
A cleaned pandas dataframe
labour
labour
The dataframe for labour force data
The dataframe for labour force data
year
None