Group areas into continuous units - group-by

The observations in my dataset were made for 7 years and come from different geographic areas. There are almost 4,000 areas, and the challenge is that each year the grouping of observations was different. I attach the first 30 lines of the table.
For example, in year 1 the observations for areas 3, 4, and 5, were groped together and shared the same reference number 10001, and observations for areas 6, 7, and 8 have a common reference number 10002. I want to compare observations across years, and to do this I need 'continuous' spatial units which remain fixed over time. In my example, the grouping of areas 3 to 5, and of areas 6 to 8 is a starting point; I could continue with these two groups for five years but in year 6 area number 8 has the same reference number as areas 9 to 11, hence I need to dissolve all areas from 6 to 11 into a larger continuous unit. I can do this manually, but given the size of my table, this is impractical. I wonder if somebody has already met this problem and could suggest an approach in R to solve it.

Related

PERMANOVA - small and unequal sample sizes

I am comparing fish communities at 2 sites (upstream vs downstream) with data collected in two seasons (wet and dry) over several years (2017-2022), with data from the first pair of wet and dry seasons representing the period before a treatment and subsequent data representing periods after the treatment. During each season I sampled each site four times, and recorded abundance of each fish species from each site. I did not conduct sampling during the last dry season due to resource constraints. The community compositions of the two sites over different seasons and periods are visualised in the NMDS biplots.
I am trying to do further analysis using PERMANOVA to look for any spatial-temporal changes in the fish commnities, mainly if the two groups are becoming more similar in the years following the treatment. As there are samples with no fishes recorded I have to remove those samples from the dataset, which means I have only three instead of four replicates in some of the site x season x year groups.
My question is, does it still make sense to use PERMANOVA if I have unequal sample size among groups, given the number of replicates from each are small (3-4)? I am planning to run the test separately for wet and dry seasons, but that means I still need to do two-way (site x year) PERMANOVAs for each of the seasons.
I learned from some of the online discussions that unequal sample size would be a problem for two (or more)-way PERMANOVAs and the problem of unequal sample size would be more prominent when the sample sizes are small. Would be grateful for any comments or insight on this. Thanks a tonne!

Tableau Parameter/Reference Line Help - Change One Column Instead of All

I have received a workbook from a coworker and they used parameters to give a color code (green when under two hours, red between 2 and 4, red between 4 and 6, red between 8 and 10). The ask was to change only one of the columns. In this case I need to change the between 2 and 4 Avg. Cycle Time for Process Cycle to green and leave the other 4 Cycles as red.
This is what my reference lines are showing for this column.
and this is what my parameter is set up like.
The values I believe are from Avg. Cycle Time (hours).
I have tried setting other parameters, I have tried using level of detail for some attempts, I'm fairly new to tableau and just needing some guidance here.

Nurse-scheduling: Largest sequence of no-shifts in N days must be > X

I'm experimenting with the nurse scheduling example, https://developers.google.com/optimization/scheduling/employee_scheduling#nurse_scheduling, and trying to figure out how to model the following constraint:
In a sliding 6 week window, each nurse must have at least 14 consecutive days with no shifts (i.e., be assigned to shift O).
add_soft_sequence_constraint isn't the right tool (I think, if I've understood properly) because that will try and enforce that all sequences of no shifts are 14 days, and I want to enforce that there is at least one sequence of no shifts that is 14 days long.
Any suggestions for how to model this would be gratefully received.

Am I using PCA in Orange in a correct way?

I am analysing if 15 books can be grouped according to 6 variables (of the 15 books, 2 are written by an author, 6 by an other one, and 7 by an other one). I counted the number of occurrences of the variables and I calculated the percentage. Then I used Orange software to use PCA. I uploaded the file. selected the columns and rows. And when it comes to PCA the program asks me if I want to normalize the data or not, but I am not sure about that because I have already calculated the percentage - is normalize different from calculating the percentage? Moreover, below the normalize button it asks me to show only:... and I have to choose a number between 0 and 100 but I don’t really know what it is.
Could you help me understand what I should do? Thank you in advance

I literally don't know what I need to do for this but it needs to be done and evaluated within a couple of days

1 It's an Emergency.
2 For one of my programming units we have to create a 'UCAS' points calculator in Net beans. UCAS sort out all of the university stuff in the UK.
3 So I need to create a GUI that has text boxes and buttons and I need to enter the amount of passes, merits, and distinctions I've got on my course, which will give me a total amount of UCAS points.
4 Passes = 70 points
5 Merit = 80 points
6 Distinctions = 90 points
7 There's 18 units in total, so if I enter I have 4 passes (a pass for 4 units) the box with the total amount of UCAS points needs to go up.
8 I need three boxes, one for passes, merits, and distinctions, and the box for the total amount of UCAS points. It needs a calculate button of course and a 'reset facility'. It says that the current date needs to be seen on the interface.
9 It also says that there should be an option to quit the program at any time.
10 It has to be a **GUI** and I literally don't know what to do and I don't want to fail again.
11 Can someone help me?
12 I literally don't know how to make the buttons work or anything.
I don't even need any help I just need someone to show me exactly what to do because I haven't got a clue.

Categories