Em Andamento

Write R script to cluster observations by X,Y coordinates and categorical variable, then draw contiguous polygons around clusters and export results as shape file

The data consist of ~30k points, each with X and Y coordinates so they can be placed on a graph. In addition, each point belongs to between 0-5 categories. The task is to write an R script that accomplishes the following:

Step 1: The points should be clustered based on their proximity to one another and based on the categories they belong to. This should be written in such a way that the user can select the number of clusters in the solution (e.g., 25).

Step 2: Contiguous polygons should be drawn around each cluster such that all points assigned to the cluster are inside the borders of the polygon, and the polygon is contiguous with neighboring polygons. For instance, "[login to view URL]" (attached) illustrates what the borders around clusters might look like. Notice that the clusters share borders with their neighbors. Imagine that all the points are cities within Europe and the clusters are countries. All countries must share borders, there can't be any "unclaimed" space on the map.

Step 3. The points within each cluster should be clustered again based on their proximity to one another and based on the categories they belong to. Ideally the optimum number of clusters would be automatically detected by the clustering algorithm (for instance, with DBSCAN or OPTICS) but it is acceptable for the user to manually define the number of clusters if no automatic solution is suitable (e.g., Kmeans).

Step 4. A polygon should be drawn around each sub-cluster, just as the original cluster boundaries were drawn. However, the original cluster polygons should act as the bounding boxes for these smaller sub-clusters. If the original clusters are countries within Europe, then these sub-clusters could be viewed as regions/districts within a country. An example of a "country" polygon can be seen in the attached "[login to view URL]". The state is then subdivided further into regions/districts, an example of which can be seen in "state_sub-cluster [login to view URL]"

Step 5. Finally, the polygons should be saved as shape files (.shp) and the cluster and sub-cluster assignments for each point should be saved as a .csv file.

I've attached an example data file and an example R script to demonstrate at least some of what I'm hoping to accomplish. The R Script only uses X and Y coordinates for clustering and it doesn't create contiguous state borders, but I hope it at least gives you a better understanding of what I'm trying to do.

Habilidades: Linguagem de Programação R, Estatísticas, Geographical Information System (GIS), Análise estatística, Geoespacial

Veja mais: sp package r, applied spatial data analysis with r pdf, geocomputation with r, spatial join in r, an introduction to r for spatial analysis and mapping, r sf package tutorial, geo computation in r, r sf create polygon from coordinates, export php search results, shape similarity matlab polygons, php mysql export results excel, script timed trying post transaction results, export svg files corel draw format, write polls results news, write sales results report, php write output script file, write search results file, python script file write telit, write macro code export data excel txt file, write perl results joomla content

Acerca do Empregador:
( 1 comentário ) Jackson, United States

ID do Projeto: #27824710

Concedido a:

(73 Comentários)
5.8

6 freelancers estão ofertando em média $642 nesse trabalho

aitmbarek

Hello, I've read your step by step description carefully ... I'm interested in your request and I'll be doing my best to meet all details you need for clustering and visualizing the borders. I have large experience wit Mais

$500 USD in 7 dias
(42 Comentários)
5.3
ssastbury

Dear Sir/Madam, I am a GIS developer specialized at tasks such as this. My expertise includes Python, R and SQL; working with open source tools like QGIS and GDAL; and developing web maps, APIs and apps. I propose to Mais

$750 USD in 10 dias
(4 Comentários)
4.0
umg536

Hi there, I'm bidding on your project "Write R script to cluster observations by X,Y coordinates and categorical variable, then draw contiguous polygons around clusters and export results as shape file" I am expert in Mais

$750 USD in 4 dias
(4 Comentários)
4.0
abubakarayyub01

Dear Hiring Manager, I am a PhD Scholar with excellence skills related to your project. I have read your project description carefully and i'm confident I can do this project for you perfectly. I still have a few quest Mais

$600 USD in 3 dias
(3 Comentários)
3.0
AwaisChaudhry

Hey there, I have 4 years of working experience in web technologies and I have a strong working knowledge of every possible framework which is in the market. In terms of client-end I know: Statistics, Statistical Anal Mais

$750 USD in 27 dias
(1 Comentário)
0.0