If you find this page useful and would like to be notified of changes made to this page, start by inputting your email below.
powered by ChangeDetection
(→Well Table) |
m (→Spud Table) |
||
| (19 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
__TOC__ | __TOC__ | ||
== Well Table == | == Well Table == | ||
| − | |||
* deleted indexes FIPS_MUNICIPALITY_2, ..., FIPS_MUNICIPALITY_5 | * deleted indexes FIPS_MUNICIPALITY_2, ..., FIPS_MUNICIPALITY_5 | ||
| Line 57: | Line 56: | ||
* 183822 OH counties filled in using county table | * 183822 OH counties filled in using county table | ||
| − | == | + | * Fixing well state codes and FIPS codes: |
| + | |||
| + | :UPDATE well | ||
| + | :SET WELL_STATE_CODE='PA', | ||
| + | :FIPS_STATE='42' | ||
| + | :WHERE WELL_API LIKE '37%' | ||
| + | :(23715 rows affected.) | ||
| + | |||
| + | :UPDATE well | ||
| + | :SET WELL_STATE_CODE='OH', | ||
| + | :FIPS_STATE='39' | ||
| + | :WHERE WELL_API LIKE '34%' | ||
| + | :(83094 rows affected) | ||
| + | |||
| + | :UPDATE well | ||
| + | :SET WELL_STATE_CODE='NY', | ||
| + | :FIPS_STATE='36' | ||
| + | :WHERE WELL_API LIKE '31%' | ||
| + | :(765 rows affected.) | ||
| + | |||
| + | :UPDATE well | ||
| + | :SET WELL_STATE_CODE='WV', | ||
| + | :FIPS_STATE='54' | ||
| + | :WHERE WELL_API LIKE '47%' | ||
| + | :(5567 rows affected.) | ||
| + | |||
| + | :UPDATE well | ||
| + | :SET WELL_STATE_CODE='CO', | ||
| + | :FIPS_STATE='08' | ||
| + | :WHERE WELL_API LIKE '05%' | ||
| + | :(22984 rows affected.) | ||
| + | |||
| + | * index added on FIPS_STATE to speed up ~/installers/wikimanager/scrape_fips.py | ||
| − | * | + | * 5,225 municipality names, 6,549 FIPS municipality codes, and 1530 state-county FIPS codes have been filled in for CO wells using scrape_fips.py |
| − | + | * changed OPERATOR_NAME to VARCHAR(60) to accommodate some longer WV entries and fixed these values with sql updates. The correct values (previously truncated at 50 characters), were "U.S. Department of Energy/Morgantown Energy Tech Centre", "Oper in Min.owner fld,no code assgn(Orphan well proj)", "Food, Machinery & Chemical Corp, Ohio - APEX Division", "Appalachian Land & Development Co. (David J. Harmer)", and "Brannon, E. H., Bartlett, Howard, and Ryan, William". (5624 rows affected) | |
| − | + | ==Unconventional Table== | |
| + | * changed 236 rows from 'Yes' to 'Y' and 439 rows from 'No' to 'N'. There was some type of return character on the ends of 'Yes' and 'No' making searches hard. Code example: | ||
| − | + | :UPDATE well | |
| + | :SET UNCONVENTIONAL='Y' | ||
| + | :WHERE UNCONVENTIONAL LIKE 'Yes%' | ||
* changed all dates '0000-00-00' to NULL | * changed all dates '0000-00-00' to NULL | ||
| Line 76: | Line 110: | ||
== Wellpad Table == | == Wellpad Table == | ||
| − | |||
* deleted row of almost all blanks | * deleted row of almost all blanks | ||
| Line 84: | Line 117: | ||
== Production Table == | == Production Table == | ||
| − | |||
* changed all dates '0000-00-00' to NULL | * changed all dates '0000-00-00' to NULL | ||
| Line 98: | Line 130: | ||
== Permit Table == | == Permit Table == | ||
| − | |||
* there were two equivalent columns : PERMIT_ISSUED_DATE and permit_issue_date. Since a search revealed that the latter was unused, it has been dropped from the table. | * there were two equivalent columns : PERMIT_ISSUED_DATE and permit_issue_date. Since a search revealed that the latter was unused, it has been dropped from the table. | ||
| Line 130: | Line 161: | ||
* Changed well_api to varchar(12) to help prevent APIs whose length is more than 10 digits. | * Changed well_api to varchar(12) to help prevent APIs whose length is more than 10 digits. | ||
| + | |||
| + | * changed OPERATOR_NAME to VARCHAR(60) to accommodate some longer WV entries and fixed these values with sql updates. The correct values (previously truncated at 50 characters), were "U.S. Department of Energy/Morgantown Energy Tech Centre", "Oper in Min.owner fld,no code assgn(Orphan well proj)", "Food, Machinery & Chemical Corp, Ohio - APEX Division", "Appalachian Land & Development Co. (David J. Harmer)", and "Brannon, E. H., Bartlett, Howard, and Ryan, William". (5836 rows affected) | ||
== Compliance Table == | == Compliance Table == | ||
| − | |||
* in INSP_CATEGORY, changed blank entries to NULL and filled out 319,409 existing erroneous entries 'Primary Fa' to 'Primary Facility' | * in INSP_CATEGORY, changed blank entries to NULL and filled out 319,409 existing erroneous entries 'Primary Fa' to 'Primary Facility' | ||
| Line 142: | Line 174: | ||
==Spud Table== | ==Spud Table== | ||
| − | |||
* replaced instances of SPUD_DATE='0000-00-00' with NULL | * replaced instances of SPUD_DATE='0000-00-00' with NULL | ||
* set instances of OPERATOR_OGO="" to NULL | * set instances of OPERATOR_OGO="" to NULL | ||
| + | |||
* set instances of OPERATOR_NAME="", OPERATOR_NAME=' No record available in Charleston' (all WV), and OPERATOR_NAME=' unknown' (all WV) to NULL | * set instances of OPERATOR_NAME="", OPERATOR_NAME=' No record available in Charleston' (all WV), and OPERATOR_NAME=' unknown' (all WV) to NULL | ||
| Line 157: | Line 189: | ||
* changed default value for WELL_COUNTRY from 'United States' to NULL to comply with asana data standards | * changed default value for WELL_COUNTRY from 'United States' to NULL to comply with asana data standards | ||
| + | |||
| + | * changed OPERATOR_NAME to VARCHAR(60) to accommodate some longer WV entries and fixed these values with sql updates. The correct values (previously truncated at 50 characters), were "U.S. Department of Energy/Morgantown Energy Tech Centre", "Oper in Min.owner fld,no code assgn(Orphan well proj)", "Food, Machinery & Chemical Corp, Ohio - APEX Division", "Appalachian Land & Development Co. (David J. Harmer)", and "Brannon, E. H., Bartlett, Howard, and Ryan, William". (5743 rows affected) | ||
==Municipality Table== | ==Municipality Table== | ||
| − | |||
* backed up to ~/database_backups as municipality_with_demographic_info.sql.gz, then deleted demographic info | * backed up to ~/database_backups as municipality_with_demographic_info.sql.gz, then deleted demographic info | ||
* added column PAGE_LONG_NAME varchar(100) to hold the exact name of each municipality's page | * added column PAGE_LONG_NAME varchar(100) to hold the exact name of each municipality's page | ||
| + | |||
| + | * index added on the pair (FIPS_STATE_COUNTY, FIPS_MUNICIPALITY) to speed up ~/installers/wikimanager/scrape_fips.py | ||
==County Table== | ==County Table== | ||
| − | |||
* backed up to ~/database_backups as county_with_demographic_info.sql.gz, then deleted demographic info | * backed up to ~/database_backups as county_with_demographic_info.sql.gz, then deleted demographic info | ||
| Line 172: | Line 206: | ||
* added LONG_NAME column, which holds the county's page name | * added LONG_NAME column, which holds the county's page name | ||
| + | ==ab_well Table== | ||
| + | * 195 cases of well_id having the format *E+11 or *E+12 replaced by proper 13-digit IDs. The following sql was used: | ||
| + | |||
| + | :UPDATE ab_well t1, ab_well_ids t2 | ||
| + | :SET t1.well_id = t2.well_id_13 | ||
| + | :WHERE t1.well_id LIKE '%E+%' | ||
| + | :AND t1.location = t2.location | ||
| + | :''ab_well_ids was a table temporarily created to solve this problem, and held locations and corresponding well_ids. | ||
| + | '' | ||
==ab_violations Table== | ==ab_violations Table== | ||
| + | * changed length of ENFORCEMENT_ACTION_CATEGORY from 30 to 70 to accommodate longer entries | ||
| − | * | + | * duplicate entries (ignoring the auto-incremented ID field) were deleted. The backup ab_violations_2015-07-28.sql.gz of the table prior to this change was first made in ~/database_backups/. |
==ab_facility Table== | ==ab_facility Table== | ||
| + | * LOCATION field added to replace well_id (which contained errors). well_id column dropped. | ||
| − | * | + | ==ab_operator Table== |
| + | * added columns LATITUDE_DECIMAL and LONGITUDE_DECIMAL (both double). These are filled in by the script ab_operator_lat_lon.py in ~/installers/wikimanager/. | ||
==bc_facility Table== | ==bc_facility Table== | ||
| − | |||
* 15920 incorrect instances of COMPRESSOR_POWER=0 changed to NULL | * 15920 incorrect instances of COMPRESSOR_POWER=0 changed to NULL | ||
==bc_loc Table== | ==bc_loc Table== | ||
| + | * index added on WELL_AUTH_NUM to speed up lat/lon updates to bc_well | ||
| − | * index | + | ==wikiManagerPages Table== |
| + | * replaced the 3 identical indexes PAGE_NAME_2, PAGE_NAME_3, and PAGE_NAME_4 by the single index PAGE_NAME | ||
==Dropped Tables== | ==Dropped Tables== | ||
| − | |||
The following tables are properly backup up in a sql.gz file, and thus are redundant and dropped: | The following tables are properly backup up in a sql.gz file, and thus are redundant and dropped: | ||
* production_backup | * production_backup | ||
| Line 208: | Line 254: | ||
* bc_production_values - additional production information for BC. To be used to generate production volume tables on BC well pages. | * bc_production_values - additional production information for BC. To be used to generate production volume tables on BC well pages. | ||
* bc_loc - stores latitude and longitude for BC wells based on well authorization number. Used to update bc_well. | * bc_loc - stores latitude and longitude for BC wells based on well authorization number. Used to update bc_well. | ||
| + | * fips_codes - see [[Populating Municipality and County Pages Technical Information]] | ||
| + | * gaz_place_national - see [[Populating Municipality and County Pages Technical Information]] | ||
| + | |||
| + | ==Frac Modifications== | ||
| + | In ustable1p1, column api was changed to collation type "utf8_unicode_ci" | ||
| + | In canadatable1, columns well_number and well_license_number changed to collation type "utf8_unicode_ci" | ||
| + | This allows these tables to be directly compared to the license number and well API within the wellwiki_dev well, ab_well, and bc_well pages. | ||
hole_number, objective_formation, producing_formation, quad_section_code, map_quadrangle, field, status_date, well_completion_date, plugging_and_abandonment_date, confidential_expiration_date, confidential_period_type, nysdec_region, subject_to_financial_security, bottom_hole_longitude, bottom_hole_latitude, last_modified_date
The following tables are properly backup up in a sql.gz file, and thus are redundant and dropped:
In ustable1p1, column api was changed to collation type "utf8_unicode_ci" In canadatable1, columns well_number and well_license_number changed to collation type "utf8_unicode_ci" This allows these tables to be directly compared to the license number and well API within the wellwiki_dev well, ab_well, and bc_well pages.