Skip to main content
The Texas Higher Education Data Project
---------------------------------------
[![Build Status](https://travis-ci.org/texastribune/the-dp.svg)](https://travis-ci.org/texastribune/the-dp)

## A very rough guide to starting development

### Example `.env` file for environment variables:

```
DJANGO_SETTINGS_MODULE=exampleproject.settings.dev
DATABASE_URL=postgis:///tx_highered
```

Complete guide to getting started (remove steps to suit you):

```bash
# install postgresql libpq-dev

git clone $REPOSITORY && cd $PATH
mkvirtualenv tx_higher_ed
setvirtualenvproject
add2virtualenv .
pip install -r requirements.txt

# if you need to create a database:
# `postdoc` greatly simplifies connecting to Docker databases
pip install postdoc
phd createdb --encoding=UTF8 -T template0
echo "CREATE EXTENSION postgis;" | phd psql
echo "CREATE EXTENSION postgis_topology;" | phd psql

# or if you need to reset your database:
make resetdb

# syncdb and load fixtures
make syncdb

#######################################################################
# You can stop at this point if you're just playing with the project. #
#######################################################################

# if using 2012 data, bump it up to 2014 standards
python tx_highered/scripts/2014_update.py

# get ipeds data, requires https://github.com/texastribune/ipeds_reporter
../ipeds_reporter/csv_downloader/csv_downloader.py \
--uid data/ipeds/ipeds_institutions.uid --mvl data/ipeds
mv ~/Downloads/Data_*.csv data/ipeds
# get thecb data
cd data && make all
# load data
# timing: 10m25.069s
make load
# post-process the data
python exampleproject/manage.py tx_highered_process


####################################
# placeholder for post-2014 update #
####################################
# the 2012->2014 specific stuff can go out and the above importing
# instructions can get updated
```

### Database

This project currently requires a PostGIS database (hopefully not for long):

```bash
$ phd createdb
$ phd psql

CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
```

#### Moving data between databases

You can do a sql dump to move data from one postgres database to another
(excluding geo info):

```bash
$ phd SOURCE_DATABASE_URL pg_dump --no-owner --no-acl --table=tx_highered* --clean > tx_highered.sql
$ phd DEST_DATABASE_URL psql -f tx_highered.sql
```

#### After deploy

1. Freeze the current data in a fixture
1. Edit the tx_highered_YYYY.json.gz make task
2. Run the task to save the data
2. Adjust the loading scripts to reference the new fixture
3. Deprecate (or delete) any one-time data migration scripts, e.g.
2014_update.py won't be necessary after 2015


Getting Data from the IPEDS Data Center
-----------------
When it asks you for an Institution, enter a list of UnitIDs generated by:

list(Institution.objects.filter(ipeds_id__isnull=False).values_list('ipeds_id', flat=True))

Getting Data from the Texas Higher Education Coordinating Board
------------------
If you want to regrab data from THECB's web site, first find the data file that you want to re-grab.
It will be named something like "top_10_percent.html". There will also be a file called "top_10_percent.POST". From that file you can recreate the report with the command:

curl -X POST -d @top_10_percent.POST http://www.txhighereddata.org/interactive/accountability/InteractiveGenerate.cfm -s -v > blahblahblah.html

If you need to modify the report, you can reverse engineer it from the POST data and the form markup.




(c) 2012 The Texas Tribune

Metadata

Release files for tx_highered 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tx_highered 0.3.5
File Size Uploaded Provenance
tx_highered-0.3.5.tar.gz 783.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tx_highered 0.3.5
File Interpreter ABI Platform
tx_highered-0.3.5-py2-none-any.whl Python 2 none any Details

Total release size: 1.6 MB

Release files / tx_highered-0.3.5.tar.gz

Download URL tx_highered-0.3.5.tar.gz
Size 783.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e237278c1606d088d675177a1d9e32212a0e038370dbed7a164ee28b1175a7ae
BLAKE2b-256 checksum
How to use checksums
16ab7cf2006915f7ecad73a2172ec7e9760f6d4d92107e09bfbeadd0a3174283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tx_highered-0.3.5-py2-none-any.whl

Download URL tx_highered-0.3.5-py2-none-any.whl
Size 848.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
ebbb453e0ecf2689b2774cc41a51ad296a73944ddd0012454506625f8f7a7e6b
BLAKE2b-256 checksum
How to use checksums
78fb48d6da2cd03842742601eaa3e456a8c55b95c8929716c82d8b9d10b8acdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tx_highered 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page