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 π
Website β’ API Documentation β’ Email β’ LinkedIn
To install Dotlas from PyPi run the following command:
$ pip install dotlasTo setup dotlas from GitHub:
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
pip install foliumif you don't have it already.MAPBOX_ACCESS_TOKENcan 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)
