[R] Need help with merging .RDS data frame yield value with district shapefile corresponding GDMID and plot the graph

Ranjeet Kumar Jha r@njeetjh@||tkgp @end|ng |rom gm@||@com
Mon May 9 13:36:46 CEST 2022


Hello Everyone,

I am trying to plot an Indian district shapefile filled with modeled yield,
corresponding to each GDMID. I needed to first merge the Yield data with
respect to each GDMID from the .RDS file with the district shapefile of
India. Each district is represented by a GDMID. After merging, the Indian
district map filled with modeled yield values needs to be plotted similar
to an example attached figure.

I feel there is something wrong with my code for merging and plotting by
ggplot.

I have attached herewith my code, .RDS dataframe, shapefile and sample
example fig.

It would be great if you could help me with merging issue and plotting the
map, showing yield value, and legend in tile format.

Regards and Thanks,
Ranjeet

--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sample geo spatial crop production.PNG
Type: image/png
Size: 981726 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20220509/541ef57b/attachment-0001.png>


More information about the R-help mailing list