census

async zipcode_coordinates_tz.census.get_address_coordinates(street: str, city: str, state: str, zip_code: str, benchmark: models.Benchmark | str = Benchmark.Public_AR_CURRENT) models.Coordinate | None

Queries the coordinate for the specified address.

Parameters:
  • street (str) – The street address.

  • city (str) – The city

  • zip_code (str) – The zip code.

  • benchmark (models.Benchmark | str) – The benchmark value (see get_benchmarks for possible values).

Returns:

models.Coordinate or None if not found.

async zipcode_coordinates_tz.census.get_benchmarks() DataFrame

Queries for the benchmarks.

Returns:

A DataFrame with the shape of

# Column Non-Null Count Dtype — —— ————– —– 0 Name 0 non-null object 1 Description 0 non-null object 2 Default 0 non-null bool

async zipcode_coordinates_tz.census.get_coordinates(df_zip_locals: pd.DataFrame, benchmark: models.Benchmark | str = Benchmark.Public_AR_CURRENT, vintage: str = 'Current_Current', batch_size: int = 9500) pd.DataFrame

Queries for the latitude and longitude coordinates for the addresses contained in the dataframe.

Parameters:
  • df_zip_locals (pd.DataFrame) – A DataFrame in the shape of Data columns (total 4 columns): # Column Non-Null Count Dtype — —— ————– —– 0 Street 0 non-null object 1 City 0 non-null object 2 State 0 non-null object 3 ZipCode 0 non-null object

  • benchmark (models.Benchmark | str) – The benchmark value (see get_benchmarks for possible values).

  • vintage (str) – The vintage value (see get_vintages for possible values).

  • batch_size (int) – The maximum number of rows to send in a single request (defaults to DEFAULT_BATCH_SIZE).

Returns:

A DataFrame with the shape of

# Column Non-Null Count Dtype — —— ————– —– 0 Street 0 non-null object 1 City 0 non-null object 2 State 0 non-null object 3 ZipCode 0 non-null object 4 Latitude 0 non-null float64 5 Longitude 0 non-null float64

async zipcode_coordinates_tz.census.get_vintages(benchmark: models.Benchmark | str = Benchmark.Public_AR_CURRENT) pd.DataFrame

Queries for the vintages for the specified benchmark.

Parameters:

benchmark (models.Benchmark | str) – The benchmark value (see get_benchmarks for possible values).

Returns:

A DataFrame with the shape of

# Column Non-Null Count Dtype — —— ————– —– 0 Name 0 non-null object 1 Description 0 non-null object 2 Default 0 non-null bool