Code Monkey home page Code Monkey logo

belgiummaps.statbel's Introduction

Administrative boundaries of Belgium based on Open Data available at Statistics Belgium

The BelgiumMaps.StatBel package contains maps with administrative boundaries (national, regions, provinces, districts, municipalities, statistical sectors, agglomerations (200m)) of Belgium extracted from Open Data at Statistics Belgium (http://statbel.fgov.be/en/statistics/opendata). Data is converted from Lambert CRS into the WGS84 coordinate reference system.

This data is available in several objects:

  • BE_ADMIN_SECTORS: SpatialPolygonsDataFrame with polygons and data at the level of the statistical sector
  • BE_ADMIN_MUNTY: SpatialPolygonsDataFrame with polygons and data at the level of the municipality
  • BE_ADMIN_DISTRICT: SpatialPolygonsDataFrame with polygons and data at the level of the district
  • BE_ADMIN_PROVINCE: SpatialPolygonsDataFrame with polygons and data at the level of the province
  • BE_ADMIN_REGION: SpatialPolygonsDataFrame with polygons and data at the level of the region
  • BE_ADMIN_BELGIUM: SpatialPolygonsDataFrame with polygons and data at the level of the whole of Belgium
  • BE_ADMIN_HIERARCHY: data.frame with administrative hierarchy of Belgium
  • BE_ADMIN_AGGLOMERATIONS: SpatialPolygonsDataFrame with polygons and data at the level of an agglomeration (200m)

Installation

The package is available at datatailor.be

install.packages("sp")
install.packages("BelgiumMaps.StatBel", repos = "http://www.datatailor.be/rcube", type = "source")
vignette("BelgiumMaps_AdministrativeAreas_StatBel", package = "BelgiumMaps.StatBel")

The package is developed at https://gitlab.datatailor.be/open-source/BelgiumMaps.StatBel To install the latest version from the repository itself:

install.packages(c('sp', 'knitr', 'markdown'))
devtools::install_git("https://gitlab.datatailor.be/open-source/BelgiumMaps.StatBel", build_vignettes = TRUE)
## See the vignette
vignette("BelgiumMaps_AdministrativeAreas_StatBel", package = "BelgiumMaps.StatBel")

License

The package is available under the CC BY 2.0 license. More info: https://creativecommons.org/licenses/by/2.0. This license is compatible with the LICENCE file given by Statistics Belgium. More info at inst/extdata/LICENCE and inst/COPYRIGHTS.

Support in geospatial analysis

Need support in geospatial analysis or geospatial mapping. Contact BNOSAC: http://www.bnosac.be

belgiummaps.statbel's People

Contributors

jwijffels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

belgiummaps.statbel's Issues

add postcodes

https://www.geo.be/catalog/details/9738c7c0-5255-11ea-8895-34e12d0f0423?l=nl

Enkel intern gebruik toegelaten: van de website

Beperkingen op openbare toegang
•De beheerder van de bron bezit de eigendomsrechten (ook de rechten op de intellectuele eigendom) op de geografische bestanden • De beheerder geeft de klant het recht de gegevens te gebruiken voor intern gebruik •Het commercieel gebruik van de gegevens onder welke vorm dan ook is strikt verboden •De naam van de beheerder moet elke keer vermeld worden als de gegevens publiek gebruikt worden.

Voorwaarden voor toegang en gebruik

(Misschien downloaden van file zodat pakket zelfde licentie kan behouden)

  • merge upstream in gitlab
  • fix new communes ...

Re-create and validate post-merger muncipial spatial data

From:

"15 Vlaamse gemeenten hebben formeel hun intentie kenbaar gemaakt om op 1 januari 2019 te fuseren. Statbel heeft aan deze nieuwe gemeenten nieuwe NIS-codes toegekend vanaf 01/01/2019."

This is also reflected in new NIS-codes (valid/used from 2019-01-01) and NUTS-codes: "De nieuwe NUTS-codes zullen worden gebruikt om vanaf 2021 officiële statistieken op EU-niveau te produceren (de NUTS-codes kunnen slechts om de drie jaar officieel worden aangepast). De nieuwe NUTS-codes zullen echter worden opgenomen in de attributententabel van de statistische sectoren"

Muncipial and higher-level spatial files will need to be re-generated, and checked if all NIS, NUTS, etc. codes are valid. Need to double-check the mapping with sector-identifiers (issue #5 ), but atm. I don't think there will be an obstacle (aggregation step of sectors gives proper number of muncipalities, 581).

Open question is how this package should deal with historical spatial data.

Verify relation statistical sectors - munipalities in post-2019 data

From https://statbel.fgov.be/nl/open-data/statistische-sectoren-2020 :

"Vanaf de toestand 01012019 kan de gemeente code niet meer uit de statistische sectorcode afgeleid worden"

It is unclear to me if this is a mismatch at the level of the identifier (no longer a clean link with the first x digits of the sector-identifier), or a spatial mismatch (no longer perfectly nested).

I'm currently guessing the first, which does not really pose a problem for aggregating sectors to municipalities and higher levels. Aggergating sectors on municipal identifier cnis5_2020 seems to at least give the proper number of municipalities.

TODO: verify what this change means, and if a workaround / different hierachy-file is needed.

return sf-object instead of SpatialPolygonsDataFrame?

With the increasing standardisation of spatial R-packages on sf-objects, would it be a good idea to switch the default format?

I'm not sure if the small overhead of including st_as_sf() in scripts outweighs the downsides of switching the default format in the package. But if sf-objects would be the way to go, switching earlier breaks less code...

Evaluate variable-name standardisation and use in data

Due to the source and use in combination with other Statbel-datasets, the variable names in the spatial datasets are relatively non-intuitive and unstandardized (lower/uppercase, point/underscore, current and historical identifiers, etc.).

This is logical for users using this package in combination with other Statbel-datasets with similar identifiers, but not so much if the package is used as such, i.e. an R-friendly source of detailed Belgian administrative spatial objects to which you can add your own data. In this case generic but consistent naming of variables becomes more relevant.

How to deal with this depends a bit on the goals/use of the package, i.e. more generic as "BelgiumMaps" or more specific as "BelgiumMaps.StatBel".

Evaluate possiblity CRAN-release

Having the package on CRAN has some advantages, but requires a heavy reduction in size.

TODO:

  • Evaluate whether an CRAN-release is a (longer-term) goal;
  • If so, look at other data-heavy / maps-packages how they approach this.

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.