Code Monkey home page Code Monkey logo

opencontext's Introduction

Travis-CI Build Status

opencontext: An R API client for the Open Context archaeological data repository

This packages enables browsing and downloading data from Open Context using R. Open Context reviews, edits, and publishes archaeological research data and archives data with university-backed repositories, including the California Digital Library.

Installation

Install opencontext

install.packages("devtools")
devtools::install_github("ropensci/opencontext")
library("opencontext")

Browse countries

To browse the countries that Open Context has data on:

countries <- oc_browse("countries")

The result is a data frame that include the names of the countries in countries$label. URLs that we can use to get more information about what projects, etc. are available for each country in countries$id

Browse locations

To browse the locations for one country, for example, Turkey:

library("dplyr", warn.conflicts = FALSE)
locations <- oc_browse(type = "countries") %>%
   filter(label == "Turkey") %>%
   oc_get_countries(type = "location")
#> Getting data for Turkey

To browse the names of locations that have archaeological data in Turkey, run locations$label. We can see that the first location in this example is Çatalhöyük.

Browse projects

To inspect the projects available for a location in a country, for example, for Çatalhöyük in Turkey:

projects_at_Çatalhöyük_Turkey <- oc_get_locations("Turkey", "Çatalhöyük")
#> Getting data for Turkey
#> Getting data for Çatalhöyük

Once again, the label column has the names of the projects: projects_at_Çatalhöyük_Turkey$label.

With a little further effort we can browse excavation/survey areas within the project, and get datasets of measurements of objects collected from these areas (along with chronological and spatial data for these objects).

Get data from a specific project

Now that we've identified a specific project, we can ingest data from that project into our R session.


ropensci_footer

opencontext's People

Contributors

benmarwick avatar lmullen avatar mrecos avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.