{ "cells": [ { "cell_type": "markdown", "id": "5c63af16-35dc-4095-9cd7-19edc54bb532", "metadata": {}, "source": [ "# List of publications" ] }, { "cell_type": "code", "execution_count": 3, "id": "4cf95d24-6d63-4460-b490-cd50743a9f6b", "metadata": { "is_executing": true, "nbsphinx": "hidden" }, "outputs": [], "source": [ "import re\n", "import requests\n", "from IPython.display import HTML\n", "\n", "# === CONFIG ===\n", "ORCID_ID = \"0000-0002-0705-7662\" # your ORCID iD\n", "API_BASE = \"https://pub.orcid.org/v3.0\"\n", "# ==============\n", "\n", "session = requests.Session()\n", "session.headers.update({\"Accept\": \"application/json\"})\n", "\n", "\n", "def get_all_put_codes(orcid: str):\n", " url = f\"{API_BASE}/{orcid}/works\"\n", " r = session.get(url, timeout=30)\n", " r.raise_for_status()\n", " works = r.json()\n", "\n", " put_codes = []\n", " for group in works.get(\"group\", []):\n", " for ws in group.get(\"work-summary\", []):\n", " put_codes.append(ws[\"put-code\"])\n", " return put_codes\n", "\n", "\n", "def get_work_detail(orcid: str, put_code: int):\n", " url = f\"{API_BASE}/{orcid}/work/{put_code}\"\n", " r = session.get(url, timeout=30)\n", " r.raise_for_status()\n", " return r.json()\n", "\n", "\n", "def _norm(s):\n", " return re.sub(r\"\\s+\", \" \", (s or \"\").strip())\n", "\n", "\n", "def extract_external_ids(work):\n", " ext = (work.get(\"external-ids\") or {}).get(\"external-id\") or []\n", " out = {}\n", " for e in ext:\n", " t = (e.get(\"external-id-type\") or \"\").lower()\n", " v = e.get(\"external-id-value\") or \"\"\n", " u = ((e.get(\"external-id-url\") or {}).get(\"value\")) or \"\"\n", " if t and v:\n", " out[t] = u or v\n", " return out\n", "\n", "\n", "def extract_contributors(work):\n", " contribs = (work.get(\"contributors\") or {}).get(\"contributor\") or []\n", " people = []\n", " for c in contribs:\n", " name = ((c.get(\"credit-name\") or {}).get(\"value\")) or \"\"\n", " attrs = c.get(\"contributor-attributes\") or {}\n", " seq = attrs.get(\"contributor-sequence\") or \"\"\n", " people.append({\"name\": _norm(name), \"seq\": seq})\n", "\n", " first = [p for p in people if p[\"seq\"] == \"FIRST\"]\n", " additional = [p for p in people if p[\"seq\"] != \"FIRST\"]\n", " ordered = first + additional\n", "\n", " return [p[\"name\"] for p in ordered if p[\"name\"]]\n", "\n", "\n", "def name_to_apa(full_name: str) -> str:\n", " s = _norm(full_name)\n", " if not s:\n", " return \"\"\n", "\n", " # Case 1: already in \"Last, First/Middle\" form\n", " if \",\" in s:\n", " last, rest = s.split(\",\", 1)\n", " last = _norm(last).strip(\",\")\n", " rest = _norm(rest)\n", "\n", " # If rest already looks like initials (e.g. \"K.\" or \"T. E.\"), keep them\n", " tokens = [t for t in rest.replace(\"-\", \" \").split() if t]\n", " initials = []\n", " for t in tokens:\n", " # pick first letter in the token\n", " ch = re.sub(r\"[^A-Za-zÀ-ÖØ-öø-ÿ]\", \"\", t)[:1]\n", " if ch:\n", " initials.append(ch.upper() + \".\")\n", " return f\"{last}, {' '.join(initials)}\".strip()\n", "\n", " # Case 2: \"First Middle Last\"\n", " parts = [p for p in s.split() if p]\n", " if len(parts) == 1:\n", " return parts[0]\n", "\n", " last = parts[-1]\n", " initials = []\n", " for p in parts[:-1]:\n", " ch = re.sub(r\"[^A-Za-zÀ-ÖØ-öø-ÿ]\", \"\", p)[:1]\n", " if ch:\n", " initials.append(ch.upper() + \".\")\n", " return f\"{last}, {' '.join(initials)}\".strip()\n", "\n", "\n", "def format_authors_apa(authors):\n", " if not authors:\n", " return \"\"\n", "\n", " apa = [name_to_apa(a) for a in authors if a]\n", " apa = [a for a in apa if a]\n", "\n", " if len(apa) == 0:\n", " return \"\"\n", " if len(apa) <= 2:\n", " return \" & \".join(apa)\n", " if len(apa) <= 20:\n", " return \", \".join(apa[:-1]) + \", & \" + apa[-1]\n", "\n", " first_19 = apa[:19]\n", " last = apa[-1]\n", " return \", \".join(first_19) + \", …, \" + last\n", "\n", "\n", "def extract_info(work):\n", " title_obj = work.get(\"title\") or {}\n", " title = _norm((title_obj.get(\"title\") or {}).get(\"value\"))\n", " subtitle = _norm((title_obj.get(\"subtitle\") or {}).get(\"value\"))\n", " if subtitle:\n", " title = f\"{title}: {subtitle}\" if title else subtitle\n", "\n", " journal = _norm((work.get(\"journal-title\") or {}).get(\"value\"))\n", "\n", " pub_date = work.get(\"publication-date\") or {}\n", " year = ((pub_date.get(\"year\") or {}).get(\"value\")) or None\n", "\n", " ext = extract_external_ids(work)\n", " doi = ext.get(\"doi\")\n", " doi_url = None\n", " if doi:\n", " doi_url = doi if str(doi).startswith(\"http\") else f\"https://doi.org/{doi}\"\n", "\n", " fallback_url = ext.get(\"url\") or ext.get(\"uri\")\n", " if fallback_url and not str(fallback_url).startswith(\"http\"):\n", " fallback_url = None\n", "\n", " authors = extract_contributors(work)\n", "\n", " return {\n", " \"authors\": authors,\n", " \"year\": year,\n", " \"title\": title,\n", " \"journal\": journal,\n", " \"doi_url\": doi_url,\n", " \"fallback_url\": fallback_url,\n", " }\n", "\n", "\n", "def apa_reference(rec):\n", " authors_str = format_authors_apa(rec[\"authors\"])\n", " year = rec[\"year\"] or \"n.d.\"\n", " title = rec[\"title\"] or \"Untitled work\"\n", " journal = rec[\"journal\"]\n", "\n", " title_part = f\"{title}.\"\n", " journal_part = f\"{journal}. \" if journal else \"\"\n", " link = rec[\"doi_url\"] or rec[\"fallback_url\"] or \"\"\n", "\n", " if authors_str:\n", " ref = f\"{authors_str} ({year}). {title_part} {journal_part}{link}\".strip()\n", " else:\n", " ref = f\"{title_part} ({year}). {journal_part}{link}\".strip()\n", "\n", " return re.sub(r\"\\s{2,}\", \" \", ref)\n", "\n", "\n", "def render_apa_list(records):\n", " items = []\n", " for rec in records:\n", " ref = apa_reference(rec)\n", "\n", " link = rec[\"doi_url\"] or rec[\"fallback_url\"]\n", " if link:\n", " ref = ref.replace(link, f'{link}')\n", "\n", " items.append(f\"
  • {ref}
  • \")\n", "\n", " html = f\"\"\"\n", "
    \n", "
      \n", " {''.join(items)}\n", "
    \n", "
    \n", " \"\"\"\n", " return HTML(html)\n", "\n", "\n", "# === RUN (NO display() here; we store the result for Cell 2) ===\n", "put_codes = get_all_put_codes(ORCID_ID)\n", "records = [extract_info(get_work_detail(ORCID_ID, pc)) for pc in put_codes]\n", "\n", "def sort_key(r):\n", " y = r[\"year\"]\n", " return int(y) if (y and str(y).isdigit()) else -1\n", "\n", "records = sorted(records, key=sort_key, reverse=True)\n", "\n", "pubs_html = render_apa_list(records) # Cell 2 should: display(pubs_html)" ] }, { "cell_type": "code", "execution_count": 4, "id": "b1cfe41b-02ad-4d6a-b6db-27b4ad35227a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
    \n", "
      \n", "
    1. Korpilo, S., Hasanzadeh, K., Klein, R., Willberg, E., Taylor, R. D., Müürisepp, K., Olafsson, A. S., & Toivonen, T. (2025). Green and blue spaces matter for active mobility: Results from mapping perceived environmental exposure in five European cities. Urban Forestry and Urban Greening. https://doi.org/10.1016/j.ufug.2025.129088
    2. Kolodynska, I., Hasanzadeh, K., Krajewski, P., & Kytta, M. (2025). The influence of structural characteristics, perceived environmental quality and spatial behaviour on health and well-being of suburban dwellers - a context sensitive study. Applied Geography. https://doi.org/10.1016/j.apgeog.2025.103763
    3. Korpilo, S., Willberg, E., Müürisepp, K., Klein, R., Taylor, R. D., Torkko, J., Hasanzadeh, K., & Toivonen, T. (2025). Restoring nature, enhancing active mobility: The role of street greenery in the EU’s 2024 restoration law. Ambio. https://doi.org/10.1007/s13280-025-02178-w
    4. Fagerholm, N., Tanhuanpää, T., Hasanzadeh, K., Kajosaari, A., Rinne, T., Holpainen, M., & Kyttä, M. (2025). Urban green infrastructure and recreational patterns: A 3D geospatial data analysis. Urban Forestry and Urban Greening. https://doi.org/10.1016/j.ufug.2025.128892
    5. Raudsepp, J., Thorbjörnsson, K. M., Hasanzadeh, K., Czepkiewicz, M., Árnadóttir, Á., & Heinonen, J. (2025). Activity spaces and leisure travel emissions: A case study in Reykjavík, Iceland. Travel Behaviour and Society. https://doi.org/10.1016/j.tbs.2024.100896
    6. Raudsepp, J., Hasanzadeh, K., Árnadóttir, Á., Heinonen, J., & Czepkiewicz, M. (2024). Does Higher Exposure to Green Spaces Lead to Higher Life Satisfaction and Less Leisure Travel? A Case Study of Reykjavík, Iceland. Urban Science. https://doi.org/10.3390/urbansci8040236
    7. Raudsepp, J., Hasanzadeh, K., Árnadóttir, Á., Heinonen, J., & Czepkiewicz, M. (2024). Does Higher Exposure to Green Spaces Lead to Higher Life Satisfaction and Less Leisure Travel? A Case Study of Reykjavík, Iceland. Urban Science. https://doi.org/10.3390/urbansci8040236
    8. Raudsepp, J., Hasanzadeh, K., Árnadóttir, Á., Heinonen, J., & Czepkiewicz, M. (2024). Does Higher Exposure to Green Spaces Lead to Higher Life Satisfaction and Less Leisure Travel? A Case Study of Reykjavík, Iceland. Urban science. https://doi.org/10.3390/urbansci8040236
    9. Kajosaari, A., Schorn, M., Hasanzadeh, K., Rinne, T., Rossi, S., & Kyttä, M. (2024). Beyond the backyard: Unraveling the geographies of citizens' engagement in digital participatory planning. Environment and planning. B, Urban analytics and city science. https://doi.org/10.1177/23998083241271460
    10. Hasanzadeh, K., Purkarthofer, E., Kajosaari, A., & Kyttä, M. (2024). Redefining Neighborhood Boundaries Using Activity Spaces: Bringing Together Soft Spaces and Spatial Analysis to Further the Discussion on Planning in Functional Spaces. Journal of Planning Education and Research. https://doi.org/10.1177/0739456x241252603
    11. Hasanzadeh, K., Purkarthofer, E., Kajosaari, A., & Kyttä, M. (2024). Redefining Neighborhood Boundaries Using Activity Spaces: Bringing Together Soft Spaces and Spatial Analysis to Further the Discussion on Planning in Functional Spaces. Journal of Planning Education and Research. https://doi.org/10.1177/0739456X241252603
    12. Kajosaari, A., Hasanzadeh, K., Fagerholm, N., Nummi, P., Kuusisto-Hjort, P., & Kyttä, M. (2024). Predicting context-sensitive urban green space quality to support urban green infrastructure planning. Landscape and Urban Planning. https://doi.org/10.1016/j.landurbplan.2023.104952
    13. Kajosaari, A., Hasanzadeh, K., Fagerholm, N., Nummi, P., Kuusisto-Hjort, P., & Kytta, M. (2024). Predicting context-sensitive urban green space quality to support urban green infrastructure planning. Landscape and Urban Planning. https://doi.org/10.1016/j.landurbplan.2023.104952
    14. Hasanzadeh, K., Fagerholm, N., Skov-Petersen, H., & Stahl, A. O. (2023). A methodological framework for analyzing PPGIS data collected in 3D. International Journal of Digital Earth. https://doi.org/10.1080/17538947.2023.2250739
    15. Hasanzadeh, K., Ikeda, E., Mavoa, S., & Smith, M. (2023). Children's physical activity and active travel: a cross-sectional study of activity spaces, sociodemographic and neighborhood associations. Children's Geographies. https://doi.org/10.1080/14733285.2022.2039901
    16. Hasanzadeh, K. (2022). Use of participatory mapping approaches for activity space studies: a brief overview of pros and cons. GeoJournal. https://doi.org/10.1007/s10708-021-10489-0
    17. Smith, M., Mavoa, S., Ikeda, E., Hasanzadeh, K., Zhao, J., Rinne, T. E., Donnellan, N., Kyttä, M., & Cui, J. (2022). Associations between Children’s Physical Activity and Neighborhood Environments Using GIS: A Secondary Analysis from a Systematic Scoping Review. International Journal of Environmental Research and Public Health. https://doi.org/10.3390/ijerph19031033
    18. Smith, M., Mavoa, S., Ikeda, E., Hasanzadeh, K., Zhao, J., Rinne, T. E., Donnellan, N., Kyttä, M., & Cui, J. (2022). Associations between Children’s Physical Activity and Neighborhood Environments Using GIS: A Secondary Analysis from a Systematic Scoping Review. International Journal of Environmental Research and Public Health. https://doi.org/10.3390/ijerph19031033
    19. Hasanzadeh, K. & Fagerholm, N. (2022). A learning-based algorithm for generation of synthetic participatory mapping data in 2D and 3D. MethodsX. https://doi.org/10.1016/j.mex.2022.101871
    20. Ramezani, S., Hasanzadeh, K., Rinne, T., Kajosaari, A., & Kyttä, M. (2021). Residential relocation and travel behavior change: Investigating the effects of changes in the built environment, activity space dispersion, car and bike ownership, and travel attitudes. Transportation Research Part A: Policy and Practice. https://doi.org/10.1016/j.tra.2021.02.016
    21. Ramezani, S., Laatikainen, T., Hasanzadeh, K., & Kyttä, M. (2021). Shopping trip mode choice of older adults: an application of activity space and hybrid choice models in understanding the effects of built environment and personal goals. Transportation. https://doi.org/10.1007/s11116-019-10065-z
    22. Smith, M., Cui, J., Ikeda, E., Mavoa, S., Hasanzadeh, K., Zhao, J., Rinne, T. E., Donnellan, N., & Kyttä, M. (2021). Objective measurement of children's physical activity geographies: A systematic search and scoping review. Health & Place. https://doi.org/10.1016/j.healthplace.2020.102489
    23. Hasanzadeh, K., Czepkiewicz, M., Heinonen, J., Kyttä, M., Ala-Mantila, S., & Ottelin, J. (2019). Beyond geometries of activity spaces: A holistic study of daily travel patterns, individual characteristics, and perceived wellbeing in Helsinki metropolitan area. Journal of Transport and Land Use. https://doi.org/10.5198/jtlu.2019.1148
    24. Hasanzadeh, K., Kyttä, M., & Brown, G. (2019). Beyond Housing Preferences: Urban Structure and Actualisation of Residential Area Preferences. Urban Science. https://doi.org/10.3390/urbansci3010021
    25. Hasanzadeh, K. (2019). Exploring centricity of activity spaces: From measurement to the identification of personal and environmental factors. Travel Behaviour and Society. https://doi.org/10.1016/j.tbs.2018.10.001
    26. Hasanzadeh, K. (2019). Exploring centricity of activity spaces: From measurement to the identification of personal and environmental factors. Travel Behaviour and Society. https://doi.org/10.1016/j.tbs.2018.10.001
    27. Kajosaari, A., Hasanzadeh, K., & Kyttä, M. (2019). Residential dissonance and walking for transport. Journal of Transport Geography. https://doi.org/10.1016/j.jtrangeo.2018.11.012
    28. Kajosaari, A., Hasanzadeh, K., & Kyttä, M. (2019). Residential dissonance and walking for transport. Journal of Transport Geography. https://doi.org/10.1016/j.jtrangeo.2018.11.012
    29. Hasanzadeh, K., Laatikainen, T., & Kyttä, M. (2018). A place-based model of local activity spaces: individual place exposure and characteristics. Journal of Geographical Systems. https://doi.org/10.1007/s10109-017-0264-z
    30. Hasanzadeh, K., Laatikainen, T., & Kyttä, M. (2018). A place-based model of local activity spaces: individual place exposure and characteristics. Journal of Geographical Systems. https://doi.org/10.1007/s10109-017-0264-z
    31. Laatikainen, T., Hasanzadeh, K., & Kyttä, M. (2018). Capturing exposure in environmental health research: Challenges and opportunities of different activity space models. International Journal of Health Geographics. https://doi.org/10.1186/s12942-018-0149-5
    32. Hasanzadeh, K. (2018). IASM: Individualized activity space modeler. SoftwareX. https://doi.org/10.1016/j.softx.2018.04.005
    33. Czepkiewicz, M., Ottelin, J., Ala-Mantila, S., Heinonen, J., Hasanzadeh, K., & Kyttä, M. (2018). Urban structural and socioeconomic effects on local, national and international travel patterns and greenhouse gas emissions of young adults. Journal of Transport Geography. https://doi.org/10.1016/j.jtrangeo.2018.02.008
    34. Hasanzadeh, K., Broberg, A., & Kyttä, M. (2017). Where is my neighborhood? A dynamic individual-based definition of home ranges and implementation of multiple evaluation criteria. Applied Geography. https://doi.org/10.1016/j.apgeog.2017.04.006
    35. Hasanzadeh, K., Broberg, A., & Kyttä, M. (2017). Where is my neighborhood? A dynamic individual-based definition of home ranges and implementation of multiple evaluation criteria. Applied Geography. https://doi.org/10.1016/j.apgeog.2017.04.006
    36. \n", "
    \n", "
    \n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.display import display\n", "display(pubs_html)" ] }, { "cell_type": "code", "execution_count": null, "id": "bfe152e9-8811-4e5e-91e7-d0d23c70629d", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.19" } }, "nbformat": 4, "nbformat_minor": 5 }