CSTARS / farm-budgets-data

Data to populate the Postgres for the farm-budgets-app
2 stars 0 forks source link

Commodity_price data #30

Closed blyeo closed 9 years ago

blyeo commented 9 years ago

@qjhart @ncparker I wanted to calculated average commodity prices from year 2007-2012 like we did for commodity yield. I opened the file "commodity_price" but it does not have prices for the commodities we need. @qjhart would you be able to generate another "commodity price" file that consists of the crops we need?

Here is a list of commodities in the "commodity price" file: artichokes asparagus asparagus, fresh market asparagus, processing beans beans, snap beans, snap, fresh market beans, snap, processing broccoli broccoli, fresh market broccoli, processing cabbage cabbage, fresh market carrots carrots, fresh market carrots, processing cattle cattle, (excl calves) cattle, calves cauliflower cauliflower, fresh market cauliflower, processing celery cucumbers cucumbers, fresh market garlic hogs lettuce lettuce, head lettuce, head, fresh market lettuce, leaf lettuce, leaf, fresh market lettuce, romaine lettuce, romaine, fresh market melons melons, cantaloup melons, cantaloup, fresh market melons, honeydew melons, honeydew, fresh market melons, watermelon melons, watermelon, fresh market mohair mohair, angora onions onions, dry onions, dry, spring onions, dry, summer onions, dry, summer, non-storage onions, dry, summer, storage peas peas, green peas, green, processing peppers peppers, bell peppers, chile pumpkins sheep sheep, (excl lambs) sheep, lambs spinach spinach, fresh market spinach, processing squash strawberries strawberries, fresh market strawberries, processing sweet corn sweet corn, fresh market sweet corn, processing tomatoes tomatoes, fresh market tomatoes, processing turkeys wool (blank)

However, we need prices from year 2007-2012 for the following commodities: alfalfa hay alfalfa haylage barley beans,dry edible beans, dry lima canola corn grain corn silage grass hay grass haylage lentils oats potatoes spring wheat sugarbeets winter wheat

qjhart commented 9 years ago

Fixed with 3e7a731. @blyeo / @ncparker Because almost all of the issues that I'm tracking are now related explicitly to the SWAP runs and not the farm_budget_data online, I will start to limit the data to the commodities that are identified above. In this case, I have updated the nass/commodity_price.csv file and the nass/commodity_avg_price.csv file. This is all survey data, and only available at the state level. I've included all the commodity breakouts from the above list of commodities.

blyeo commented 9 years ago

Hi Quinn, I don't see these files in my github folder. Did you already commit these files? Could you please try reloading on github? Thanks, Boon Ling

On Tue, Jun 2, 2015 at 4:36 PM, Quinn Hart notifications@github.com wrote:

Fixed with 3e7a731 https://github.com/CSTARS/farm-budgets-data/commit/3e7a73178f80e4bbb8d844ec37a36b97072fe02c. @blyeo https://github.com/blyeo / @ncparker https://github.com/ncparker Because almost all of the issues that I'm tracking are now related explicitly to the SWAP runs and not the farm_budget_data online, I will start to limit the data to the commodities that are identified above. In this case, I have updated the nass/commodity_price.csv file and the nass/commodity_avg_price.csv file. This is all survey data, and only available at the state level. I've included all the commodity breakouts from the above list of commodities.

— Reply to this email directly or view it on GitHub https://github.com/CSTARS/farm-budgets-data/issues/30#issuecomment-108131848 .

blyeo commented 9 years ago

https://github.com/CSTARS/farm-budgets-data/tree/master/nass

I see it on the website but not in my github folder on my computer...

On Wed, Jun 3, 2015 at 11:24 AM, Boon-Ling Yeo blyeo@ucdavis.edu wrote:

Hi Quinn, I don't see these files in my github folder. Did you already commit these files? Could you please try reloading on github? Thanks, Boon Ling

On Tue, Jun 2, 2015 at 4:36 PM, Quinn Hart notifications@github.com wrote:

