GithubHelp home page GithubHelp logo

vmolchan / public_cs_texas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rlsweeney/public_cs_texas

0.0 1.0 0.0 3.27 MB

Replication files for Covert and Sweeney (2019)

R 55.63% Makefile 2.21% TeX 41.95% Python 0.20%

public_cs_texas's Introduction

Code and Data for Covert and Sweeney (2019)

The data can be downloaded at this Dropbox link.

To recreate the results and analysis datasets from the raw files, create a data.txt file in the root code directory. This file should just have a single file path to direct to where the data folder has been placed on your hard drive, such as C:/Users/JaneDoe/Dropbox/texas/public. Then, navigate to the code folder on your command line and type make.

  • Mac users should already have make.
  • Windows users can install chocolatey, and then type choco install make on the command line
    • Note that make cannot be run on Windows computers if there is a space in the file path. In this circumstance, the user can create a junction.

To run the code, make sure the following packages are installed in R:

  • data shaping packages: tidyverse, lubridate, readxl, pdftools, sf, fst, tictoc, furrr, raster, lwgeom,
  • tables and figures: knitr, grid, gridExtra, gtable, tigris, broom, kableExtra,
  • regressions: lmtest, sandwich, splines, lfe, modelr, Formula, grf

Raw Data:

  • leases/Active: The last lease transaction on active state owned leases in Texas. This was downloaded in January of 2017 from the General Land Office (GLO) GIS database.
  • leases/Inactive: Last lease transaction on inactive state owned leases in Texas. The data is not available online but was sent by the Texas General Land Office (GLO) in January of 2017.
  • LeaseLandFile: Sent by GLO in February of 2017. This file consists of Control Numbers (administrative number used by the GLO) for each lease. The first two digits of the control number indicate the lease type.
  • tablMineralLeaseAllInfo: Sent by GLO in February of 2017. This dataset consists of the information we have from inactive and active lease files, but also those leases that were not mapped by the GIS department (usually because they are old and irrelevant for the purposes of GLO).
  • bids/final_bids: GLO bids are available online as PDFs. The PDFs were manually entered in and saved as excel sheets.
  • payments/rentals.xlsx: Obtained through a public information request in June of 2017
  • payments/royalties_2019.01.02: Royalty data for leases going back to 1/1/2005. Obtained through a public information request on 1/2/2019
  • prices: historical spot prices for production were downloaded in November 2018 from the EIA. Oil prices can be found here, and gas prices can be found here

Shapefiles:

  • Basins and Shale_Plays: Downloaded from EIA https://www.eia.gov/maps/layer_info-m.php. We selected out the major shale plays, Barnett, Haynesville, Spraberry, Delaware, and Eagle Ford
  • Land_Cover: Downloaded in November 2017 from here. The original dataset includes the entire US. The raster file was clipped in ArcGIS to just Texas.
  • infrastructure/txdot-roads_tx: Road data was downloaded in August 2017 from the Transportation Planning and Programming (TPP) Division of the Texas Department of Transportation (TxDOT), who maintain a spatial dataset of roadway polylines for planning and asset inventory purposes, found here https://tnris.org/data-catalog/entry/txdot-roadways/. This includes data associate with On-System highways, County Roads, Functional Classified City Streets, Toll Roads and Local Streets.
  • infrastructure/usgs-rivers_tx: Downloaded in September 2018 from the U.S. Geological Survey. This National Hydrography Dataset is a comprehensive set of digital spatial data that encodes information about naturally occurring and constructed bodies of water, paths through which water flows, and related entities.
  • us_county: Census county shapefiles downloaded in January 2017 from the census website

Intermediate Data

This folder contains datasets that involved manual entry to create. We have only included the final .Rda files.

  • addenda: While GLO state leases are uniform, RAL leases often have additional addenda clauses. These RAL lease contract terms can be found in the public contracts online, and were inputted and categorized manually in August 2018.
  • assignments: obtained on December 5th, 2017 through a public information request. We manually fixed around 200 assignment dates that were inputted incorrectly, where assignment dates are earlier than effective dates
  • coversheets: All RAL/GLO contracts are online page, and all RAL leases should have a review sheet that contains information on the proposed terms of a lease. The terms from the review sheet were manually entered in in July 2017.
  • recommended_rentals: this also was manually entered in from the coversheets, and shows what GLO recommended delay rentals should be for a particular lease.
  • company_names: dictionary of firm names used to standardize lessee names
  • texas_grids: grids are created using the bounding box of our parcels data
  • glo_notices: GLO notices are available from the same source as the bids. We used a combination of R and manual input to read in the PDFs
  • river_streams.Rda: .Rda version of river streams, from the source for infrastructure/usgs-rivers_tx, listed under Shapfiles. The size of the original river streams .shp file was too large to upload for public use.
  • leases: manual corrections to lease variables

Private Data

  • parcels: Public School Land parcel level data was purchased from P2E in December 2017. While we cannot publish the raw data, we have included the following code which cleans and analyzes the data: Data_Cleaning/clean_parcels.R, Anlaysis/parcel_selection.R, and Analysis/parcel_stats.R.
  • DI wells: We also have data from DrillingInfo on location of wells, which we use in the parcels cleaning process. If a user has access to DI data and would like to replicate how we use this dataset, we can email the user our code.

public_cs_texas's People

Contributors

rlsweeney avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.