Select to view content in your preferred language

Need help with preserving data from a csv when joining it with a shapefile

225
2
3 weeks ago
sm1355
by
New Contributor

Hi all! I'm a relatively new QGIS/ArcGIS Online user here. I am working on a project that requires mapping various congregations across the United States by zip code or by county boundary. I have come across an issue in my work flow and was hoping some users with more experience could offer some tips. 

Here's my issue:

The data I'm working with often has entries that appear to be duplicates. In fact, they are distinct congregations, but based on the fields in the spreadsheet I am using, they appear to be the same. For example, a set of rows looks like this:

Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1790 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1790 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1790 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1790 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1788 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1788 0:00:00MORRIS  Methodist
Mount OliveNJ07836178817901/1/1788 0:00:0012/31/1788 0:00:00MORRIS  Methodist

 

Here, I am mapping Methodist congregations by county boundary. Because Methodists listed the number of congregations within a county boundary, all of the identification fields for the various congregations in that same county starting and ending the same year appear to be duplicates. However, they are not. So, I need to represent each of these distinct congregations. 

When I go to join my .csv with my shapefile of historical county boundaries, QGIS appears to merge the rows that look, like the above example, to be duplicates. Any tips on preventing this and keeping all of the data through this join process? 

Thank you!

2 Replies
BlakeTerhune
MVP Frequent Contributor

Just add a column and populate it with distinct values? You say that they appear to be duplicates (the data you posted), but then say they are not. Please describe the portion of the data that makes them distinct.

0 Kudos
BobBooth1
Esri Regular Contributor

You could geocode the CSV table to the county, state level.

https://doc.arcgis.com/en/arcgis-online/reference/geocode.htm

The geocoder supports multiple input fields, you can upload data that only has county and state.

That should give you an output point for each row.

county_and_state.png

multiple_points_per_county.png

 

You could also try doing a one-to-many join in ArcGIS Online so the joined features would be duplicated for each row in the table.

https://doc.arcgis.com/en/arcgis-online/analyze/join-features-mv.htm