Skip to main content

PyPI version

Python Bing API Facilitator

Python Bing API Facilitator is a Python library created to simplify the usage of the bing api for distance between two geographic coordination. The project is on current development and future methods may be implemented

Installation

Import the package from Pypi

pip install pybaf

Usage

Import the class pybaf from the package

from pybaf import pybaf

Define the bing_api with your Bing key

pybaf = pybaf(key = 'key')

You need to define two dataframes that contain latitude and longitude and their IDs to calculate a Distance Matrix

df_origin = 'Insert the origin dataframe here'
df_destination = 'Insert the origin dataframe here'

The distance_matrix method returns a pd.DataFrame with all cross IDs (origin and destination) with their relative distance(KM) and time(minutes).

Note that you will need to pass the destination_id and origin_id to identify the returning pd.DataFrame

df_matrix = pybaf.distance_matrix(df_destination='', df_origin='', destination_id='', origin_id='',)

The n_smallest method returns the n_smallest value between id_origin the id_destinations

n_smallest_df = pybaf.n_smallest(df_final, n=1,origin_id='', destination_id='',value='')

# default n=1

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors

developed by joaovitorncn

Metadata

Release files for pybaf 2.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybaf 2.0.5
File Size Uploaded
pybaf-2.0.5.tar.gz 4.2 kB Details

Release files / pybaf-2.0.5.tar.gz

Download URL pybaf-2.0.5.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5548326b92c6fce0334f30e7098dda3de477413d88b1d339095fe020d1bdf085
BLAKE2b-256 checksum
How to use checksums
a8a96137dd3a6c1354ea342f058b6ec32ca16533ed278649829eb81d7f3f6378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.4

Release history Release notifications | RSS feed

This release

2.0.5 This release

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page