Fixed with 3e7a731 https://github.com/CSTARS/farm-budgets-data/commit/3e7a73178f80e4bbb8d844ec37a36b97072fe02c. @blyeo https://github.com/blyeo / @ncparker https://github.com/ncparker Because almost all of the issues that I'm tracking are now related explicitly to the SWAP runs and not the farm_budget_data online, I will start to limit the data to the commodities that are identified above. In this case, I have updated the nass/commodity_price.csv file and the nass/commodity_avg_price.csv file. This is all survey data, and only available at the state level. I've included all the commodity breakouts from the above list of commodities.

— Reply to this email directly or view it on GitHub https://github.com/CSTARS/farm-budgets-data/issues/30#issuecomment-108131848 .

qjhart commented 9 years ago

Did you sync? (Upper right corner of your tool?)

blyeo commented 9 years ago

I am having some trouble syncing... As I have worked on some excel files on the github folder and github can't sync unless I commit all changes...

You'd mentioned I can't sync non csv files right? So I should remove the regular excel files? It seems to be giving me problems...

On Wed, Jun 3, 2015 at 12:00 PM, Quinn Hart notifications@github.com wrote:

Did you sync? (Upper right corner of your tool?)

— Reply to this email directly or view it on GitHub https://github.com/CSTARS/farm-budgets-data/issues/30#issuecomment-108577259 .

qjhart commented 9 years ago

You can sync XLS files, I said you an't track changes on them, but you can upload new ones.

blyeo commented 9 years ago

Github says I have 38 files I have to commit, but I don't...

On Wed, Jun 3, 2015 at 12:11 PM, Boon-Ling Yeo blyeo@ucdavis.edu wrote:

I am having some trouble syncing... As I have worked on some excel files on the github folder and github can't sync unless I commit all changes...

You'd mentioned I can't sync non csv files right? So I should remove the regular excel files? It seems to be giving me problems...

On Wed, Jun 3, 2015 at 12:00 PM, Quinn Hart notifications@github.com wrote:

Did you sync? (Upper right corner of your tool?)

— Reply to this email directly or view it on GitHub https://github.com/CSTARS/farm-budgets-data/issues/30#issuecomment-108577259 .

qjhart commented 9 years ago

I think by default any files in the directory are included, you should be able to unselect them.

blyeo commented 9 years ago

I used the latest commodity_avg_price.cvs file that @qjhart posted yesterday. Here is a list of crops that's still missing: alfalfa haylage beans, dry lima corn grain corn silage grass haylage

blyeo commented 9 years ago

@ncparker @qjhart I have already inserted the "commodity_average_price" into the "mastersheet_clean" worksheet. The good news is that the price for almost all the "commodity_average_price" that we have is higher than the old prices we had from Mark. This should help with the negative profits problem we have been having. I inserted a separate column "AI" in the "mastersheet_clean" to check the difference between "commodity average price" that Quinn posted with the prices that Mark had previously. It shows that all the values are positive except for sugarbeets.

Furthermore, we have a number of missing crops from the "commodity_avg_price" data that so there prices for the following crops below shows N/A:

alfalfa haylage beans, dry lima corn grain corn silage grass haylage

qjhart commented 9 years ago

@blyeo From the NASS data, the only price for alfalfa is the

qjhart commented 9 years ago

@blyeo Updated for CORN, GRAIN prices.

qjhart commented 9 years ago

@blyeo FYI, Lima beans are in the DRY, EDIBLE category, so I would use that I suppose for those prices. I don't know what to do about haylage and silage

ncparker commented 9 years ago

@blyeo Check the 'Haylage2Hay' and 'SilagePriceWksht' sheets in the Mastersheet.... excel file. There are no reported value for silage and haylage prices but they can be given prices based on corn and hay prices. The corn silage is valued roughly for its grain content. Mark created a nice way to estimate the state average price using yields of silage and grain within a state and the corn grain price. For the haylage crops, based on equivalent dry matter value haylage is worth roughly 1/3 of of the value of hay. So for alfalfa haylage take the alfalfa hay price and divide by 3 to get the alfalfa haylage price.

qjhart commented 9 years ago

Josue says we are mistaken and there is price data available at the county level for both haylage and silage. This is located at: http://www.nass.usda.gov/Statistics_by_State/California/Publications/AgComm/Detail/index.asp

However, this is for California only. So from this data, we could estimate prices by comparing the haylage and silage date from the CA Ag commissioners report, and use the same conversion factors that are included in the California data.