Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# `microdf` roadmap

`microdf` currently provides capabilities for analyzing weighted microdata, including statistics, distributional tables, graphs, and special functions for working with PSL Tax-Calculator. In the future, it will provide more functionality, including:
* Charts showing distributional changes between a baseline and reform policy
* Extending these charts to more than one reform
* Presets for working with common datasets, e.g. suggesting the appropriate weight for SCF and CPS
* Standard error calculations for surveys with replicate weight files
`microdf` provides weighted data structures for survey microdata: weighted
quantiles and moments, inequality measures including the Gini coefficient and
top and bottom shares, Foster-Greer-Thorbecke poverty measures, and variance
estimation from replicate weights.

See the [issues page](https://github.com/PolicyEngine/microdf/issues) to view and suggest other items.
Planned work:

* Variance from stratum and cluster identifiers, for designs where replicate
weights are not published
* Presets for common datasets, such as suggesting the appropriate weight
variable for the SCF and the CPS
* Wider coverage of pandas methods that change shape, so fewer operations need
an explicit override

See the [issues page](https://github.com/PolicyEngine/microdf/issues) to view
and suggest other items.
1 change: 1 addition & 0 deletions changelog.d/docs-landing.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds an installation snippet and links to the API reference from the documentation landing page, and updates the roadmap.
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Examples
========

See these rendered Jupyter notebooks for examples of `microdf` usage.
Worked examples of `microdf` usage. The [Gini coefficient notebook](gini.ipynb) shows the estimator against a known distribution.
## Keeping weights through pandas operations

`MicroSeries` and `MicroDataFrame` retain independent copies of their row
Expand Down
20 changes: 19 additions & 1 deletion docs/home.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
`microdf` documentation
=======================

This includes example notebooks, and in the future will also include function documentation.
`microdf` provides weighted data structures for survey microdata analysis in
Python. `MicroSeries` and `MicroDataFrame` carry sampling weights inside the
object, so the weights stay aligned with their rows through merges, filters,
grouping and reindexing, and the weighted estimators — quantiles, variance,
Gini, top shares, poverty rates — use documented conventions rather than ad hoc
ones.

```python
import microdf as mdf

df = mdf.MicroDataFrame({"income": [10_000, 30_000, 120_000]}, weights=[800, 1_200, 50])
df.income.median() # 30000, weighted
df.income.gini()
```

Install with `pip install microdf-python`.

- [Examples](examples.md) — worked analyses, and how weights survive a pipeline
- [API reference](api.md) — every weighted estimator and weight-handling method
Loading