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
Opendata.dc.gov connection class #274
Comments
Look at the /python/housinginsights/sources/mar.py for an example of inheriting from the base class, though this does not use the csv method |
Relates to #187 as well. |
Please note I wrote the base opendata api conn class in #283. Would love feedback to avoid duplicate work. |
I already wrote this yesterday and did not have a chance to check it in. |
@ajhalani I added mine because the get_data method is supposed to call all of the get_XXX methods in #284 and yours seems to be a generic function for getting a particular file. This ticket was assigned to me yesterday when I worked on it. If you want to work on something you need to assign it to yourself to avoid duplicate work. |
Ofcourse. Not my intention to do someone story assigned to someone else :). SInce story is assigned to you, I defer to your PR. My crime data story needed the base class so thank you! @NealHumphrey - The way the requirements are written for this story, wouldn't opendata logic for pre-defined filepaths be inconsistent with existing get_api_data/mar.py. mar.py which take path of file as a paramter --output.
Will we have other non-opendata get_XXX methods, if so should this "get_data" call the non-opendata get_XXX methods as well. How would this function know which date-ranges etc. it should call? It would be nice if @Creence's PR #284 is merged soon, since then I can extend the same for completing #187. Thanks! |
@ajhalani I'll get this merged in today and resolve any duplicative approaches by pulling from these - the discovery of the .csv endpoint from opendata.dc.gov caused a couple things that started out as separate issues to clash with each other a bit. I'm sorry for confusion with these! @ajhalani with respect to the get_data method - as we've started thinking about how to use all these ApiConn objects systematically (i.e. on a server run every week), I think we need to have a more consistent approach than that provided by get_api_data.py, which was our first pass at how to call these classes. Forcing every ApiConn class to have a get_data method that downloads all of the normally expected .csv methods seemed like a good approach to that, with other methods being supplemental. Then we can have a new script called get_all_api_data that just does |
Think we can close this story! |
Opendata.dc.gov provides multiple data sets that we need. They provide an api endpoint for each data file that we need already in .csv format.
In our
/python/housinginsights/sources
folder there is a base.py file with a BaseApiConn class./data/raw
(e.g./data/raw/tax
ordata/raw/other
To start, get this data download class to work with two data sets:
The text was updated successfully, but these errors were encountered: