Showing posts with label Coding. Show all posts
Showing posts with label Coding. Show all posts

Monday, July 1, 2019

geobr: shapefiles and official spatial data sets of Brazil in R

In 2012, I published here a blog post about where to find shapefiles of Brazil. Since then, this has become one of the most popular posts in 9 years of the blog. However, the links to the original data sets change every now and then, and it gets a bit tricky to find the most up to date data. My team and I at the Institute for Applied Economic Research (Ipea) have created geobr, an R package that allows users to easily access shapefiles of the Brazilian Institute of Geography and Statistics (IBGE) and other official spatial data sets of Brazil.

The geobr package currently includes a variety of data sets, such as the shapefiles of municipalities and states (from 1872 to 2018), census weighting areas, a spatial grid with population count at a resolution of 200 x 200 meters, a geolocated database of health facilities in the country etc. All the data sets are read into R as sf data. We will gradually add other databases to the package, but feel free to make specific requests and suggestions by opening new issues on the GitHub page of geobr or tweeting the hashtag #geobr.

The advantage of geobr: Intuitive syntax that provides easy and quick access to a wide variety shapefiles and official spatial data sets with updated geometries for various years using harmonazied attributes and geographic projections across geographies and years.




Here is a quick intro to geobr:


Tuesday, March 19, 2019

The race for the largest city in the world over the past 500 years

In previous posts, I've pointed out to an incredible open dataset with comprehensive population estimates of human settlements and cities for the past 6,000 years. The talented John Burn-Murdoch used some of these data to create this nice animation showing the changing ranks of the 10 largest cities in the world since 1500. The full code for the animation is available here.

Tuesday, January 1, 2019

Fresh new start

That uplifting feeling that every new year/project is an opportunity to have a fresh new start.



image credit: MonkeyUser

Monday, October 23, 2017

Quote of they day: programming


"In programming the hard part isn’t solving problems, but deciding what problems to solve."

ps. a timely quote that reflects my struggle working on the 4th paper of my doctoral research.

Thursday, April 20, 2017

Quote of the day: programming



Wednesday, April 20, 2016

Creating tilted and stacked maps in R using ggplot2

I've just created a gist showing how to create tilted and stacked maps in R using ggplot2 in two steps. This was only possible thanks to Barry Rowlingson, who got the solution of the 1st step (which is 90% of the task). Here is how to do it:


Tuesday, November 17, 2015

Programming Music with Punched Cards

I've just learned this 'instrument' is called a fairground organ. This is as hipster as you can get with coding.

ps. in case you're under 30, there is a high chance you don't know what a Punched Card is. You might like reading this.





Tuesday, September 8, 2015

The recent story of my life

I saw this via Arthur Charpentier, who has remarkably good twitter and blog you might like.


[image credit: the unmistakable xkcd]

Tuesday, August 18, 2015

A Cheat Sheet for Raster analysis in R

Etienne Racine has written a great Cheat Sheet for Raster analysis in R. Some of you might find it useful as well.




Friday, August 14, 2015

Sunday, March 8, 2015

The Queen Of Code [replay]

Celebrate women in science!

I have never heard about Grace Hopper until recently. After watching this short documentary from FiveThirtyEight, I can't believe it took me so long to know her story.

Grace Hopper was a computing pioneer in a male-dominated field. She has also invented the world's first compiler. In my lay terms Compilers are what enables computers to understand humans when we code in programming languages (e.g. Python, R, Java, etc). This is something we may take for granted today, but she is the person who conceived this idea, which made possible the rapid spread of personal computers.

This documentary is an important piece of the history of computing and a truly inspirational story, specially for women interested in coding and computer science. #InternationalWomensDay





Related Link: Gender differences in each programming language 





ps. Grace has also been credited to have coined the term "computer bug" after finding a moth stuck inside Harvard's Mark II computer in 1947, hence the term "debug" for solving problems in computer code.










Grace Hopper in 1952 (image credit: Boing Boing)

Tuesday, February 10, 2015

The Queen Of Code

I have never heard about Grace Hopper until recently. After watching this short documentary from FiveThirtyEight, I can't believe it took me so long to know her story.

Grace Hopper was a computing pioneer in a male-dominated field. She has also invented the world's first compiler. In my lay terms Compilers are what enables computers to understand humans when we code in programming languages (e.g. Python, R, Java, etc). This is something we may take for granted today, but she is the person who conceived this idea, which made possible the rapid spread of personal computers.

This documentary is an important piece of the history of computing and a truly inspirational story, specially for women interested in coding and computer science.




Related Link: Gender differences in each programming language 




ps. Grace has also been credited to have coined the term "computer bug" after finding a moth stuck inside Harvard's Mark II computer in 1947, hence the term "debug" for solving problems in computer code.









Grace Hopper in 1952 (image credit: Boing Boing)


Tuesday, September 9, 2014

Chart of the Day

Nice data visualization on gender differences in GitHub repository ownership, by Alyssa Frazee. The green colors represent the share of GitHub repositories owned by (most likely) women in each programming language. 

The interactive version is here!

click on the image to enlarge it


[image credit: Alyssa Frazee]