2

I am trying to figure out Population percentage change based off census tract data from 2010 and 2014 data. One of my tables I pulled from the U.S. Census Bureau (2010 data); this table came with the shapefile that was downloaded from their website and is String as its type. I also have the census tract table data from American Fact Finder (2014 data); this table is a CSV file I imported into ArcMap. It is a Double as its type. I was going to add a field to my target table (2010 data) so I can join the 2014 data to it but I am not even allowed to add a field (it is grayed out).

My main objective is to add the 2014 data to the 2010 data table (using the Census tracts as a common link) so I can calculate the population percentage change based off each census tract over the course of those years. I am using ArcGIS 10.3.1.

  • You have added a shapefile (not just the table/dbf) and a csv table to ArcMap and you want the data in the csv file added to the shapefile attribute table? – BERA Dec 2 '16 at 19:07
  • Yes that is exactly what I am trying to do, thanks. – Matthew S Dec 2 '16 at 20:17
2

You cannot join tables based on columns of a different data type. You can however tell ArcMap to load the CSV column as a String instead of a Double. Then, you can join the fields and export the data. Hopefully, after that, you can add a column to the new Shapefile or feature class that you exported, if needed.

Sources:

http://desktop.arcgis.com/en/arcmap/latest/manage-data/tables/adding-an-ascii-or-text-file-table.htm

https://msdn.microsoft.com/en-us/library/ms709353(v=vs.85).aspx

Step1: Create a schema.ini file: This file will be stored in the same directory as your CSV file. Make sure to specify the type of your join field as "Text" so it will join to your shapefile.

Example content of schema.ini:

[test.csv]
Format=CSVDelimited
ColNameHeader=True
Col1=testShort Short
Col2=testLong Long
Col3=testText Text
Col4=testjoinfield Text

Again, save this file in the same directory as your CSV file.

Step 2: Add your CSV file to ArcMap. ArcMap will read the schema.ini file and will use the desired data type for your column (as long as it's possible, e.g. a-z cannot be Double).

Step 3: Join your data using the newly typed column

Step 4: Export data

0

I am not even allowed to add a field (it is grayed out)

Make sure you are not currently editing that data source, you can't add fields when an edit session is happening

  • I just double checked and I was not editing the data source when trying to add a field to the table. – Matthew S Dec 2 '16 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.