Skip to main content

Dotlas Python Package

Project description

Dotlas Python Client

The Dotlas REST API enables you to:

    Integrate data & insights with your own web or mobile apps 📲

    Consume information that supplements in-house data analysis and visualization 📊

    Enhance the functionality of your tech stack 🖥

    Leverage alternative data in your data pipeline 🏗

License Python version

WebsiteAPI DocumentationEmailLinkedIn

Setup

Pip

To install Dotlas from PyPi run the following command:

$ pip install dotlas

Local

To setup dotlas from GitHub:

Usage

Basic Calls

import dotlas

dot = dotlas.App(api_key="<YOUR API KEY>")

cities = dot.list_cities()
houston_city_stats = dot.city_stats(city="Houston")

restaurants_near_empire_state_bldg = dot.nearby_competition(
    latitude=40.74861114520377,
    longitude=-73.98560002111566,
    city="New York",
    commercial_type="Restaurant",
)

esb_insights = restaurants_near_empire_state_bldg.response.insights
esb_data = restaurants_near_empire_state_bldg.response.data

Mapping

pip install folium if you don't have it already. MAPBOX_ACCESS_TOKEN can be obtained from mapbox.com

import folium
MAPBOX_MAP: str = "https://api.mapbox.com/styles/v1/mapbox/light-v10/tiles/{z}/{x}/{y}?access_token={MAPBOX_ACCESS_TOKEN}"


empire_state_building_profile = dot.sales_territory(
    latitude=40.74861114520377,
    longitude=-73.98560002111566,
    city="New York",
    time_minutes=10,
    mode_of_mobility="driving"
)

folMap: folium.Map = folium.Map(
    location=[
        empire_state_building_stats.request.latitude, 
        empire_state_building_stats.request.longitude, 
    ],
    tiles=MAPBOX_MAP,
    attr='mapbox',
    zoom_start=12
)

folium.GeoJson(
    empire_state_building_stats.response.geometry.dict()
).add_to(folMap)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotlas-1.0.4.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

dotlas-1.0.4-py3-none-any.whl (11.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page