I am working on a project in which I want to take point features( tweets) and compare them to the GDP per capita of countries. I would like to have my end result be such as the following:

  • GDP Class 1 (55992.21-105044) + high percentage of total tweets tweets =colour 1
  • GDP Class 1 (55992.21-105044) + low percentage of total tweets =colour 2 ...

So on and so forth for each of my 5 GDP classes. I have already tried to work with multiple attributes by that gives me all combinations of single values for each, and I need both in classes to provide my analysis.

Example: USA has A very high GDP per capita, and has tweeted 73% of the total data collected. Canada is in the same GDP/Capita classification, but has contribute only 1% to the total data. Each one shold be coloured in a way that represents this.


More information as requested:

  • Using : ArcGis 10.2
  • End Result:a thematic map relating the GDp/Capita of a country to the percentage of tweets it posted during a time frame
  • What Have I tried?: Using Multiple attributes to relate the 2 attributes together
  • What have I succeeded in doing: One table contains both the GDP/capita and the number of tweets
  • How I want it to work: 0-15%,16-55% and 56-75% are my groupings for the percentage of tweets, and GDP/Capita is split into 5 classes. Each GDP/Capita Classificiation should contain sub-classificiations based on the Percents of all tweets from that country.
  • Please edit your question with more information and add appropriate tags. What software are you using? What is your end product supposed to be? What have you done already? – Branco Jun 18 '15 at 16:22

Add a new field called "class" of type string to your attribute table. Right-click on the "class" column header and choose "Field Calculator." Check "Python" instead of "VB Script," and check "Show code block." (I'm going to assume your gdp field is called "gdp", and your tweet-percent field is called "percent".) Enter this code in the code block:

gdptag = ''
percenttag = ''
if !gdp! > 55992.21 and !gdp! <= 105044:
    gdptag = 'GDP class 1 '
elif: !gdp! > 105044 and !gdp! <= 200000:
    gdptag = 'GDP class 2 '
elif: !gdp! > 200000 and !gdp! <= 300000:
    gdptag = 'GDP class 3 '
elif: !gdp! > 300000 and !gdp! <= 400000:
    gdptag = 'GDP class 4
elif: !gdp! > 400000 and !gdp! <= 500000:
    gdptag = 'GDP class 5 ' '

if !percent! <= 15:
    percenttag = "0-15% of tweets"
elif !percent! <=55:
    percenttag = "16-55% of tweets"
elif !percent! <=73:
    percenttag = "16-75% of tweets"

tag = gdptag + percenttag

Then in the bottom box, where it says "gdp = ", enter tag, and press OK. Then use the Symbology tab on your layer properties to display unique color values based on the "class" field.

| improve this answer | |

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.