Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Migrate ropenaq to API V2 #61

Closed
maelle opened this issue Feb 9, 2021 · 10 comments
Closed

Migrate ropenaq to API V2 #61

maelle opened this issue Feb 9, 2021 · 10 comments

Comments

@maelle
Copy link
Contributor

maelle commented Feb 9, 2021

Related issues cc @sruti
openaq/openaq-api#470
openaq/openaq-api#468

I couldn't commit to doing this so it'd be a good time for a new maintainer to come forward (I could help this person a bit if needed).

@maelle
Copy link
Contributor Author

maelle commented Feb 9, 2021

@maelle
Copy link
Contributor Author

maelle commented Feb 9, 2021

It might also be the time for a more complete re-write (i.e. not only replacing URLs and applying some tweaks) if someone is up for this.

@maelle maelle changed the title Migrate ropenaq to API V2? Migrate ropenaq to API V2 Feb 9, 2021
@adithirgis
Copy link
Collaborator

Hi! Thanks! I am interested in taking it up. Let me know how to move forward.

@maelle
Copy link
Contributor Author

maelle commented Feb 11, 2021

Removing the "help wanted" label for now as @adithirgis and I are discussing this in another medium. Thanks for volunteering Adithi!

@maelle maelle pinned this issue Feb 12, 2021
@maelle
Copy link
Contributor Author

maelle commented Feb 12, 2021

Some notes on my efforts to push a small update to CRAN (to fix the current version of the package, and re-record the cassettes following crul update cc @sckott). See #62

  • The API status URL is now https://api.openaq.org/ping and when all is good it returns "Healthy Connection", not "green".
  • In the current code before making many requests I query the API once to know the total number of results. For doing that I used to do a query with "limit=0", but now if one does that one gets 0 result so one needs to do "limit=1".
  • I thought I'd continue making some tweaks until all tests pass again but no, the API now returns 403 i.e. I have been blocked!
  • Then I got de-blocked and made some more progress, and got another error with different output from the API... I think it shows one should not use the version 1 of the API and I'd much rather save time for helping with the migration to V2 when someone does that.

So tl;dr it is impossible for me to keep the package working with the version 1 of the API. Therefore, I will request archival on CRAN. Then I can help @adithirgis get this package ready with the version 2 of the API.

If anyone needs OpenAQ data via R before then, they'll have to query the version 2 of the API themselves with httr or crul or curl https://docs.openaq.org/#/

@adeel1997
Copy link

Hello @adithirgis and @maelle; ropenaq package has been a great resource. I would be happy to contribute.

@adithirgis
Copy link
Collaborator

Hi @adeel1997,

Thanks so much for your interest! Right now we are are not looking for contributors, I hope its ok if we reach out to you at a later stage.

Thanks again!

@adeel1997
Copy link

Sure @adithirgis

@adithirgis
Copy link
Collaborator

adithirgis commented Aug 30, 2021

Hi @adeel1997,

Thanks so much for your interest, I am contacting you again for some help with the package. We are looking for contributors for ropenaq, let us know if you are interested.

Also if yes, here is my mail ID - [email protected]. We can discuss the project details over email.

Thanks again!
Adithi

@maelle
Copy link
Contributor Author

maelle commented Oct 1, 2021

Hello here, httr2 was released https://httr2.r-lib.org/ -- maybe the new code could use it?

@maelle maelle closed this as completed Jan 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants