Giter Club home page Giter Club logo

final_project-han16nah's Introduction

final_project-han16nah

This is my final project for submission in the advanced geoscripting university course.

Goal of the assignment

  • To practice applying best-practices in scientific programmingn
  • To reflect on programming habits and improve them.

Type of analysis

I chose to do an ecological analysis using data from the GBIF database (https://www.gbif.org/). GBIF provides free and open access to biodiversity data and has an API (https://www.gbif.org/developer/summary). There is also a python client to the API, called pygbif (https://pypi.org/project/pygbif/), maintained by github user sckott.

I split the project in two parts.

  1. An exploratory data analysis using Jupyter Notebook, where I experimented and explored the API, some visualisations and small analysis.

  2. A python script with the key analyses and functions from the notebook. I included requests of another API here (Eurostat GISCO API). In the python code, I tried to focus on programming style, readability and documentation of the code. Input can be given in configuration files (-json-format). I furthermore tried to avoid or catch some errors which I stumbled upon.

Requirements

To run the jupyter notebook and the python code, you need python 3.8 and a number of packages:

  • jupyter
  • pandas
  • geopandas
  • numpy
  • matplotlib
  • descartes
  • pygbif
  • mplleaflet
  • pywin32
  • pyproj
  • geojson
  • requests
  • pytest

If using Anaconda, the environment can be set up using the environment.yml:

conda env create -f environment.yml

or if you're working with another operating system than windows with the environment_cross-platform.yml:

conda env create -f environment_cross-platform.yml

Jupyter Notebook

To run the Jupyter Notebook, simply open a command prompt in the forked repository, type Jupyter Notebook and then click gbif_analysis.ipynb.

Python code

To run the python code with the sample data, open a command prompt (Anaconda prompt) in the forked repository and then run

python gbif_analysis.py

It is using the configurations given in config.json. Alternatively, uncomment line 181 to provide your own configuration file via the command prompt. The following parameters can be provided in the configuration file:

  • "species_list": List of species for which to conduct the analysis. Note that the first species is considered the target species for which to investigate co-occurence with the other species.
  • "country_code": Country code to limit the analysis to a specific country only, e.g. 'DE' for Germany
  • "output_directory": Absolute or relative output directory to save output CSV-files and PNG-files to.

final_project-han16nah's People

Contributors

han16nah avatar

Watchers

 avatar

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.