├── ols_sum_old.png ├── LICENSE └── README.md /ols_sum_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colarusso/measured_justice/HEAD/ols_sum_old.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 David Colarusso 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Measured Justice 2 | 3 | This repo is dedicated to the analysis of publicly available court data. All of the work here has been done with freely available software. Mostly, it's a collection of [notebooks](http://www.nature.com/news/interactive-notebooks-sharing-the-code-1.16261). For people interested in replicating or expanding on this work I've put together this quick start guide for setting up [Project Jupyter](http://jupyter.org/) notebooks. 4 | 5 | ## Download, Install, and Run Notebooks 6 | 7 | Download and install Anaconda (a free distro which includes everything you need to use Jupyter). See https://www.continuum.io/downloads 8 | + Open up a terminal/command prompt and navigate to the directory where you want to be working (e.g., /users/yourname/documents/) 9 | + At the prompt enter: 10 | + ``jupyter notebook`` 11 | + That should open up a new tab in your web browser. 12 | + You should see a dropdown menu in the upper right labeled “New.” Click on that, and choose “Python 3” under “Notebooks.” 13 | + That should open a new notebook. Basically, you put your code in cells and run them as needed. As the [Nature article](http://www.nature.com/news/interactive-notebooks-sharing-the-code-1.16261) linked above makes clear, this is a great way to collaborate and to keep all your work in one place. 14 | + Here’s are some [example notebooks](https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks#introductory-tutorials) to get you started. Just cut-and-paste from these examples and start playing. 15 | 16 | ## Common Speed Bumps 17 | 18 | If you start to play around and get an error like: 19 | 20 | ``NameError: name 'pd' is not defined`` 21 | 22 | That means that your notebook hasn’t loaded a module with the name ‘pd’. So either, you’re missing something like this: 23 | 24 | ``import numpy as np`` 25 | 26 | or the module isn’t installed on your system. If it’s the latter, you’ll get an error like: 27 | 28 | ``ImportError: No module named 'numpy'`` 29 | 30 | when you try to import the module. To install a module, all you have to do is go to the terminal/command prompt and type: 31 | 32 | ``conda install [module name]`` For example: ``conda install numpy`` 33 | 34 | Have fun. 35 | --------------------------------------------------------------------------------