utils

Provide various helper functions for use across the package.

General utilities

first_unique(iterable)

Return unique items in an input iterable variable given the same order of presence.

check_json_engine([engine])

Check an available module used for loading JSON data.

remove_osm_file(path_to_file[, verbose])

Remove a downloaded OSM data file.

Check data pathnames

cdd_geofabrik(*sub_dir[, mkdir, default_dir])

Change directory to osm_geofabrik\ and its subdirectories within a package.

cdd_bbbike(*sub_dir[, mkdir, default_dir])

Change directory to osm_bbbike\ and its subdirectories.

Data processing utilities

get_layer_name(stem)

Extract the core OSM layer name from a file stem or layer string.

find_matched_layer_names(layer_names, ...[, ...])

Find corresponding OSM layer names by identifying common semantic roots.

merge_dicts_by_values(data_dict, mapping_dict)

Group and concatenate DataFrames from a dictionary based on a mapping.