├── .DS_Store ├── LICENSE ├── .gitignore └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ShorensteinCenter/Shorenstein-Center-Notebooks/HEAD/.DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Shorenstein Center on Media, Politics and Public Policy at Harvard Kennedy School 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shorenstein-Center-Notebooks 2 | Two jupyter notebooks written in python. Example code for using data science tools to analyze your audience. 3 | 4 | This repository contains the Shorenstein Center Notebooks, two [jupyter notebooks]( http://jupyter.org/) published by [the Shorenstein Center]( https://shorensteincenter.org/). The notebooks were written and tested in Python 2.7, but will be updated to Python 3.6 in the coming months. To interpret your results, please visit the accompanying [research guide](https://shorensteincenter.org/email-analysis-research-guide). Contributions to the notebooks are welcome. 5 | 6 | NOTE: Although we try to provide as much guidance as possible for you to run the notebooks yourself without assistance, running the notebooks are technical in nature. We acknowledge there is a learning curve to getting set up and running the notebooks. For further assistance please contact data scientist and author of the Shorenstein Center Notebooks Jacque Boltik at Jacque@kingrailconsulting.com, or a member of the Shorenstein Center staff at Emily_Roseman@hks.harvard.edu. 7 | 8 | ## Prerequisites 9 | 1.[Download Anaconda]( https://www.anaconda.com/download/#macos). If you are a novice or new to coding there is a brief beginners tutorial [here](https://gallery.mailchimp.com/541429b0748bc916daa431f9d/files/a957cfd4-bee4-43b5-a631-7231380db477/python_simple.pdf). 10 | 11 | 2.Install a python wrapper for your email service provider API if available. In the Shorenstein Notebooks we use the [mailchimp3]( https://github.com/charlesthk/python-mailchimp) wrapper. Search the Python Package Index ([PyPI](https://pypi.python.org/pypi)) and GitHub to find relevant packages and check when they were last updated. 12 | 13 | NOTE: If you get the error message "ImportError: No module named matplotlib" when running the notebook for the first time, try installing matplotlib from within the Anaconda environment as outlined [here](https://anaconda.org/conda-forge/matplotlib). 14 | 15 | 16 | ## Running the notebooks 17 | If you are not familiar with jupyter notebooks, read this [quick start guide]( https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/). 18 | 19 | ## License 20 | This project is licensed under the MIT License. 21 | --------------------------------------------------------------------------------