Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Token Issue #5

Open
Saadi4469 opened this issue Nov 30, 2022 · 3 comments
Open

API Token Issue #5

Saadi4469 opened this issue Nov 30, 2022 · 3 comments

Comments

@Saadi4469
Copy link

Saadi4469 commented Nov 30, 2022

Hello I am using the API Token provided on the top right corner of the page shown below, bit I get the error that the token should be a string.

How can I fix this?

get_airnow_area(
box = c(-80.41667, 25.95833, -80.08333, 26.33333),
parameters = c("pm25", "pm10", "no2", "so2"),
start_time = "2022-01-01",
end_time = "2022-11-30",
monitor_type = "both",
data_type = c("aqi", "concentrations", "both"),
verbose = FALSE)

image

@Saadi4469
Copy link
Author

Saadi4469 commented Nov 30, 2022

Also, for if I use 2022-01-01 and 2022-11-30 as start and end date, will the function accept it as a valid date?

@Saadi4469
Copy link
Author

Saadi4469 commented Nov 30, 2022

I was able to set the token via set_airnow_token(token = "value") however now, get_airnow_area returns this error:

Error in resp_abort(): ! HTTP 400 Bad Request.

@helgasoft
Copy link

helgasoft commented Aug 16, 2023

@Saadi4469, the problem is the format of start_time and end_time. This works:

tmp <- get_airnow_area(
	box = c(-80.41667, 25.95833, -80.08333, 26.33333),
	parameters = c("pm25", "pm10", "no2", "so2"),
        start_time = "2023-07-01T07:00", end_time = "2023-07-13T07:00",
	monitor_type = "both",
	data_type = "both",
	verbose = FALSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants