Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 38 additions & 55 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,59 +1,42 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
db.sqlite3
migrations/
media/
settings.py
# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
MANIFEST
build
dist
_build
docs/man/*.gz
docs/source/api/generated
docs/source/config.rst
docs/gh-pages
notebook/i18n/*/LC_MESSAGES/*.mo
notebook/i18n/*/LC_MESSAGES/nbjs.json
notebook/static/components
notebook/static/style/*.min.css*
notebook/static/*/js/built/
notebook/static/*/built/
notebook/static/built/
notebook/static/*/js/main.min.js*
notebook/static/lab/*bundle.js
node_modules
*.py[co]
__pycache__
*.egg-info
*~
*.bak
.ipynb_checkpoints
.tox
.DS_Store
\#*#
.#*
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot
src

# Django stuff:
*.log
*.swp
*.map
.idea/
Read the Docs
config.rst

# Sphinx documentation
docs/_build/
/.project
/.pydevproject

# PyBuilder
target/
package-lock.json
data
21 changes: 14 additions & 7 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#!/env/bin bash
# Create the basic virtualenv
virtualenv FEC_data_notebook
#!/bin/bash
install_path=$1
src_path=$(pwd)
app_path=$install_path/FEC_data_notebook

mkdir ./data
mkdir ./data/2016
# Create the basic virtualenv
cd $install_path && virtualenv FEC_data_notebook
cp -r $src_path/src $app_path
cp $src_path/requirements.txt $app_path
cp $src_path/start.sh $app_path
mkdir $app_path/data
mkdir $app_path/data/2016

wget -O ./data/2016/independent_expenditure_2016.csv https://cg-519a459a-0ea3-42c2-b7bc-fa1143481f74.s3-us-gov-west-1.amazonaws.com/bulk-downloads/2016/independent_expenditure_2016.csv
# Download the 2016 sample data to the data path
wget -O $app_path/data/2016/independent_expenditure_2016.csv https://cg-519a459a-0ea3-42c2-b7bc-fa1143481f74.s3-us-gov-west-1.amazonaws.com/bulk-downloads/2016/independent_expenditure_2016.csv

# Activate the virtual env, install dependencies, and start the notebook
source ./FEC_data_notebook/bin/activate && pip install -r ./requirements.txt && cd ./src && jupyter notebook
source $app_path/bin/activate && pip install -r $app_path/requirements.txt && export FEC_data_path=$app_path/data && cd $app_path/src && jupyter notebook
Loading