Description Usage Arguments Details Value See Also Examples
This is needed when calculating weights out. The countries of origin for seizures containing both raw and worked ivory may be different. For example the raw ivory may come from country A and worked ivory from country B. Hence the raw RIE weight needs to be removed for country B's total weight out and the worked RIE weight needs to be removed from country A's total weight out. This function interacts with the ETIS database and the seizures stored in df.1 created by df_quantities_RIE_separate.fn to identify all seizures with a countrt of origin. It then identifies which seizures have different countries of origin for raw and worked ivory
1 2 | double_count(year.from = year.from, year.to = year.to,
statusMin = statusMin, df.RIE = df.1)
|
year.from |
Starting year |
year.to |
Ending year |
statusMin |
Minimum status of seizure record to include in summary (usually 3) |
df.1 |
Dataframe with list of seizure records to be considered. Created using df_quantities_RIE_separate.fn |
The main use of this function is to contribute to the calculation of two new database tables for law enforcement ratio and trade flow accounting.
A list with two items. Each item is a dataframe with information about the seizures for which there are different countries of raw and worked origin. double.raw a dataframe for countries that were not a country of raw origin but were a country of worked origin double.raw a dataframe for countries that were not a country of worked origin but were a country of raw origin Each dataframe has two columns (a) An identifying column of two parts separated by a colon giving seizure id:country code (eg 12345:999) (b) worked or raw weight that should not be attributed to that country for that seizure
For example for double.wkd the dataframe might look like the following:
seizure_wkd | raw |
54321:999 | 123.45 |
For seizure 54321 country 999 was a country of worked origin but was not a country of raw origin. Therefore 123.45 kg (the weight of the raw ivory for that seizure) must be removed from the total weight out attributed to this country
df_quantities_RIE_separate
,
mult_ctries
,
inout_tables_LE_TF_prep
,
inout_tables_LE_TF_final
1 2 3 4 5 6 7 8 9 10 | year.from <- 1900
year.to <- 2100
statusMin <- 3
df.1 <- df_quantities_RIE_separate(year.from = year.from, year.to = year.to,
statusMin = statusMin, reg.model = 'wt est.Rdata')
double.recs <- double_count(year.from = year.from, year.to = year.to,
statusMin = statusMin, df.RIE = df.1)
#_______________________________________________________________________
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.