Skip to content

Releases: andybega/states

CRAN version 0.3.2

08 Sep 13:06
Compare
Choose a tag to compare

states 0.3.2

Several small fixes.

Bug fixes

  • Manually add a "states-packge" alias for the package doc since roxygen2 does not do this by default anymore.
  • Switch from the deprecated ggplot2::aes_string() to ggplot2::aes() + the .data pronoun in plot_missing().
  • Fix a dplyr join warning in state_panel() due to the new "relationship" argument.
  • Update old URLs in README and other documentation.

CRAN version 0.3.1

05 Sep 07:50
Compare
Choose a tag to compare

states 0.3.1

  • Strip readr "spec" attribute from the cowstates and gwstates data. They are both now plain data frames with no attributes. (#22)
  • Expand list of short country names in prettyc(), e.g. instead of "Belarus (Byelorussia)", just "Belarus".
  • Move to testthat 3rd edition (3e).

Bug fixes

  • all.equal() in R 4.1.x (R-devel at this point) will check environments for equivalence as well. This breaks one test since 2e testthat relies on all.equal() for expect_equal(). Moving to testthat 3e fixes this bug. (#26)

CRAN version 0.3.0

11 Dec 10:12
Compare
Choose a tag to compare

states 0.3.0

  • Although the original COW state list does not distinguish micro-states, like the G&W list does, the cowstates data now has a microstates coding derived from the G&W coding (#24). This makes it easier, for example, to filter out micro-states from a state panel dataset.
  • In the gwstates and cowstates data, the "iso3c" columns have been renamed to "gwn" and "cown", as they are not in fact ISO 3-character country abbreviations (#19).
  • plot_missing()'s "space" argument has been renamed "ccode".
  • id_date_sequence() now works with integer years, there is no need to convert them to Date class anymore (#20).

Improved support for state_panel shortcuts

state_panel() has further improved support for input shortcuts (#3):

  • Accepted formats for the "start" and "end" arguments now include 2006, "2006", "2000-06", and "2006-06-01". See parse_date() for details.
  • The implied time period is now also inferred from shortcut input when "by" is left at the new default of NULL.
  • The "partial" option has gained new "first" and "last" values that also support shortcut input. Previously a shortcut input like 2006 could only be used with the "any" partial option, and to get country-years for states that were independent on the first day of a year one had to use state_panel("YYYY-01-01", partial = "exact", ...). This can now instead be done with state_panel(2006, partial = "first", ...).

New functions

  • Added country_names() to translate country codes to country names and prettyc() to shorten some of the longer country names, like "Macedonia, the former Yugoslav Republic of".
  • Updated vignette on G&W and COW differences to take into account when trying to translate between codes.
  • Added compare() helper to compare two statelist data frames prior to merging.
  • Added parse_date() to handle more flexible "start" and "end" date input (#12).

Bug fixes

  • all.equal() in R 4.1.x (R-devel at this point) will check environments for equivalence as well. This breaks one test since 2e testthat relies on all.equal() for expect_equal(). (#26)
  • fixed a misspelled country name, "Rumania" to "Romania"

CRAN version 0.2.2

11 Jan 14:09
Compare
Choose a tag to compare

Various minor improvements, mainly related to smarter defaults for state_panel() and plot_missing() so that API calls can be simpler in many use cases.