<commit_before>from dashboard import models

class PriorityAreaPopultionReport():
    
    report = ()
    def __init__(self,country):
        self.country = country
        
    def generate():        
        if(self.country):
            priority_areas = models.PriorityArea.objects.filter(country=self.country)
        else:
            priority_areas = models.PriorityArea.objects.all()
        for p in priority_areas:            
            d = models.PriorityAreaStatus.objects.latest()
            r = PriorityAreaPopultion()
            r.population = d.population
            r.name = p.name
            r.households = d.households
            self.report.add(r)
            
            
    class PriorityAreaPopultion():
        name = ""
        population = 0
        households = 0<commit_msg>Added generate logic for PriorityAreaPopulation report<commit_after>from dashboard import models

class PriorityAreaPopultionReport():
    
    def generate(country=None):    
        priority_areas = models.PriorityArea.objects.filter(country=self.country)
        population = models.PriorityAreaStatus.objects.filter(priority_area__country=country)
        
        return {
            'priority_areas':priority_areas,
            'population':population
        }
            
    
{'fraction_non_alphanumeric': 0.07864302235929067, 'fraction_numerical': 0.0015420200462606013, 'mean_word_length': 2.011600928074246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4185586', 'n_tokens_mistral': 338, 'n_tokens_neox': 324, 'n_words': 60}