diff --git a/core/utils/utils.py b/core/utils/utils.py
index 9d8f0586..3183e588 100644
--- a/core/utils/utils.py
+++ b/core/utils/utils.py
@@ -203,3 +203,21 @@ def parse_string_to_dicts(input_string, split_caracter=",", ret_type="list"):
ret_items.update({parts[0]: parts[1]})
return ret_items
+
+
+def replace_spaces_broken_lines(dictionary):
+ """
+ Replaces spaces in dictionary keys with newlines.
+
+ Args:
+ dictionary: The dictionary with keys that may contain spaces.
+
+ Returns:
+ A new dictionary with the modified keys.
+ """
+
+ new_dict = {}
+ for key, value in dictionary.items():
+ new_key = key.replace(" ", "\n")
+ new_dict[new_key] = value
+ return new_dict
diff --git a/index/ocabr/conf/schema.xml b/index/ocabr/conf/schema.xml
index cbed0aa6..f8e39551 100644
--- a/index/ocabr/conf/schema.xml
+++ b/index/ocabr/conf/schema.xml
@@ -61,6 +61,7 @@
+
diff --git a/index/ocabr/conf/solrconfig.xml b/index/ocabr/conf/solrconfig.xml
index 279d3ff2..140e5db6 100644
--- a/index/ocabr/conf/solrconfig.xml
+++ b/index/ocabr/conf/solrconfig.xml
@@ -192,6 +192,7 @@
type
record_status
practice
+ classification
action
institutions
diff --git a/indicator/indicator.py b/indicator/indicator.py
index 6a006735..56b19dbb 100644
--- a/indicator/indicator.py
+++ b/indicator/indicator.py
@@ -48,7 +48,7 @@ def __init__(
fill_range=True,
fill_range_value=0,
solr_instance=None,
- include_all=False
+ include_all=False,
):
"""Initializes the instance indicator class.
@@ -182,7 +182,7 @@ def get_keys(self):
"""
return self.get_facet(self.facet_by).keys()
- def dynamic_filters(self):
+ def dynamic_filters(self, key_list=None):
"""
This get the facets in index and update the filters attribute.
@@ -203,9 +203,16 @@ def dynamic_filters(self):
for context in self.context_by:
context_result = self.get_facet(context, result)
- context_list.append(
- ['%s:"%s"' % (context, keys) for keys in context_result.keys()]
- )
+ if key_list:
+ inter_list=[]
+ for key in context_result.keys():
+ if key in key_list:
+ inter_list.append('%s:"%s"' % (context, key))
+ context_list.append(inter_list)
+ else:
+ context_list.append(
+ ['%s:"%s"' % (context, keys) for keys in context_result.keys()]
+ )
context_prod = self._product(*context_list)
@@ -216,7 +223,7 @@ def dynamic_filters(self):
self.logger.info(self.filters)
- def generate(self):
+ def generate(self, key_list=None):
"""This will produce the discrete mathematics based on filters to index.
Args:
@@ -242,16 +249,16 @@ def generate(self):
"""
ret = []
q_list = []
-
+
if self.context_by:
- self.dynamic_filters()
+ self.dynamic_filters(key_list)
for filter in self.filters:
filters = {}
# add the default filter
filters.update(filter)
filters.update(self.default_filter)
-
+
if self.range_filter:
filters.update(
{
@@ -506,12 +513,10 @@ def get_data(self, rows=10000, files_by_year=False):
for char in unwanted_chars:
clq = clq.replace(char, "_")
- self.logger.info(
- "Filter: %s (%s)" % (q, len(data))
- )
+ self.logger.info("Filter: %s (%s)" % (q, len(data)))
yield (
- "%s" % (str(re.sub(r'_{2,}', '_', clq.lower()))),
+ "%s" % (str(re.sub(r"_{2,}", "_", clq.lower()))),
data,
)
else:
@@ -531,11 +536,9 @@ def get_data(self, rows=10000, files_by_year=False):
for char in unwanted_chars:
clq = clq.replace(char, "_")
- self.logger.info(
- "Filter: %s (%s)" % (q, len(data))
- )
+ self.logger.info("Filter: %s (%s)" % (q, len(data)))
yield (
- "%s" % (str(re.sub(r'_{2,}', '_', clq.lower()))),
+ "%s" % (str(re.sub(r"_{2,}", "_", clq.lower()))),
data,
)
diff --git a/indicator/indicatorOA.py b/indicator/indicatorOA.py
index 65187ed8..8d911da3 100644
--- a/indicator/indicatorOA.py
+++ b/indicator/indicatorOA.py
@@ -3,6 +3,8 @@
from django.conf import settings
from pyalex import Works
+from search import choices
+
class Indicator:
"""This class do all the necessary work to generate the discrete mathematics
@@ -75,7 +77,7 @@ def generate(self, key=False):
ret = {}
counts = []
- print(self.filters)
+
for year in range(
int(self.range_filter.get("range").get("start")),
int(self.range_filter.get("range").get("end")) + 1,
@@ -87,7 +89,7 @@ def generate(self, key=False):
.group_by(self.group_by)
.get(return_meta=True)
)
- print(meta)
+ print(meta)
if not key:
for re in result:
key_display_name = re.get("key_display_name")
@@ -96,12 +98,13 @@ def generate(self, key=False):
else:
if result:
counts.append(result[0].get("count"))
- print(counts)
+
print(ret)
return ret if not counts else counts
-
- def generate_by_country_code(self, keys=[]):
+ def generate_by_region(
+ self, target_key=False, regions=choices.scimago_region, indicator_list=False, indicator_dict=True
+ ):
"""This will produce the discrete mathematics based on filters to index.
Args:
@@ -109,74 +112,199 @@ def generate_by_country_code(self, keys=[]):
Returns:
A list of dictionary, something like:
- [
- {
- "example_key": {
- "items": [
- "2012",
- ],
- "counts": [
- 1856,
- ],
- }
- },
- ]
-
+ {
+ 'Latin America': {
+ '2023': 449364,
+ '2022': 454245,
+ '2021': 514552,
+ '2020': 504690,
+ '2019': 431683,
+ '2018': 399696,
+ '2015': 332322,
+ '2014': 280477,
+ '2017': 370061,
+ '2016': 335551},
+ 'Asiatic Region': {
+ '2023': 2504273,
+ '2022': 2367105,
+ '2021': 2161980,
+ '2020': 1944761,
+ '2019': 1670192,
+ '2018': 1482810,
+ '2016': 1181621,
+ '2017': 1310592,
+ '2014': 1260167,
+ '2015': 1217707}
+ }
Raises:
This function dont raise any exception
"""
- ret = {}
+ # Loop to all regions
+ ret = {}
+ if target_key:
+ if target_key in regions:
+ regions = {target_key: regions[target_key]}
+
+ for region, keys in regions.items():
+ # Each region have a list of keys
+ for key in keys:
- for key in keys:
- print(ret)
- for year in range(
- int(self.range_filter.get("range").get("start")),
- int(self.range_filter.get("range").get("end")) + 1,
- ):
result, meta = (
Works()
.filter(**self.filters)
.filter(institutions={"country_code": key})
- .filter(publication_year=year)
+ .filter(
+ publication_year=str(
+ self.range_filter.get("range").get("start")
+ )
+ + "-"
+ + str(self.range_filter.get("range").get("end"))
+ )
.group_by(self.group_by)
.get(return_meta=True)
)
- print(meta)
-
+
for re in result:
- key_display_name = re.get("key_display_name")
count = re.get("count")
- if key_display_name in ret:
- ret[key_display_name] = ret.get(key_display_name) + count
+ print(ret)
+ # Se a região está no dicionário
+ if region in ret:
+ # Se a chave de ano está na região
+ if re.get("key") in ret.get(region):
+ # adiciona na região o valor que tem mais o count
+ ret.get(region).update(
+ {re.get("key"): ret.get(region)[re.get("key")] + count}
+ )
+ else:
+ # atualizar o dicionário com o ano e o valor de count
+ ret.get(region).update({re.get("key"): count})
+ else:
+ # cria a região no dicionário com o valor do ano com um valor de count inicial
+ ret.setdefault(region, {re.get("key"): count})
+
+ if indicator_list:
+ return self.convert_to_indicator_list(ret)
+ elif indicator_dict:
+ return self.convert_to_indicator_dict(ret)
+ else:
+ ret
+
+
+ def generate_by_country(
+ self, target_key=False, countries=choices.country_list, indicator_list=False, indicator_dict=True
+ ):
+ """This will produce the discrete mathematics based on filters to index.
+
+ Args:
+ No args
+
+ Returns:
+ A list of dictionary, something like:
+ {
+ 'us': {
+ '2023': 449364,
+ '2022': 454245,
+ '2021': 514552,
+ '2020': 504690,
+ '2019': 431683,
+ '2018': 399696,
+ '2015': 332322,
+ '2014': 280477,
+ '2017': 370061,
+ '2016': 335551},
+ 'ch': {
+ '2023': 2504273,
+ '2022': 2367105,
+ '2021': 2161980,
+ '2020': 1944761,
+ '2019': 1670192,
+ '2018': 1482810,
+ '2016': 1181621,
+ '2017': 1310592,
+ '2014': 1260167,
+ '2015': 1217707}
+ }
+ }
+ Raises:
+ This function dont raise any exception
+ """
+
+ # Loop to all countries
+ ret = {}
+
+ for country, key in countries:
+
+ result, meta = (
+ Works()
+ .filter(**self.filters)
+ .filter(authorships={"institutions": {"country_code": key}})
+ .filter(
+ publication_year=str(
+ self.range_filter.get("range").get("start")
+ )
+ + "-"
+ + str(self.range_filter.get("range").get("end"))
+ )
+ .group_by(self.group_by)
+ .get(return_meta=True)
+ )
+
+ for re in result:
+ count = re.get("count")
+ print(ret)
+ # Se a região está no dicionário
+ if country in ret:
+ # Se a chave de ano está na região
+ if re.get("key") in ret.get(country):
+ # adiciona na região o valor que tem mais o count
+ ret.get(country).update(
+ {re.get("key"): ret.get(country)[re.get("key")] + count}
+ )
else:
- ret.setdefault(key_display_name, count)
- print(ret)
- return ret
+ # atualizar o dicionário com o ano e o valor de count
+ ret.get(country).update({re.get("key"): count})
+ else:
+ # cria a região no dicionário com o valor do ano com um valor de count inicial
+ ret.setdefault(country, {re.get("key"): count})
+ if indicator_list:
+ return self.convert_to_indicator_list(ret)
+ elif indicator_dict:
+ print(self.convert_to_indicator_dict(ret))
+ return self.convert_to_indicator_dict(ret)
+ else:
+ ret
- def filter_dictionary(dictionary, valid_licenses):
- """Filters a dictionary of licenses, grouping unmatched entries under 'others'.
+
+ def convert_to_indicator_list(self, data):
+ """Converts a dictionary of items and years into a formatted list.
Args:
- dictionary (dict): The dictionary of licenses.
- valid_licenses (list): The list of valid licenses.
+ data: A dictionary in the specified format.
Returns:
- dict: The filtered dictionary.
+ A list in the desired format.
"""
- filtered_dict = {}
- others = []
+ return [
+ {
+ item: {
+ "items": list(year_data.keys()),
+ "counts": list(year_data.values()),
+ }
+ }
+ for item, year_data in data.items()
+ ]
- for key, value in dictionary.items():
- normalized_key = key.replace(" ", "-").upper()
- if any(normalized_key in license for license in valid_licenses):
- filtered_dict[key] = value
- else:
- others.extend(value)
+ def convert_to_indicator_dict(self, data):
+ """Converts a dictionary of regions and years into a formatted dict.
+
+ Args:
+ data: A dictionary in the specified format.
- if others:
- filtered_dict['others'] = others
+ Returns:
+ A list in the desired format.
+ """
- return filtered_dict
\ No newline at end of file
+ return { region: list(year_data.values()) for region, year_data in data.items() }
diff --git a/indicator/migrations/0024_indicatordata.py b/indicator/migrations/0024_indicatordata.py
new file mode 100644
index 00000000..7bfb4b4e
--- /dev/null
+++ b/indicator/migrations/0024_indicatordata.py
@@ -0,0 +1,61 @@
+# Generated by Django 4.1.6 on 2024-08-08 10:17
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("core", "0002_language"),
+ ("indicator", "0023_alter_indicatorfile_options_and_more"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="IndicatorData",
+ fields=[
+ (
+ "id",
+ models.BigAutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("name", models.CharField(max_length=255, verbose_name="Nome")),
+ (
+ "data_type",
+ models.CharField(max_length=255, verbose_name="Data Type"),
+ ),
+ (
+ "raw",
+ models.JSONField(
+ blank=True, null=True, verbose_name="Arquivo JSON"
+ ),
+ ),
+ (
+ "created",
+ models.DateTimeField(
+ auto_now_add=True, verbose_name="Data de criação"
+ ),
+ ),
+ (
+ "updated",
+ models.DateTimeField(
+ auto_now=True, verbose_name="Data da última atualização"
+ ),
+ ),
+ (
+ "source",
+ models.ForeignKey(
+ null=True,
+ on_delete=django.db.models.deletion.CASCADE,
+ to="core.source",
+ verbose_name="Origem",
+ ),
+ ),
+ ],
+ ),
+ ]
diff --git a/indicator/models.py b/indicator/models.py
index b3dba12a..c2cc8f2b 100755
--- a/indicator/models.py
+++ b/indicator/models.py
@@ -16,8 +16,8 @@
from wagtail.admin.panels import FieldPanel
from wagtailautocomplete.edit_handlers import AutocompletePanel
+from core.models import CommonControlField, Source
from core.utils import utils
-from core.models import CommonControlField
from institution.models import Institution
from location.models import Location
from usefulmodels.models import ActionAndPractice, ThematicArea
@@ -795,3 +795,31 @@ def add_context(self, institutions=None, locations=None, thematic_areas=None):
self.locations.set(locations)
self.thematic_areas.set(thematic_areas)
self.save()
+
+
+class IndicatorData(models.Model):
+
+ name = models.CharField(_("Name"), max_length=255, null=False, blank=False)
+
+ data_type = models.CharField(_("Data Type"), max_length=255, null=False, blank=False)
+
+ source = models.ForeignKey(
+ Source,
+ verbose_name=_("Source"),
+ null=True,
+ on_delete=models.CASCADE,
+ )
+
+ raw = models.JSONField(_("JSON File"), null=True, blank=True)
+
+ # Creation date
+ created = models.DateTimeField(verbose_name=_("Creation date"), auto_now_add=True)
+
+ # Update date
+ updated = models.DateTimeField(verbose_name=_("Last update date"), auto_now=True)
+
+ def __unicode__(self):
+ return str("%s") % (self.source)
+
+ def __str__(self):
+ return str("%s") % (self.source)
diff --git a/indicator/tasks.py b/indicator/tasks.py
index 42c6074d..4bcedd7e 100644
--- a/indicator/tasks.py
+++ b/indicator/tasks.py
@@ -7,9 +7,10 @@
from pyalex import Works
from config import celery_app
-
# from indicator import directory, sciprod
-from indicator import indicator, models
+from core.models import Source
+from indicator import indicator, indicatorOA, models
+from core.utils import utils
User = get_user_model()
@@ -91,18 +92,23 @@ def task_generate_article_indicators(
}
)
- serie_json = json.dumps(
- {
- "keys": [
- key
- for key in range(
- ind.range_filter.get("range").get("start"),
- ind.range_filter.get("range").get("end") + 1,
- )
- ],
- "series": serie_list,
- }
- )
+ if ind.range_filter:
+ serie_json = json.dumps(
+ {
+ "keys": [
+ key
+ for key in range(
+ ind.range_filter.get("range").get("start"),
+ ind.range_filter.get("range").get("end") + 1,
+ )
+ ],
+ "series": serie_list,
+ }
+ )
+ else:
+ serie_json = json.dumps(
+ {"keys": [key for key in ind.get_keys()], "series": serie_list}
+ )
indicator_model = models.Indicator(
title=ind.title,
@@ -118,7 +124,7 @@ def task_generate_article_indicators(
for data in ind.get_data(rows=10000, files_by_year=True):
files = {}
- file_name_jsonl = "%s.json" % (data[0])
+ file_name_jsonl = "%s.jsonl" % (data[0])
file_path_jsonl = ind.save_jsonl(
data[1], dir_name="/tmp", file_name=file_name_jsonl
)
@@ -227,3 +233,70 @@ def task_generate_indicators_by_oa_api(self, user_id, indicators):
)
indicator_model.save()
+
+
+@celery_app.task(bind=True, name=_("Generate data from OA(OpenAlex) Count Regions"))
+def task_generate_indicators_by_oa_api_regions(
+ self,
+ user_id,
+ name="OA World Count Regions",
+ data_type="count_regions",
+ source="OPENALEX",
+ start_year=2014,
+ end_year=2023,
+):
+ """
+ This task process the data from OpenAlex.
+
+ Stored the data on IndicatorData with data_type: regions_count and raw data with something like:
+ {"Western Europe": [ "AD", "AT", "BE", "BV", "CY", "DK", "FO", "FI", "FR", "DE", "GI", "GR", "GL", "GG", "VA", "IS", "IE", "IM", "IT", "JE", "LI", "LU", "MT", "MC", "NL", "NO", "PT", "SM", "ES", "SJ", "SE", "CH", "GB", "AX", ]}
+ """
+
+ source, source_id = Source.objects.get_or_create(name=source)
+
+ result = indicatorOA.Indicator(
+ filters={},
+ group_by="publication_year",
+ range_filter={
+ "filter_name": "year",
+ "range": {"start": start_year, "end": end_year},
+ },
+ ).generate_by_region()
+
+ models.IndicatorData.objects.update_or_create(
+ name=name, data_type=data_type, source=source, raw=result
+ )
+
+
+@celery_app.task(bind=True, name=_("Generate data from OA(OpenAlex) Count Countries"))
+def task_generate_indicators_by_oa_api_countries(
+ self,
+ user_id,
+ name="OA World Count Countries",
+ data_type="count_countries",
+ source="OPENALEX",
+ start_year=2014,
+ end_year=2023,
+):
+ """
+ This task process the data from OpenAlex.
+
+ Stored the data on IndicatorData with data_type: countries_count and raw data with something like:
+
+ { 'us': { '2023': 449364, '2022': 454245, '2021': 514552, '2020': 504690, '2019': 431683, '2018': 399696, '2015': 332322, '2014': 280477, '2017': 370061, '2016': 335551}, 'ch': { '2023': 2504273, '2022': 2367105, '2021': 2161980, '2020': 1944761, '2019': 1670192, '2018': 1482810, '2016': 1181621, '2017': 1310592, '2014': 1260167, '2015': 1217707} } }
+ """
+
+ source, source_id = Source.objects.get_or_create(name=source)
+
+ result = indicatorOA.Indicator(
+ filters={},
+ group_by="publication_year",
+ range_filter={
+ "filter_name": "year",
+ "range": {"start": start_year, "end": end_year},
+ },
+ ).generate_by_country()
+
+ models.IndicatorData.objects.update_or_create(
+ name=name, data_type=data_type, source=source, raw=result
+ )
\ No newline at end of file
diff --git a/indicator/wagtail_hooks.py b/indicator/wagtail_hooks.py
index de70bf58..8007dd7f 100755
--- a/indicator/wagtail_hooks.py
+++ b/indicator/wagtail_hooks.py
@@ -10,7 +10,7 @@
)
from . import views
-from .models import Indicator, IndicatorFile
+from .models import Indicator, IndicatorFile, IndicatorData
class IndicatorAdmin(ModelAdmin):
@@ -83,13 +83,28 @@ class IndicatorFileAdmin(ModelAdmin):
search_fields = ("name",)
-class InstitutionAdminGroup(ModelAdminGroup):
+class IndicatorDataAdmin(ModelAdmin):
+ model = IndicatorData
+ menu_label = _("Indicator Data")
+ menu_icon = "folder-open-inverse"
+ add_to_settings_menu = False # or True to add your model to the Settings sub-menu
+ exclude_from_explorer = (
+ False # or True to exclude pages of this type from Wagtail's explorer view
+ )
+
+ list_display = ("name", "data_type", "raw",)
+ list_filter = ("name", "data_type",)
+ search_fields = ("name", "data_type",)
+
+
+class IndicatorAdminGroup(ModelAdminGroup):
menu_label = _("Indicator")
menu_icon = "folder-open-inverse" # change as required
menu_order = 100 # will put in 3rd place (000 being 1st, 100 2nd)
items = (
IndicatorAdmin,
+ IndicatorDataAdmin,
IndicatorFileAdmin,
)
-modeladmin_register(InstitutionAdminGroup)
+modeladmin_register(IndicatorAdminGroup)
diff --git a/search/choices.py b/search/choices.py
index fd751a8e..4485b0dc 100644
--- a/search/choices.py
+++ b/search/choices.py
@@ -112,211 +112,211 @@
"recursos educacionais abertos": "Recursos educacionais abertos",
"dados abertos de pesquisa": "Dados abertos de pesquisa",
"ciência cidadã": "Ciência cidadã",
- "peer review aberto": "Peer review aberto"
+ "peer review aberto": "Peer review aberto",
}
country_list = [
("United States of America", "US"),
- ("China", "ch"),
- ("United Kingdom of Great Britain and Northern Ireland", ""),
- ("Germany", ""),
- ("Japan", ""),
- ("France", ""),
- ("India", ""),
- ("Canada", ""),
- ("Italy", ""),
- ("Brazil", ""),
- ("Australia", ""),
- ("Spain", ""),
- ("Russian Federation", ""),
- ("Indonesia", ""),
- ("Netherlands", ""),
- ("Korea, Republic of", ""),
- ("Poland", ""),
- ("Switzerland", ""),
- ("Turkey", ""),
- ("Sweden", ""),
- ("Belgium", ""),
- ("Iran, Islamic Republic of", ""),
- ("Taiwan, Province of China", ""),
- ("Mexico", ""),
- ("Denmark", ""),
- ("Austria", ""),
- ("Israel", ""),
- ("Portugal", ""),
- ("Norway", ""),
- ("Czechia", ""),
- ("Finland", ""),
- ("South Africa", ""),
- ("Malaysia", ""),
- ("Egypt", ""),
- ("Greece", ""),
- ("Singapore", ""),
- ("Argentina", ""),
- ("Ukraine", ""),
- ("Saudi Arabia", ""),
- ("New Zealand", ""),
- ("Pakistan", ""),
- ("Colombia", ""),
- ("Ireland", ""),
- ("Hungary", ""),
- ("Chile", ""),
- ("Hong Kong", ""),
- ("Nigeria", ""),
- ("Romania", ""),
- ("Thailand", ""),
- ("Croatia", ""),
- ("Slovakia", ""),
- ("Bangladesh", ""),
- ("Serbia", ""),
- ("Viet Nam", ""),
- ("Iraq", ""),
- ("Bulgaria", ""),
- ("Slovenia", ""),
- ("Peru", ""),
- ("Morocco", ""),
- ("Tunisia", ""),
- ("Algeria", ""),
- ("Cuba", ""),
- ("United Arab Emirates", ""),
- ("Panama", ""),
- ("Philippines", ""),
- ("Ecuador", ""),
- ("Kenya", ""),
- ("Ethiopia", ""),
- ("Venezuela, Bolivarian Republic of", ""),
- ("Jordan", ""),
- ("Lithuania", ""),
- ("Ghana", ""),
- ("Nepal", ""),
- ("Qatar", ""),
- ("Kazakhstan", ""),
- ("Belarus", ""),
- ("Estonia", ""),
- ("Costa Rica", ""),
- ("Lebanon", ""),
- ("Cyprus", ""),
- ("Sri Lanka", ""),
- ("Uzbekistan", ""),
- ("Luxembourg", ""),
- ("Latvia", ""),
- ("Uruguay", ""),
- ("Tanzania, United Republic of", ""),
- ("Puerto Rico", ""),
- ("Uganda", ""),
- ("Cameroon", ""),
- ("Kuwait", ""),
- ("Oman", ""),
- ("Macao", ""),
- ("Azerbaijan", ""),
- ("Iceland", ""),
- ("Bosnia and Herzegovina", ""),
- ("Georgia", ""),
- ("Armenia", ""),
- ("Bolivia, Plurinational State of", ""),
- ("Sudan", ""),
- ("Mongolia", ""),
- ("North Macedonia", ""),
- ("Zimbabwe", ""),
- ("Tajikistan", ""),
- ("Senegal", ""),
- ("Moldova, Republic of", ""),
- ("Côte d'Ivoire", ""),
- ("Yemen", ""),
- ("Zambia", ""),
- ("South Sudan", ""),
- ("Cambodia", ""),
- ("Malta", ""),
- ("Palestine, State of", ""),
- ("Paraguay", ""),
- ("Mozambique", ""),
- ("Benin", ""),
- ("Guatemala", ""),
- ("Burkina Faso", ""),
- ("Bahrain", ""),
- ("Malawi", ""),
- ("Albania", ""),
- ("Mali", ""),
- ("Myanmar", ""),
- ("Libya", ""),
- ("Syrian Arab Republic", ""),
- ("Congo, Democratic Republic of the", ""),
- ("Botswana", ""),
- ("Niger", ""),
- ("Jamaica", ""),
- ("Réunion", ""),
- ("Brunei Darussalam", ""),
- ("Burundi", ""),
- ("Virgin Islands, British", ""),
- ("Rwanda", ""),
- ("Montenegro", ""),
- ("Trinidad and Tobago", ""),
- ("Congo", ""),
- ("Kosovo", ""),
- ("El Salvador", ""),
- ("Nicaragua", ""),
- ("Kyrgyzstan", ""),
- ("Honduras", ""),
- ("Madagascar", ""),
- ("Dominican Republic", ""),
- ("Namibia", ""),
- ("Fiji", ""),
- ("Mauritius", ""),
- ("Guadeloupe", ""),
- ("Afghanistan", ""),
- ("Papua New Guinea", ""),
- ("Togo", ""),
- ("Angola", ""),
- ("Gambia", ""),
- ("Gabon", ""),
- ("Grenada", ""),
- ("Guinea", ""),
- ("Lao People's Democratic Republic", ""),
- ("Monaco", ""),
- ("Barbados", ""),
- ("Sierra Leone", ""),
- ("Liechtenstein", ""),
- ("Sao Tome and Principe", ""),
- ("New Caledonia", ""),
- ("French Polynesia", ""),
- ("Martinique", ""),
- ("Greenland", ""),
- ("French Guiana", ""),
- ("Bhutan", ""),
- ("Guam", ""),
- ("Eswatini", ""),
- ("Antigua and Barbuda", ""),
- ("Haiti", ""),
- ("Chad", ""),
- ("Saint Martin (French part)", ""),
- ("Bahamas", ""),
- ("Guyana", ""),
- ("Guinea-Bissau", ""),
- ("Somalia", ""),
- ("Saint Kitts and Nevis", ""),
- ("Lesotho", ""),
- ("Curaçao", ""),
- ("Liberia", ""),
- ("Turkmenistan", ""),
- ("Maldives", ""),
- ("Faroe Islands", ""),
- ("Virgin Islands, U.S.", ""),
- ("Bermuda", ""),
- ("Suriname", ""),
- ("Gibraltar", ""),
- ("Belize", ""),
- ("Central African Republic", ""),
- ("Mauritania", ""),
- ("Eritrea", ""),
- ("Cayman Islands", ""),
- ("Dominica", ""),
- ("Korea, Democratic People's Republic of", ""),
- ("Seychelles", ""),
- ("Cabo Verde", ""),
- ("Timor-Leste", ""),
- ("Holy See", ""),
- ("Isle of Man" ""),
+ ("China", "CN"),
+ ("United Kingdom of Great Britain and Northern Ireland", "GB"),
+ ("Germany", "DE"),
+ ("Japan", "JP"),
+ ("France", "FR"),
+ ("India", "IN"),
+ ("Canada", "CA"),
+ ("Brazil", "BR"),
+ ("Italy", "IT"),
+ ("Spain", "ES"),
+ ("Australia", "AU"),
+ ("Russian Federation", "RU"),
+ ("Indonesia", "ID"),
+ ("Korea, Republic of", "KR"),
+ ("Netherlands", "NL"),
+ ("Poland", "PL"),
+ ("Switzerland", "CH"),
+ ("Turkey", "TR"),
+ ("Sweden", "SE"),
+ ("Belgium", "BE"),
+ ("Iran, Islamic Republic of", "IR"),
+ ("Taiwan, Province of China", "TW"),
+ ("Mexico", "MX"),
+ ("Denmark", "DK"),
+ ("Austria", "AT"),
+ ("Israel", "IL"),
+ ("Portugal", "PT"),
+ ("Czechia", "CZ"),
+ ("Malaysia", "MY"),
+ ("South Africa", "ZA"),
+ ("Norway", "NO"),
+ ("Finland", "FI"),
+ ("Egypt", "EG"),
+ ("Greece", "GR"),
+ ("Singapore", "SG"),
+ ("Argentina", "AR"),
+ ("Saudi Arabia", "SA"),
+ ("Ukraine", "UA"),
+ ("Pakistan", "PK"),
+ ("Colombia", "CO"),
+ ("New Zealand", "NZ"),
+ ("Ireland", "IE"),
+ ("Hong Kong", "HK"),
+ ("Chile", "CL"),
+ ("Hungary", "HU"),
+ ("Nigeria", "NG"),
+ ("Romania", "RO"),
+ ("Thailand", "TH"),
+ ("Croatia", "HR"),
+ ("Slovakia", "SK"),
+ ("Bangladesh", "BD"),
+ ("Serbia", "RS"),
+ ("Viet Nam", "VN"),
+ ("Iraq", "IQ"),
+ ("Morocco", "MA"),
+ ("Slovenia", "SI"),
+ ("Bulgaria", "BG"),
+ ("Peru", "PE"),
+ ("Algeria", "DZ"),
+ ("Tunisia", "TN"),
+ ("Panama", "PA"),
+ ("United Arab Emirates", "AE"),
+ ("Cuba", "CU"),
+ ("Ecuador", "EC"),
+ ("Philippines", "PH"),
+ ("Kenya", "KE"),
+ ("Ethiopia", "ET"),
+ ("Venezuela, Bolivarian Republic of", "VE"),
+ ("Jordan", "JO"),
+ ("Lithuania", "LT"),
+ ("Ghana", "GH"),
+ ("Qatar", "QA"),
+ ("Nepal", "NP"),
+ ("Estonia", "EE"),
+ ("Kazakhstan", "KZ"),
+ ("Costa Rica", "CR"),
+ ("Belarus", "BY"),
+ ("Cyprus", "CY"),
+ ("Sri Lanka", "LK"),
+ ("Lebanon", "LB"),
+ ("Latvia", "LV"),
+ ("Uzbekistan", "UZ"),
+ ("Luxembourg", "LU"),
+ ("Uruguay", "UY"),
+ ("Puerto Rico", "PR"),
+ ("Tanzania, United Republic of", "TZ"),
+ ("Cameroon", "CM"),
+ ("Uganda", "UG"),
+ ("Kuwait", "KW"),
+ ("Macao", "MO"),
+ ("Oman", "OM"),
+ ("Azerbaijan", "AZ"),
+ ("Iceland", "IS"),
+ ("Bosnia and Herzegovina", "BA"),
+ ("Tajikistan", "TJ"),
+ ("Armenia", "AM"),
+ ("Georgia", "GE"),
+ ("Sudan", "SD"),
+ ("Bolivia, Plurinational State of", "BO"),
+ ("North Macedonia", "MK"),
+ ("Zimbabwe", "ZW"),
+ ("Mongolia", "MN"),
+ ("Côte d'Ivoire", "CI"),
+ ("Senegal", "SN"),
+ ("Moldova, Republic of", "MD"),
+ ("Yemen", "YE"),
+ ("South Sudan", "SS"),
+ ("Mozambique", "MZ"),
+ ("Cambodia", "KH"),
+ ("Palestine, State of", "PS"),
+ ("Zambia", "ZM"),
+ ("Malta", "MT"),
+ ("Paraguay", "PY"),
+ ("Benin", "BJ"),
+ ("Bahrain", "BH"),
+ ("Albania", "AL"),
+ ("Guatemala", "GT"),
+ ("Burkina Faso", "BF"),
+ ("Malawi", "MW"),
+ ("Myanmar", "MM"),
+ ("Syrian Arab Republic", "SY"),
+ ("Botswana", "BW"),
+ ("Jamaica", "JM"),
+ ("Libya", "LY"),
+ ("Mali", "ML"),
+ ("Niger", "NE"),
+ ("Congo, Democratic Republic of the", "CD"),
+ ("Virgin Islands, British", "VG"),
+ ("Burundi", "BI"),
+ ("Brunei Darussalam", "BN"),
+ ("Réunion", "RE"),
+ ("Rwanda", "RW"),
+ ("Trinidad and Tobago", "TT"),
+ ("Montenegro", "ME"),
+ ("El Salvador", "SV"),
+ ("Kosovo", "XK"),
+ ("Kyrgyzstan", "KG"),
+ ("Nicaragua", "NI"),
+ ("Honduras", "HN"),
+ ("Dominican Republic", "DO"),
+ ("Madagascar", "MG"),
+ ("Fiji", "FJ"),
+ ("Namibia", "NA"),
+ ("Guadeloupe", "GP"),
+ ("Congo", "CG"),
+ ("Mauritius", "MU"),
+ ("Afghanistan", "AF"),
+ ("Papua New Guinea", "PG"),
+ ("Togo", "TG"),
+ ("Angola", "AO"),
+ ("Sao Tome and Principe", "ST"),
+ ("Gambia", "GM"),
+ ("Gabon", "GA"),
+ ("Grenada", "GD"),
+ ("Lao People's Democratic Republic", "LA"),
+ ("Barbados", "BB"),
+ ("Guinea-Bissau", "GW"),
+ ("Liechtenstein", "LI"),
+ ("Monaco", "MC"),
+ ("Sierra Leone", "SL"),
+ ("New Caledonia", "NC"),
+ ("French Polynesia", "PF"),
+ ("Martinique", "MQ"),
+ ("French Guiana", "GF"),
+ ("Antigua and Barbuda", "AG"),
+ ("Greenland", "GL"),
+ ("Guinea", "GN"),
+ ("Guam", "GU"),
+ ("Eswatini", "SZ"),
+ ("Bhutan", "BT"),
+ ("Saint Kitts and Nevis", "KN"),
+ ("Curaçao", "CW"),
+ ("Guyana", "GY"),
+ ("Bahamas", "BS"),
+ ("Lesotho", "LS"),
+ ("Maldives", "MV"),
+ ("Chad", "TD"),
+ ("Turkmenistan", "TM"),
+ ("Somalia", "SO"),
+ ("Faroe Islands", "FO"),
+ ("Liberia", "LR"),
+ ("Virgin Islands, U.S.", "VI"),
+ ("Bermuda", "BM"),
+ ("Haiti", "HT"),
+ ("Central African Republic", "CF"),
+ ("Mauritania", "MR"),
+ ("Cabo Verde", "CV"),
+ ("Eritrea", "ER"),
+ ("Gibraltar", "GI"),
+ ("Suriname", "SR"),
+ ("Korea, Democratic People's Republic of", "KP"),
+ ("Cayman Islands", "KY"),
+ ("Belize", "BZ"),
+ ("Seychelles", "SC"),
+ ("Timor-Leste", "TL"),
+ ("Holy See", "VA"),
+ ("Isle of Man", "IM"),
+ ("San Marino", "SM"),
+ ("Samoa", "WS"),
]
scimago_region = {
@@ -582,3 +582,4 @@
"ZW",
],
}
+
diff --git a/search/templates/graph/graph.html b/search/templates/graph/graph.html
index c09a5dad..cb5f4004 100644
--- a/search/templates/graph/graph.html
+++ b/search/templates/graph/graph.html
@@ -20,7 +20,7 @@
-
+
Indicadores
Painel de dados do Observatório OCABr
@@ -86,6 +86,7 @@
Indicadores
Universo:
+
+
Paises:
@@ -119,7 +121,7 @@
Indicadores
data-placeholder="Escolha um ou mais paises...">
{% for country in countries %}
-
@@ -128,10 +130,10 @@
Indicadores
Regiões
-
@@ -153,44 +155,35 @@
Indicadores
- Instituição:
+ Institutições:
-
-
Quantidade max. de instituições: 3
+
-
- Base de dados:
-
-
-
-
Escopo:
-
+
-
+
Objeto:
-
+
+
+ Base de dados:
+
+
+
Métrica:
@@ -404,7 +406,7 @@