Hello Statalisters,
I have a dataset with court filings some with repeated dates (i.e., cases were filed in different states on the same day). I want to generate a line graph, but obviously after trying to xtset the data I am running into issues with repeated time values in the sample. I've attached a data snippet. Basically what I would like to create is a line graph that shows the number of filings in total on each day of the dataset. The second graph that I want to produce is the number of cases by subcategory over time (subcatcode). Any assistance is greatly appreciated.
I have a dataset with court filings some with repeated dates (i.e., cases were filed in different states on the same day). I want to generate a line graph, but obviously after trying to xtset the data I am running into issues with repeated time values in the sample. I've attached a data snippet. Basically what I would like to create is a line graph that shows the number of filings in total on each day of the dataset. The second graph that I want to produce is the number of cases by subcategory over time (subcatcode). Any assistance is greatly appreciated.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float id int FilingDate str18 Category str114 Subcategory byte SubCatCode long state2 1 21944 "Labor & Employment" "Conditions of employment (including lack of PPE, exposure to COVID-19 at work, wrongful death and personal injury)" 1 46 2 21986 "Labor & Employment" "Leaves of Absense (FMLA, FFCRA, State Law)" 4 6 3 21986 "Labor & Employment" "Leaves of Absense (FMLA, FFCRA, State Law)" 4 6 4 21991 "Labor & Employment" "Other" 10 2 5 21994 "Labor & Employment" "Conditions of employment (including lack of PPE, exposure to COVID-19 at work, wrongful death and personal injury)" 1 24 6 21997 "Labor & Employment" "Under-, over-, and non-payment issues/wage issues (FLSA, state, local law)" 6 46 7 21997 "Labor & Employment" "Under-, over-, and non-payment issues/wage issues (FLSA, state, local law)" 6 46 8 21997 "Labor & Employment" "Under-, over-, and non-payment issues/wage issues (FLSA, state, local law)" 6 46 9 21997 "Labor & Employment" "Under-, over-, and non-payment issues/wage issues (FLSA, state, local law)" 6 46 10 21998 "Labor & Employment" "Conditions of employment (including lack of PPE, exposure to COVID-19 at work, wrongful death and personal injury)" 1 2 end format %tdnn/dd/CCYY FilingDate label values state2 state2 label def state2 2 "Alaska", modify label def state2 6 "California", modify label def state2 24 "Michigan", modify label def state2 46 "Texas", modify
Comment