Added function to create slices based on year and/or category, and expanded event_count() to work based on specified categories.