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

Restructuring of repo #36

Merged
merged 10 commits into from
Feb 9, 2017
Merged

Conversation

jenniferthompson
Copy link
Contributor

I think I have it cleaned up - anything y'all see that I missed or should be different? I made folder names generally consistent. I have empty folders created on my drive for some things that aren't showing up here (R/d4ddrugspending, eg) because there aren't any files in them yet.

@jenniferthompson
Copy link
Contributor Author

Not sure if it would be better to go ahead and merge @cduvallet's PR first, then incorporate that here, or the other way around?

@dhuppenkothen
Copy link
Contributor

For the empty folders, you could make a bare-bones README.md in each that will work as a sort of directory for the repo structure? Committing that, the folders will appear.

Copy link
Contributor

@dhuppenkothen dhuppenkothen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hard to see what the re-organization really looks like. Based on what I can see, I think all the centerwatch stuff should be in d4ddrugwrangling (which would become the Python package), not datawrangling, since it defines importable classes, has an __init__.py file, etc (all things I'd expect for a Python package).

Unless @mattgawarecki disagrees?

.gitignore Outdated
@@ -1,99 +0,0 @@
# Project ignores
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you delete the .gitignore by accident or is there a reason behind it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely wanna keep the .gitignore in one form or another.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It had been added by one person as part of a PR; it wasn't a broad group one. Could add it back and add more file types if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typing at the same time @mattgawarecki! I'll add it back and see if there are any file types to be added.

@dhuppenkothen
Copy link
Contributor

dhuppenkothen commented Feb 8, 2017

Let's get the directory structure sorted first. Once that's done, I may be able to write a couple of simple Python scripts that allow one to import code, which would I think help @cduvallet with not duplicating code that's already there.

@jenniferthompson
Copy link
Contributor Author

Ah, yep, good call on READMEs; we'll definitely want those anyway. I'll try to do that today sometime. I defer to you two on Python organization!

@mattgawarecki
Copy link
Contributor

mattgawarecki commented Feb 8, 2017

Review comments:

  1. I think we can safely get rid of cms/, since that data's up in data.world. (Probably just a result of accidentally removing .gitignore.)
  2. I've seen in other projects where all-caps filenames are used for basically all documentation (licensing, readmes, etc.). Maybe this applies to datadictionaries/data_dictionary_template.md? Thinking maybe just datadictionaries/TEMPLATE.md.
  3. Probably safe to remove the suffix on datadictionaries/manufacturers_datadict.md (i.e., just datadictionaries/manufacturers.md)
  4. Re: python/datawrangling/centerwatch -- I'm fine with it going in python/d4ddrugspending since it's sort of a sub-module. Just for clarification, it's a Scrapy spider that gathers data from a site called "Centerwatch."
  5. If we do the above, we can safely get rid of python/datawrangling.
  6. If you don't foresee us writing READMEs for directories that still need to exist, you can simply create an empty file (conventionally, .gitkeep) and Git will track that file, which guarantees the directory will exist when people clone the repo.
  7. The rest of the structure looks good to me, I think.

@cduvallet
Copy link
Contributor

I think it makes more sense to merge this PR first. I can then move around my files to be in the right place, import code from @dhuppenkothen's scripts, etc. This way I can also be the first guinea pig for the new structure ;)

@jenniferthompson
Copy link
Contributor Author

jenniferthompson commented Feb 8, 2017

@mattgawarecki @dhuppenkothen Made the changes - let me know if I missed anything! I left python/datawrangling for now but feel free to remove it if it's never going to be useful.

ETA - going to work on edits to the main README to reflect these changes later this afternoon/evening, so it's not 100% ready to go yet, but that's the only change I have planned unless you two see anything else.

@jenniferthompson
Copy link
Contributor Author

README is edited! Ready to merge when y'all are.

@mattgawarecki mattgawarecki merged commit 5712435 into Data4Democracy:master Feb 9, 2017
mattgawarecki pushed a commit that referenced this pull request Feb 15, 2017
* Data Wrangling for Drug Use Visualizations (#24)

* Pulling drug use classes out of the CMS PUF files for categorizing the Plan D data

* Fixed directory creating, refactored df, shortened loop

* Script for data reading/wrangling (#25)

* Fix gitignore to ignore XLSX/ZIP and move CMS data to its own dir

* Add drug names back into annual spending data, for ease of use

* Forgot to add notebook in last commit

* Fix exploration notebook after earlier changes

* Add .DS_Store files to .gitignore

* Remove Medicare drug spending dataset (migrated to data.world)

* Remove data in favor of using data.world

- (External) Move all data files to data.world repository (https://data.world/data4democracy/drug-spending)
- Remove data/ directory
- Correct notebook code to work with data.world as a source

* Wrote a helper function that gets data from a URL, wrote function that downloads Part D data based on notebook

* Added docstring to function

* Added more functions that load data wrangle it

* Added argument parser and squashed some bugs

* Removed dependence on openpyxl, since Pandas does the trick

* Notebook runs

* Minor change to command line arg and addition to help string

* Move comments into Markdown cells and add CSV output

* Added functionality to decide between input/output data formats; supports cvs and feather at the moment

* Small bug fix to remove hard-coded directory paths (#28)

* Markdown version of goals statement - first draft.

* add USP drug classification tidying and data dictionary

* Added anchor for citations and superscripted refs

* Cleaning drug manufacturer data

source:
https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Part-B-Drugs/McrPartBDrugAvgSalesPrice/2016ASPFiles.html

* move USP Drug Classification to

* clarify usp drug classification data dict info

* small changes

* update links

* small changes

* download from data.world, clean up functions, add comments

* added direct link to the datasets of interest

* Restructuring of repo (#36)

* Reorganization FTW

* Reorganization FTW, part 2

* Add .gitignore

* Add READMEs to each subdirectory. Rename data dictionary template (now TEMPLATE) and remove suffix from manufacturer_datadict.md.

* Add link to data.world Python client

* Update main README to reflect new file structure

* Fix link to datadictionaries

* Really fix it this time

* Fix the other datadictionaries links to overview and template

* More streamlining and edits to README

* Add @skirmer to maintainers!

* Correct directory name for datadictionaries

* Add link to objectives doc

* Update datadictionaries/README.md to reflect updated repo structure

* update files to reflect repo structure changes
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

Successfully merging this pull request may close these issues.

None yet

4 participants