Track changes made to this page

If you find this page useful and would like to be notified of changes made to this page, start by inputting your email below.

Privacy policy
Close this window

powered by ChangeDetection

FracFocus Chemical Data Technical Information


American FracFocus data is available in the form of a MS-SQL database .bak file located at http://www.fracfocus.org/data-download In order to make use of this data, install Microsoft SQL Server 2012 with SQL Management Studio Express and the Import Export Wizard.

Open SQL Management Studio Express, and connect to the database using windows authentication. In the left hand window, right click on a database, and choose the restore option. Browse for the .bak downloaded from the fracfocus website and this will restore the FracFocusRegistry database to your MS-SQL server.

Open the import/export wizard, and select FracFocusRegistry as the source database. On the next page, change the destination to "Flat File Destination". Click browse and provide an appropriate title for the table you are about to export, such as "RegistryUpload.txt". The remaining parameters are fine as default.

On the following page, select the table you wish to export to the txt file. This will in effect be the same as a CSV that can be used to import data from.

The three tables were recreated in wellsdb_dev based on the properties outlined in the MS-SQL tables. The table names are RegistryUpload, RegistryUploadIngredients, and RegistryUploadPurpose.

In order to make the APIs of RegistryUpload match the APIs in the well table, the following SQL was used:

update RegistryUpload

set APINumber = concat(substring(APINumber,1,2),"-",substring(APINumber,3,3),"-",substring(APINumber,6,5))

where 1


Canadian FracFocus data originates from PDFs scraped and parsed from the FracFocus.ca website, and stored within the canada tables of the frac database.

Adding Data to Pages

There is a script, chemicals.py that is stored in the wikimanager folder. After pages have been committed to the wiki, this script will grab those pages, add a table using the relevant FracFocus data, and save pages in the same manner as other page generation scripts, however it will store data within the staged_sources directory within the wikimanager folder. The script currently takes one of the following options: AB, BC, US, TX which edit pages for Alberta, British Columbia, American wells within the well table, and Texas wells within the texas database.

If one wishes to only generate pages for a specific state, the us_well_sql SQL string can be modified to restrict the selected API numbers for a single state.


python chemicals.py TX

python commit_staged_sources.py staged_sources