User:BertvanDorp

From Enipedia
Jump to: navigation, search

Contents

[edit] Personal Information

[edit] Listing Mines per Country from DBPedia

Retrieving list of Mines for The Netherlands from DBPedia.org:

On Wikipedia [..] operational mines and [..] closed mines are listed for The Netherlands. [link to /Country/Mines]

User:Nono, thanks for fixing this up!
I'm currently looking into working the 'Place' results into the name of the Place, in case a DBPedia/Resources property is being returned. Any suggestions? BertvanDorp (talk) 11:28, 17 April 2014 (CEST)
If I understand you correctly, what you're seeing in the results is that http://dbpedia.org/resource/Heerlen indicates that on the page for the mine, there is a link to the Wikipedia page for Heerlen, while when you see "Schaesberg, Landgraaf" that means that there is no link to a Wikipedia page, there's just plain text in the infobox. If you just want to get a string, then it's a bit complicated since you have to deal with two different data structures. One solution is below which also filters for all labels of place pages in English. Without this filter, you would get multiple results for all the names of the same place in different languages. --ChrisDavis (talk) 14:45, 17 April 2014 (CEST)
SELECT ?MineWiki, ?OpeningYear, ?ClosingYear, ?Place, ?OwnerWiki WHERE {
  ?Mines rdf:type yago:Mine103768346 ;
         dbpprop:country dbpedia:Netherlands ;
         dbpprop:owner ?Owner ;
         foaf:isPrimaryTopicOf ?MineWiki .
  ?Owner foaf:isPrimaryTopicOf ?OwnerWiki
  OPTIONAL{?Mines dbpprop:closingYear ?ClosingYear .}
  OPTIONAL{?Mines dbpprop:openingYear ?OpeningYear .}
  { ?Mines dbpprop:place ?PlaceObj .
    ?PlaceObj rdf:type owl:Thing . 
    ?PlaceObj rdfs:label ?Place  
  } UNION { 
    ?Mines dbpprop:place ?Place .
    filter (datatype(?Place) = 'xsd:string') . 
  }
  FILTER(langMatches(lang(?Place), "EN"))
} LIMIT 10

[edit] Listing Electricity Transmissions Interconnectors per Country

Show a list of interconnections for electricity transmission to other countries. Check NorNed_Cable and Portal:OpenGridData.

CableName Length Voltage CurrentType
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
BritNed Cable 476,269.00 450,000.00 DC
  • This doesn't produce results, as I need to figure out a way to filter where out of 2 or 3 countries is the Netherlands, and one of the other 1 or 2 is not. Also, for most SubStations the Country isn't set. Can anybody suggests a way to mass-edit the SubStations on here? BertvanDorp (talk) 14:47, 18 April 2014 (CEST)
    • I Think the easiest way for mass editing would be to ask Chris to run a bot since most missing values probably belong to Netherland's Tennet... Until then the best way to get interconnectors is probably to find out the few other values ;-) Nono (talk) 21:15, 22 April 2014 (CEST)
      • Thanks, thats a much smarter filter! Can I use SparQL to write a query to mass-edit? I was thinking along the lines of getting a list of the substations and match the names with known names of cities in the Netherlands. Or, even better, check the location with the boundaries for the Netherlands. BertvanDorp (talk) 08:59, 23 April 2014 (CEST)

[edit] Listing World Bank energy Information for a country

See also this example.

[edit] Retrieving data from CBS oData test

Resources:

There's a distinction between AppService and BulkService. The first is being created for mobile apps and quick data retrievel, the second includes more data. Change 'App' to 'Bulk'to change between the two.

[edit] Experiment with visualisation: scatterchart of CO2intensity vs. YearBuilt Powerplants for gas-fired plants

  • This doesn't work as of now. There's a result in YearBuilt "2007-12-01T00:00:00Z"^^<http://www.w3.org/2001/XMLSchema#gYearMonth> -> it belongs to a plant that had a year and month specified in the Year Built '2007 - 12'. I changed this to '2007' but apperently the data hasn't updated yet, as this result keeps popping up. I can't seem to figure out how to filter out this other date format in the query. BertvanDorp (talk) 12:31, 18 April 2014 (CEST)
    • Chris, there seem to be a bug with the wiki since Bert's correction resulted in a second property value with a different type (dateTime vs. gYearMonth) instead of an update of the existing one. This can be filtered out using a FILTER clause based on the type. --Nono (talk) 18:22, 18 April 2014 (CEST)
      • This is really bizarre - it's a sort of zombie triple. I've updated the SMW code so that it doesn't export dates with type gYearMonth, and the SPARQL UPDATE code generated only shows the dateTime type being used. Clearing all the triples for Chilca Kallpa Powerplant makes it (and everything else) go away, but saving the page brings it back again, even if the year listed is different. Running the SPARQL DELETE code below deletes the value with type dateTime, but not the one with gYearMonth. This seems to be a bug in virtuoso for situations where you have two literals with different types for the same subject and predicate. I suspect that clearing some cache related to virtuoso could (as a hack) fix things, but I haven't located the documentation yet for that. --ChrisDavis (talk) 22:54, 18 April 2014 (CEST)
SPARQL DELETE FROM <http://enipedia.tudelft.nl/wiki/> { <http://enipedia.tudelft.nl/wiki/Chilca_Kallpa_Powerplant> <http://enipedia.tudelft.nl/wiki/Property:Year_built> ?year } WHERE { <http://enipedia.tudelft.nl/wiki/Chilca_Kallpa_Powerplant> <http://enipedia.tudelft.nl/wiki/Property:Year_built> ?year };

[edit] Fix Treemap for PowerPlants

The example by Alfredas works! [[3]]

  • This example is quite simpler than the one used in country pages heavily using grouping (and thus impacted by the Virtuoso bug documented here) providing for additional features such as aggregating smaller units in the fuel total or comparing accross periods.
The template seems OK too now (using a bit of a hack) but still showed issues with powerplant labels on some countries (or was it cache related...?). Nono (talk) 21:06, 22 April 2014 (CEST)




[edit] Pull efficiency of PV cells from OpenEI.org

see Portal:Advanced_Topics and Chris' blog

[edit] EuroStat SparQL test: GHG emmissions

EuroStat offers a SparQL endpoint through here.

  • This example directly from the website doesn't produce results ..
    • The above endpoint seems to only have metadata... Using the same endpoint as in python script for example (with some needed adaptations in the query) yields the following: --Nono (talk) 16:51, 19 April 2014 (CEST)

[edit] Include HHI as measure for Security of Supply for Countries

See the work by Alfredas: NaturalGasSecurityOfSupply

[edit] Show Sankey from IEA

Personal tools
Namespaces

Variants
Actions
Navigation
Portals
Advanced
Toolbox