def _create_naics_map():
    """ Downloads all NAICS codes across long and short form codes. """
    # Read in list of industry topics.
    naics_codes = pd.read_excel(
        "https://www.census.gov/eos/www/naics/2017NAICS/2-6%20digit_2017_Codes.xlsx"
    )
    naics_codes = naics_codes.iloc[:, [1, 2]]
    naics_codes.columns = ['NAICSCode', 'Title']

    # Replace all ranges with individual rows. E.g. 31-33 -> 31, 32, 33.
    def range_to_array(read_code):
        if isinstance(read_code, str) and "-" in read_code:
            lower, upper = read_code.split("-")
            return list(range(int(lower), int(upper) + 1))
        return read_code

    naics_codes = naics_codes.dropna()
    naics_codes['NAICSCode'] = naics_codes['NAICSCode'].apply(range_to_array)
    naics_codes = naics_codes.explode('NAICSCode')

    # Add unclassified code which is used in some statistical variables.
    naics_codes = naics_codes.append(
        {
            "NAICSCode": 99,
            "Title": "Nonclassifiable"
        }, ignore_index=True)

    # Query for only two digit codes.
    short_codes = naics_codes[naics_codes['NAICSCode'] < 100]
    short_codes = short_codes.set_index("NAICSCode")
    short_codes = short_codes['Title'].to_dict()

    # Read in overview codes.
    overview_codes = pd.read_csv(
        "https://data.bls.gov/cew/doc/titles/industry/high_level_industries.csv"
    )
    overview_codes.columns = ["NAICSCode", "Title"]
    overview_codes = overview_codes.set_index("NAICSCode")
    overview_codes = overview_codes['Title'].to_dict()

    # Combine the two sources of codes.
    NAICS_MAP = {}
    combined_codes = short_codes
    combined_codes.update(overview_codes)

    # Rename industries into Pascal case.
    for code, orig_name in combined_codes.items():
        NAICS_MAP[str(code)] = standard_name_remapper(orig_name)

    # Other edge cases.
    NAICS_MAP['00'] = 'Unclassified'
    return NAICS_MAP