Livestock markets with an online presence may post data about cattle sales, which the companion roundup repository writes to local CSV files. This repository archives that data in a MySQL database, which the Bansal Lab uses to study movement of livestock between animal holding premises, such as a ranch, market or feed lot. The repository also includes post-processing steps that attempt to identify the source and destination counties for every recorded movement and aggregates external datasets relevant to cattle movement (e.g. the USDA Agriculural Census).
- address - As much address information as we obtain from one source about a premises
- premises - A unique identifier for a physical premises
- association - An association table linking premises to addresses
- geoname - Locations (including www.geonames.org identifiers) of premises
- movement - Representative lots recorded from a market report
- georef - The latitude and longitude of a verified premises
- roundup_report - The report from which representative lots were read
- ag_census
- ams
- ams_location
- ams_quantity
- ams_receipts
- aphis
- gipsa
- lma
- loadboard
- roundup_market
- roundup_website
- state_code
- county
See db_class.py
for fields within tables and relationships between them.
- Do this before importing the first market report from the source.
- Ensure that roundup_website has an entry with the correct URL.
- Insert an address record for the market, with source = 'roundup_market'.
- Insert a roundup_market record, referencing the new addres_id and roundup_website_id
- Insert an association record to any known premises.
- Insert a new record into georef, after obtaining the market's latitude and longitude.