cmu-delphi / epidatpy

Delphi Epidata API Python Client
https://cmu-delphi.github.io/epidatpy/
MIT License
0 stars 1 forks source link

Consider using delphi-epidata python client lib #29

Open melange396 opened 5 months ago

melange396 commented 5 months ago

The pip-installable delphi-epidata python client has matured in the recent past, and it continues to improve and add features. Consider using it as a foundation for this library, and build upon it here instead of duplicating its functionality.

With this approach, the delphi-epidata python client can be responsible for network/transport and syntactic concerns (which includes things like handling retries, caching, authentication, decoding responses, handling hostname or path changes, etc), and epidatpy can focus on statistical/analytical methods and data semantics.

There will be less work because there won't [always] be a need to update two separate client packages when API changes happen, and it will keep the server side changes in the same place as the low-level client side changes for compatibility with them.

dshemetov commented 5 months ago

I like this idea. Like you said, that library (I'm gonna call it delphi-epidata.py here) can stay focused on query param validation and network stuff, while this library (epidatpy) can handle converting the response to a type-correct Pandas DataFrame, data caching, and ergonomic things like signal name autocomplete. From my initial look at delphi-epidata.py, this seems feasible.

Before we commit to a full migration and rewrite of epidatpy, we should try prototyping this idea with a few endpoints. Some things to note in this experiment: