def group_nyc_counties(us_map):
    """Group NYC counties as New York City

    Arguments:
        us_map {GeoDataFrame} -- county metadata

    Returns:
        {GeoDataFrame} -- county metadata
    """
    # new york city counties
    nyc_counties = {'Queens': '36081',
                    'Bronx': '36005',
                    'Richmond': '36085',
                    'New York': '36061',
                    'Kings': '36047'}

    nyc = us_map.loc[us_map['county_id'].isin(nyc_counties.values()), :]
    nyc = nyc.copy(deep=True)

    nyc['county_id'] = '36061'
    nyc = nyc.dissolve(by='county_id', aggfunc='sum').reset_index()
    nyc['name'] = 'New York City'
    nyc['state_id'] = '36'

    counties = us_map.loc[~us_map['county_id'].isin(nyc_counties.values()), :]
    counties = counties.copy(deep=True)
    counties = counties.append(nyc, ignore_index=True)

    return counties