It’s become increasingly fashionable to require analysts to take technical assessments, often even before an interview is offered. (In fact, this practice is so popular that you should probably be suspicious of organizations that don’t require them.)
These assessments range in length from hours to days (though usually no more than a week). Typically, you’ll receive some dataset, be asked to do some type of analysis, and then report your results. You’ll usually have to send along your code and any additional sources used. This is an opportunity to you to show off your technical skills and understand more about types of skills you'll need or learn on the job. If you hate the experience of taking the technical assessment, you may not like the job.
Before you receive the assessment, ask the organization how long they expect it will take, how large the dataset will be, whether there are any specific tools that you will need, and whom you should e-mail with questions.
The organization you’re applying for probably has a preferred coding language. See if they list it in their instructions or the job description; if it’s not listed, just email them and ask. If possible, use their preferred language. If you're not terribly familiar with it, feel free to note that this is one of the first times you’ve used it and are generally more comfortable in something else.
As you’re taking the assessment, make sure you read and follow instructions carefully. The most successful analysts are detail-oriented, and these tests often include obnoxiously specific instructions as a way of testing how detail-oriented you are. Take particular note of how you are meant to display your results or return your task. If they want a PDF, send a PDF, etc. Try to avoid spelling mistakes, and keep your coding style consistent.
If there is some part of the assessment that you don’t understand, ask questions.
Keep an eye on the clock as you move through the exam. Try to set guidelines at the beginning for how long things will take, and if you’re exceeding those limits, watch out. Typically, things take longer than you expect, and many of these exams aren’t designed to be completed well within the specified time limit. That’s because things move fast in politics, and people want to know how far you can get in high-pressured, timed situations. If you are unable to finish the exam (which probably happens to a lot of candidates, even the ones who are hired), include how you would have approached the question if you had more time. Honestly, you should give a conceptual overview of your approach even if you do have time to execute it. Most people won’t actually read through every line of your code, so document things thoroughly.
Finally, Google things. Your task will almost certainly involve something that you don’t already know how to do, but good tests will be designed so that most of your solutions can be found using Google.