clojurebridge / global-growth Goto Github PK
View Code? Open in Web Editor NEWDemonstrates uses of the World Bank API
Demonstrates uses of the World Bank API
I am not sure if this is by design -- like they should be implemented in class -- or not, but only a few of the indicators return any data.
Trying to get it working, I had to change the project.clj generated by the clojurebridge leiningen template:
(defproject global-growth "0.1.0-SNAPSHOT"
:description "Demonstrates the use of the World Bank API"
:url "https://github.com/clojurebridge/global-growth"
:license {:name "Creative Commons Attribution License"
:url "http://creativecommons.org/licenses/by/3.0/"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-http "0.7.7" :exclusions [org.clojure/tools.reader]]
[cheshire "5.2.0"]
[ring "1.2.1"]
[compojure "1.1.6"]
[hiccup "1.0.4"]
[org.clojure/tools.reader "0.8.8"]]
:plugins [[lein-ring "0.8.10"]]
;; :ring {:handler global-growth.web/handler}
:main ^:skip-aot global-growth.core
:target-path "target/%s"
:repl-options {:nrepl-middleware [lighttable.nrepl.handler/lighttable-ops]})
Specifically, note how I had to exclude tools.reader
, add an explicit dependency on a new version and finally add the lighttable middleware to :repl-options
.
Without these changes I wasn't able to start a REPL from lighttable.
I'm happy to submit a PR but couldn't find the repo where the leiningen template lives.
The app.md lesson might go more smoothly with a few changes to the shell-project version of global-growth. If the current version is also used for other lessons that would be impacted by these changes, please consider an alternate branch for the proposed app.md version.
*1. Add the following constants and helpers to core.clj:
;; CONSTANTS
(def base-uri "http://api.worldbank.org")
(def list-size 10)
(defn parse-json [str]
(json/parse-string str true))
*2. Add a line calling out
;; SUPPORTING FUNCTIONS
above the pre-populated supporting functions section.
*3. Include the complete lines for:
(defn view-ind
[indicator1 indicator2 year]
(let [inds1 (sorted-indicator-map
(get-indicator-all indicator1 year :country :value))
inds2 (sorted-indicator-map
(get-indicator-all indicator2 year :country :value))]
instead of:
(defn view-ind
[indicator1 indicator2 year]
(let [inds1 (<<FILL IN THE BLANK>>)
inds2 (<<FILL IN THE BLANK>>)]
We should start building up the app during the "first program" section of the curriculum. So we build the simplest piece of the app that includes all of the concepts needed in the "first program": a lein project, use a library, namespace, create a function, include a main.
We need a shell project with everything in it except for the pieces that will be built in the workshop. This will include:
I named it cheap-life when I had a different idea of what it would do. I'm horrible at naming things. Any ideas? Global Indicators? World Bank Data Analyzer?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.