I'm relatively new to QGIS and have been using it for a project related to gerrymandering and electoral redistricting. My apologies if the question may seem a bit novice.
I have two layers that I've imported into QGIS: One with the boundaries of all zip codes in Virginia and one with all electoral precincts in Virginia. The precinct file also included a column for cluster which notes that electoral district a precinct is in. I used GDAL Dissolve polygons to dissolve the precincts up into the associated cluster/district as shown below:
One of the columns I attached to the open attribute table for the zipcode layer is idealpnum2.
I want to do a spatial join using "Join Attributes by Location" to map the zipcodes onto the cluster/district layer and get an average idealpnum2 for each cluster/district. The layers do not match perfectly and district/cluster boundaries cut through zip codes in several places. Is this possible?
When I've tried to do this using the dissolved cluster/district layer as the target vector layer and the zipcode layer as the join vector layer, it returned a joined layer with an attribute table that was null for everything. . In the pictures below, I had first went into the zip code layer and changed the CRS to EPSG:4326 so that it had the same CRS as the dissolved cluster/district layer.
I also tried to run it without changing the CRSs and instead "forcing" it through. Did not work there either.
Does anyone know what I should be doing differently here? Is it even possible?