Skip to content

Make use of Google APIs to answer questions about pollutants and generate maps

License

Notifications You must be signed in to change notification settings

rmartinshort/air_quality_mapper

Repository files navigation

air_pollution_mapper

Documentation Status

Make use of Google APIs to answer questions about pollutants and generate maps

Basic usage

Use the google APIs to fetch current or historical pollutant information for a given location

from air_pollution_mapper.api_caller.utils import load_secrets
self.secrets = load_secrets()
self.client = Client(key=self.secrets["GOOGLE_MAPS_API_KEY"])

# current conditions
from air_pollution_mapper.api_caller.current_conditions import current_conditions

location = {"longitude": -122.3, "latitude": 37.8}
current_condition_resp = current_conditions(self.client, location)

# historical conditions
from air_pollution_mapper.api_caller.historical_conditions import historical_conditions

lag_hours = 24
historical_condition_resp = historical_conditions(
        self.client, location, lag_time=lag_hours
)

# pollution heatmap tile
from air_pollution_mapper.api_caller.air_quality_heatmap_tile import air_quality_tile

tile = air_quality_tile(location,zoom=4)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Make use of Google APIs to answer questions about pollutants and generate maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published