Giter Site home page Giter Site logo

fnielsen / cvrminer Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 5.0 958 KB

Data mining of CVR

Home Page: https://tools.wmflabs.org/cvrminer

License: Apache License 2.0

Python 11.45% Jupyter Notebook 86.56% HTML 1.80% JavaScript 0.19%
xbrl business denmark

cvrminer's Introduction

CVR miner

Data mining of CVR

Examples

>>> from cvrminer.cvrfile import CvrFile
>>> from cvrminer.virksomhed import Virksomhed
>>> filename = '/home/fnielsen/data/cvr/cvr-permanent.json'  # or whatever
>>> data = next(CvrFile(filename))
>>> virksomhed = Virksomhed(data)
>>> virksomhed.antal_ansatte
0
>>> cvr_file = CvrFile(filename)
>>> cvr_file.write_virksomhed_features_file()   # and wait

cvrminer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cvrminer's Issues

Exchange aspect

Exchange aspect

SELECT ?company ?companyLabel ?symbol 
WITH {
  SELECT ?company ?symbol WHERE {
    ?company p:P414 ?exchange_statement .
    ?exchange_statement ps:P414 wd:Q1019983 . 
    optional { ?exchange_statement pq:P249 ?symbol . }
    
  }
} AS %result
WHERE {
  INCLUDE %result .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en" . } 
}

Change SPARQL for control graph with path queries instead of graph queries

This query uses more properties.

#defaultView:Graph
PREFIX gas: <http://www.bigdata.com/rdf/gas#>

SELECT ?from ?from_image ?fromLabel ?to ?to_image ?toLabel
WITH {
  SELECT DISTINCT ?from ?to {
    { wd:Q66619204 (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 )* ?to . }
    UNION 
    { ?from (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 )* wd:Q66619204 . }
    ?from (wdt:P1830 | ^wdt:P127 | ^wdt:P1037 | ^wdt:P169 | ^wdt:P3320 ) ?to
  }
} AS %result 
WHERE {
  INCLUDE %result  
  OPTIONAL { ?from wdt:P18 ?from_image . }
  OPTIONAL { ?to wdt:P18 ?to_image . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "da,en" .  } 
}    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.