query-b4267462412e92340be02aba95fd4206

rq turtle/ttl

SPARQL request leads to JSONDecodeError once the requested timeframe is expandedDear Wikidata-team, First of all, I would like to thank you and the community for your efforts and support. The reason why I am contacting you is that I am facing a problem with a query. Before going into detail, I will provide a little description of my data need: I research the effect of exposure to financial and human crises on political radicalization among top executives. For this purpose, I created a database including all firm-level information of all joint-stock companies of interwar Germany. Among this information, I see who had been sitting on which board of what company. To enrich the data with additional personal information, I try to merge my data with data provided by Wikidata as many people from my dataset have also entries on Wikidata. Because board members in 1920 Germany were born all over the world, I basically try to query a dataset including all observations referring to people born between 1830 and 1915. However, my SPARQL query (see below) always returns an error. ) According to the comments received there, I tried to reduce the code's complexity by querying monthly data for each month of every year between 1830 and 1915. In the beginning, it worked out nicely, but after a point, more and more errors occurred again. https://stackoverflow.com/questions/63968595/sparql-request-using-python-works-but-leads-to-jsondecodeerror-once-the-requesteAfter having spent days trying to solve the issue, I opened a thread on stackoverflow (link: This is why I am contacting you. Do you have an idea on how to solve my problem?

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?person ?personLabel ?dob ?place_of_birth ?place_of_birthLabel ?date_of_death ?place_of_death ?place_of_deathLabel ?political_party ?political_partyLabel ?sex_or_gender ?sex_or_genderLabel ?Wikimedia_import_URL ?occupation ?occupationLabel ?work_location ?work_locationLabel ?educated_at ?educated_atLabel ?imported_from_Wikimedia_project ?imported_from_Wikimedia_projectLabel ?source_website_for_the_property ?stated_in ?stated_inLabel ?religion ?religionLabel ?VIAF_ID ?ISNI ?Deutsche_Biographie_ID ?DBS_ID ?place_of_detention ?place_of_detentionLabel ?country_of_citizenship ?country_of_citizenshipLabel ?member_of_military_unit ?member_of_military_unitLabel ?conflict ?conflictLabel ?military_rank ?military_rankLabel ?military_branch ?military_branchLabel ?participant_in ?participant_inLabel ?award_received ?award_receivedLabel ?described_by_source ?described_by_sourceLabel ?academic_degree ?academic_degreeLabel ?field_of_work ?field_of_workLabel ?noble_title ?noble_titleLabel WHERE {
  ?person wdt:P31 wd:Q5;
    wdt:P569 ?dob.
  FILTER(("1830-01-01"^^xsd:date <= ?dob) && (?dob <= "1915-01-01"^^xsd:dat))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de". }
  OPTIONAL { ?person wdt:P19 ?place_of_birth. }
  OPTIONAL { ?person wdt:P570 ?date_of_death. }
  OPTIONAL { ?person wdt:P20 ?place_of_death. }
  OPTIONAL { ?person wdt:P102 ?political_party. }
  OPTIONAL { ?person wdt:P21 ?sex_or_gender. }
  OPTIONAL { ?person wdt:P4656 ?Wikimedia_import_URL. }
  OPTIONAL { ?person wdt:P106 ?occupation. }
  OPTIONAL { ?person wdt:P937 ?work_location. }
  OPTIONAL { ?person wdt:P69 ?educated_at. }
  OPTIONAL { ?person wdt:P143 ?imported_from_Wikimedia_project. }
  OPTIONAL { ?person wdt:P1896 ?source_website_for_the_property. }
  OPTIONAL { ?person wdt:P248 ?stated_in. }
  OPTIONAL { ?person wdt:P140 ?religion. }
  OPTIONAL { ?person wdt:P214 ?VIAF_ID. }
  OPTIONAL { ?person wdt:P213 ?ISNI. }
  OPTIONAL { ?person wdt:P7902 ?Deutsche_Biographie_ID. }
  OPTIONAL { ?person wdt:P4007 ?DBS_ID. }
  OPTIONAL { ?person wdt:P5019 ?occupation. }
  OPTIONAL { ?person wdt:P2632 ?place_of_detention. }
  OPTIONAL { ?person wdt:P27 ?country_of_citizenship. }
  OPTIONAL { ?person wdt:P7779 ?member_of_military_unit. }
  OPTIONAL { ?person wdt:P607 ?conflict. }
  OPTIONAL { ?person wdt:P410 ?military_rank. }
  OPTIONAL { ?person wdt:P241 ?military_branch. }
  OPTIONAL { ?person wdt:P1344 ?participant_in. }
  OPTIONAL { ?person wdt:P166 ?award_received. }
  OPTIONAL { ?person wdt:P1343 ?described_by_source. }
  OPTIONAL { ?person wdt:P512 ?academic_degree. }
  OPTIONAL { ?person wdt:P101 ?field_of_work. }
  OPTIONAL { ?person wdt:P97 ?noble_title. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v19("?DBS_ID"):::projected v18("?Deutsche_Biographie_ID"):::projected v17("?ISNI"):::projected v16("?VIAF_ID"):::projected v8("?Wikimedia_import_URL"):::projected v29("?academic_degree"):::projected v27("?award_received"):::projected v23("?conflict"):::projected v21("?country_of_citizenship"):::projected v4("?date_of_death"):::projected v28("?described_by_source"):::projected v1("?dob"):::projected v11("?educated_at"):::projected v30("?field_of_work"):::projected v12("?imported_from_Wikimedia_project"):::projected v22("?member_of_military_unit"):::projected v25("?military_branch"):::projected v24("?military_rank"):::projected v31("?noble_title"):::projected v9("?occupation"):::projected v26("?participant_in"):::projected v2("?person"):::projected v3("?place_of_birth"):::projected v5("?place_of_death"):::projected v20("?place_of_detention"):::projected v6("?political_party"):::projected v15("?religion"):::projected v7("?sex_or_gender"):::projected v13("?source_website_for_the_property"):::projected v14("?stated_in"):::projected v10("?work_location"):::projected c9(["de"]):::literal c7(["bd:serviceParam"]):::iri c4(["wd:Q5"]):::iri f0[["'1830-01-01^^xsd:date' <= ?dob?dob <= s1915-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 v2 --"wdt:P31"--> c4 v2 --"wdt:P569"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P19".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P570".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P20".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P102".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P21".-> v7 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P4656".-> v8 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P106".-> v9 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P937".-> v10 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P69".-> v11 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P143".-> v12 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1896".-> v13 end subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P248".-> v14 end subgraph optional12["(optional)"] style optional12 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P140".-> v15 end subgraph optional13["(optional)"] style optional13 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P214".-> v16 end subgraph optional14["(optional)"] style optional14 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P213".-> v17 end subgraph optional15["(optional)"] style optional15 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P7902".-> v18 end subgraph optional16["(optional)"] style optional16 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P4007".-> v19 end subgraph optional17["(optional)"] style optional17 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P5019".-> v9 end subgraph optional18["(optional)"] style optional18 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P2632".-> v20 end subgraph optional19["(optional)"] style optional19 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P27".-> v21 end subgraph optional20["(optional)"] style optional20 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P7779".-> v22 end subgraph optional21["(optional)"] style optional21 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P607".-> v23 end subgraph optional22["(optional)"] style optional22 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P410".-> v24 end subgraph optional23["(optional)"] style optional23 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P241".-> v25 end subgraph optional24["(optional)"] style optional24 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1344".-> v26 end subgraph optional25["(optional)"] style optional25 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P166".-> v27 end subgraph optional26["(optional)"] style optional26 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1343".-> v28 end subgraph optional27["(optional)"] style optional27 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P512".-> v29 end subgraph optional28["(optional)"] style optional28 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P101".-> v30 end subgraph optional29["(optional)"] style optional29 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P97".-> v31 end