-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add data export functionality to project list #44
Comments
@damonmcc I believe last time we talked about data export, we were still considering using pre-filtered datasets of projects exported by DE. Are those already being published somewhere we can link to? |
@TylerMatteo do you think links to files in a DO bucket would work? in my experience, they'd work I'll double-check that the csv files aren't zipped and that they open easily in excel (there was an issue with long |
@TylerMatteo a few notes:
screenshot of current folder structure |
@damonmcc Yeah we'll need the links for each file. Links to DO spaces should work, as long they're publicly available. Looking at our DB, it looks like we do 0 pad community district IDs but do not pad council districts (maybe @TangoYankee can correct me on that if I'm wrong). What about data dictionaries? Is the schema of these files the same as one of the files in main CPDB product? This will probably be sprint P for us, at the earliest, so no huge rush. Just trying to groom for when we can pull it in. |
Yes, this is derived from the source data. The source community district file id column is "BoroCD". It is always three characters, with the first character as the borough id and the other two characters as the community district id. In cases where the community district id would be "1", it gets zero padded to "01". ie) Manhattan 1 is stored as "101". In contrast, City Council District id is stored in "countdist". These ids are written as if they are numbers. So, city council district "1" is written without the padding "0". I prefer the style with the padding zero because it gives the id a fixed length- making it easier to enforce specific structures. However, for this first iteration, I defaulted to taking the data "as-is". So as a rule, data formats in our api will mirror the data formats in the source data (with just enough exceptions to bite you if you rely on the assumption without double checking) |
there are now csv files in City Council District filenames have zero-padding, Community District filenames do not have zero-padding |
DE had some ideas for longer-term approaches:
but no problem using the current "publish" folders for now |
Oh, access control is always fun. For the signed links, we would probably want the Capital Planning Explorer to also have rate-limiting/access controls. That raises its own questions around how much friction we can add before we're creating an undue burden for the public to access the data. Are we going to have folks create accounts or get API keys through capital planning explorer? Do we track IP addresses (still possible to subvert using a DDOS)? Do we use browser cookies? Do forgo individual accounts and have everyone share one rate limit by putting the rate limit at the Application level? ie) Capital Planning explorer can only make so many requests- regardless of who makes each one. This approach would mean one super-user could box-out everyone else. I don't have any answers now. But the first step is to ask questions |
maybe the file server that hosts files for our Bytes pages would be a better thing to link to than a Digital Ocean S3 bucket then? I think all those links are something like I don't know what rate limiting the Microsoft Services has in place for those links but (as far as I know) they've been working well for public access |
Ohhhh, oh no. I just REALLY read this. AE does it the other way- City Council does not have leading zeros. Community district does. |
lol my bad. on it! |
@TangoYankee fixed! |
@damonmcc the district Ids are looking good. Could I make a couple requests for the folder structure?
cc: @TylerMatteo |
I have two changes that I would like to make for the CP-Map interface. These changes apply to the "All Districts" option.
|
@TangoYankee done! |
Add Export data button to each district project list Add modal that links to download for selected or all district data closes #44
Add Export data button to each district project list Add modal that links to download for selected or all district data closes #44
Add Export data button to each district project list Add modal that links to download for selected or all district data closes #44
Acceptance Criteria:
Blocked by
The text was updated successfully, but these errors were encountered: